Bug #800
Missing Photoshop IRB types (8BIM, PHUT, DCSR, AgHg)
100%
Description
The assumption that image resource blocks (IRB) in JPEG (APP13) and PSD images always start with type designator "8BIM" is wrong. An image with a valid IRB introduced by type designator "AgHg" was found. Writing metadata to such an image leads to error message "Input data does not contain a valid image" in case of JPEG and "This does not look like a Photoshop image" for PSD images. This finding was verified against exiftool sources, which in addition to the common "8BIM" list "PHUT", "DCSR" and "AgHg" as IRB type designators that have been found in rare cases.
A patch and appropriate test cases will be provided and committed ASAP.
History
Updated by Volker Grabsch almost 10 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
I just commited r2646 which fixes this issue. The patch is a collective effort of Michael and me.
Updated by Andreas Huggel almost 10 years ago
Thanks, Michael and Volker for a very complete fix! Especially for also updating the tests. Only issue I have with the change is that it breaks the binary compatibility of the upcoming release. What if we keep bimId_[] in jpgimage.hpp for the time being and just mark it as obsolete?
Updated by Volker Grabsch almost 10 years ago
Agreed. In r2650 I restored binary compatibility.
I didn't find any special conventions about marking things as deprecated in Exiv2, so I just added "deprecated" to the comments. Please check if that fits into the project coding style.
Updated by Andreas Huggel almost 10 years ago
Thanks! There is no convention for this process yet, the comments are fine.
#800: Added and unified support for multiple IRB types (8BIM, AgHg, DCSR, PHUT) in JPEG and PSD images