The return value of exif_imagetype() is the same value that getimagesize() returns in index 2
Nilard - October 17, 2006 - 03:17
| Project: | Image watermark |
| Version: | 4.7.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
http://php.net/exif_imagetype :
The return value is the same value that getimagesize() returns in index 2 but exif_imagetype() is much faster.
But exif functions are not always supported on every web-server.
If we remove $function_list[] = 'exif_imagetype'; from watermark_check_functions() and add a following check to _watermark_make_image($file), it will be compatible to PHP configured with no exif support.
if (function_exists('exif_imagetype')) {
$type = exif_imagetype($file);
}
else {
$type = getimagesize($file);
$type = $type[2];
}