Gregwar / Image

A PHP library to handle images
MIT License
1k stars 190 forks source link

Silence EXIF errors #105

Closed bytespider closed 7 years ago

bytespider commented 8 years ago

Don't break the entire resize operation, for one small EXIF error, which may not even stop us from rotating the image.

Fixes issues #92 and #96

soullivaneuh commented 8 years ago

How to be sure the image is OK even if exif_read_data fails?

bytespider commented 8 years ago

exif_read_data returns false if there is no EXIF data, and I'm not convinced corrupt exif data renders the image unusable.

soullivaneuh commented 8 years ago

In this case you should manage false return of exif_read_data. In this case, the code will broke just after that (array access).

soullivaneuh commented 8 years ago

And, IMHO, ignore exif_read_data should be a configurable option.

garygreen commented 8 years ago

New PR #121 fixes with the proper false check.

garygreen commented 8 years ago

@Gregwar @Soullivaneuh this one can be closed as fixed in #121