if(!file_exists($orig_image))
return false;
+ $details = getimagesize($orig_image);
+
+ /* check if original photo is a support image type */
+ if(!$this->parent->checkifImageSupported($details['mime']))
+ return false;
+
$meta = $this->get_meta_informations($orig_image);
$rotate = 0;
} // _debug()
+ public function checkifImageSupported($mime)
+ {
+ if(in_array($mime, Array("image/jpeg")))
+ return true;
+
+ return false;
+
+ } // checkifImageSupported()
+
}
?>
$tmp = getimagesize($fullpath);
$mime = $tmp['mime'];
+ if(!$this->parent->checkifImageSupported($mime)) {
+ $this->parent->showTextImage("Unsupported Image Type");
+ return;
+ }
+
Header("Content-Type: ". $mime);
Header("Content-Length: ". filesize($fullpath));
Header("Content-Transfer-Encoding: binary\n");