FileEye / pel

PHP Exif Library - library for reading and writing Exif headers in JPEG and TIFF files using PHP.
https://github.com/FileEye/pel
GNU General Public License v2.0
9 stars 6 forks source link

PelJpeg->getICC() does not always return the correct section #20

Open ColdPie1 opened 6 months ago

ColdPie1 commented 6 months ago

Apple phones in particular include several JPEG images in one image using the Multi-Picture Format standard. This is implemented via a MPF0 object within an APP2 section. If this happens to be the first APP2 section in the file, then pel will return that MPF0 object from getICC instead of the correct ICC section.

I will open a PR shortly with a fix for this.

ColdPie1 commented 6 months ago

PR #21 is open for this now. I'm not able to run the test suite, so I didn't add a test for this. I've uploaded an example picture here, if someone more familiar would like to write a test for it.

merged_20240323.jpg