Image icon indicating copy to clipboard operation
Image copied to clipboard

Show Errors

Open jakenoble opened this issue 10 years ago • 2 comments

I am getting an image in my cache directory called fallback.jpg, the image just says Error.

How can I find the errors that this lib is throwing, putting my code in a try catch doesn't show up anything.

My dirs are writeable, I have PHP memory set at 512MB, I have GD and Exif.

How can I locate the error?

My code that fails is

$this->gregImage->open($this->uploadsPath . $filename)
    ->fixOrientation()
    ->resize(150, 150)
    ->save($this->uploadsPath . "thumb_" . $filename);

jakenoble avatar Oct 29 '15 12:10 jakenoble

Removing fixOrientation() fixes the issue and the image is resized, does this mean fixOrientation() is broken?

jakenoble avatar Oct 29 '15 12:10 jakenoble

You can use ->useFallback(false). Seems to be related to when images have corrupt or invalid EXIF data, and exif_read_data throws and exception.

I get an exception thrown exif_read_data(file-20151123-565300d79e623): Illegal IFD Pointer However I feel this is incorrect behaviour as the rest of the EXIF is fine, including the Orientation, which is what we care about when using ->fixOrientation()

bytespider avatar Nov 23 '15 12:11 bytespider