summaryrefslogtreecommitdiffstats
path: root/phpfspot.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpfspot.class.php')
-rw-r--r--phpfspot.class.php15
1 files changed, 15 insertions, 0 deletions
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()
+
}
?>