drewnoakes / metadata-extractor

Extracts Exif, IPTC, XMP, ICC and other metadata from image, video and audio files
Apache License 2.0
2.55k stars 479 forks source link

End of data reached when parsing photoshop directory of jpg #551

Open spand opened 3 years ago

spand commented 3 years ago

One of our photographers had a problem with the image linked below. The actual error that happens is "End of data reached." for the Photoshop directory. He told me the problem persisted even after cropping the image. This leads me to believe it is not simply a corrupt image but either a bug in either Lightroom (that outputs invalid meta data) or in this library.

What also smells funny is that it ends up producing two Photoshop directories with errors in them. I read in the PhotoshopReader class that it will produce both Photoshop and IPTC directories so maybe it is the culprint.

image

https://www.dust2.dk/img/problemsample.jpg

drewnoakes commented 3 years ago

What is the actual error string?

It looks to me like a single Photoshop directory. The second here is the 'parent' of item 5, which appears to be item 4.

spand commented 3 years ago

Sorry. The description was correct. I have uploaded a better image and clarified the description a bit.