exif_read_data may not be available and isn't a requirement - check and silently ignore exif orientation if it isn't there
This commit is contained in:
parent
633726e4a9
commit
dbceef04e8
|
@ -143,6 +143,9 @@ class Photo {
|
||||||
public function orient($filename) {
|
public function orient($filename) {
|
||||||
// based off comment on http://php.net/manual/en/function.imagerotate.php
|
// based off comment on http://php.net/manual/en/function.imagerotate.php
|
||||||
|
|
||||||
|
if(! function_exists('exif_read_data'))
|
||||||
|
return;
|
||||||
|
|
||||||
$exif = exif_read_data($filename);
|
$exif = exif_read_data($filename);
|
||||||
$ort = $exif['Orientation'];
|
$ort = $exif['Orientation'];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue