<?php
class files_screen_image{
protected $_path_abs;
protected $_ext;
function __construct($path_abs)
{
$this -> _path_abs = $path_abs;

$pinfo = pathinfo($this -> _path_abs);
$this -> _ext = strtolower($pinfo['extension']);
}


public function getScreen()
{
switch ($this -> _ext) {
case 'jpg':return @imagecreatefromjpeg($this -> _path_abs);
case 'jpeg':return @imagecreatefromjpeg($this -> _path_abs);
case 'gif':return @imagecreatefromgif($this -> _path_abs);
case 'png':return @imagecreatefrompng($this -> _path_abs);
default:return false;
}


}

}
?>
