]> git.mxchange.org Git - friendica.git/commitdiff
The emulation for the exif function is now much more sleaker
authorMichael Vogel <icarus@dabo.de>
Tue, 22 Oct 2013 14:19:55 +0000 (16:19 +0200)
committerMichael Vogel <icarus@dabo.de>
Tue, 22 Oct 2013 14:19:55 +0000 (16:19 +0200)
boot.php

index a4e2cfe4e5cf2f8f71643eb258049d06b438efe8..af164ec4249caf90b71badd2601806106f584abe 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -2176,26 +2176,8 @@ function set_template_engine(&$a, $engine = 'internal') {
 }
 
 if(!function_exists('exif_imagetype')) {
-       function exif_imagetype($file) {
-               $size = getimagesize($file);
-
-               switch ($size["mime"]) {
-                       case "image/jpeg":
-                               $imagetype = IMAGETYPE_JPEG;
-                               break;
-                       case "image/gif":
-                               $imagetype = IMAGETYPE_GIF;
-                               break;
-                       case "image/png":
-                               $imagetype = IMAGETYPE_PNG;
-                               break;
-                       case "":
-                               $imagetype = "";
-                               break;
-                       default:
-                               $imagetype = 99;
-               }
-
-               return($imagetype);
-       }
+        function exif_imagetype($file) {
+                $size = getimagesize($file);
+                return($size[2]);
+        }
 }