From eda7f279dc8d78633480e3cc9a8a2018606787fe Mon Sep 17 00:00:00 2001 From: Andreas Unterkircher Date: Sat, 30 Jun 2007 09:34:00 +0000 Subject: issue15, check for compatible image type git-svn-id: file:///var/lib/svn/phpfspot/trunk@141 fa6a889d-dae6-447d-9e79-4ba9a3039384 --- phpfspot.class.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'phpfspot.class.php') diff --git a/phpfspot.class.php b/phpfspot.class.php index 89cf0b8..fb54eb6 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -513,6 +513,12 @@ class PHPFSPOT { 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; @@ -877,6 +883,15 @@ class PHPFSPOT { } // _debug() + public function checkifImageSupported($mime) + { + if(in_array($mime, Array("image/jpeg"))) + return true; + + return false; + + } // checkifImageSupported() + } ?> -- cgit v1.2.3-18-g5258