Page 1 of 1

Problem with 8BIM profiles in JPG

Posted: 2010-09-26T00:27:13-07:00
by Drarakel
The Photoshop (8BIM) profiles in JPG files don't get read properly anymore.
Maybe it was introduced with this patch for the "8BIM data length" (for IPTC):
viewtopic.php?f=3&t=17030

Everything's now just listed as IPTC profile (8BIM and/or IPTC).
Take this example (with only a 8BIM profile): rose.jpg
Older (working) IM versions list this with "identify -verbose":

Code: Select all

  Profiles:
    Profile-8bim: 9780 bytes
IM v6.6.4-6 lists it like that here:

Code: Select all

    Profile-iptc: 9780 bytes
      Custom Field 13[99,212]: 0x00000000: 4b2affff 7d311eff ff02ffff ff07ffff 7
dffffff  .K* ú}1-£í-±cO-
0x00000014: ff7dffff ffffffff ffff51ff ff00               UA}ß-'_

Re: Problem with 8BIM profiles in JPG

Posted: 2010-10-02T02:47:31-07:00
by Drarakel
Can you reproduce it?
The bug came with version 6.6.4-5, by the way.

And it's indeed the (second) patch from here:
viewtopic.php?f=3&t=17030
With this patch, this line (in jpeg.c):

Code: Select all

      status=SetImageProfile(image,"8bim",profile);
was changed into:

Code: Select all

      status=SetImageProfile(image,"iptc",profile);
The patch from above did, well, 'fix' the IPTC issue in that thread. The command from that thread was:
convert test_without_iptc.jpg -profile iptc:test.iptc t1.jpg
But: The IPTC profile gets still written wrongly. ExifTool doesn't display a Photoshop or IPTC profile within 't1.jpg'. And there's a warning from Exiftool: "Bad Photoshop resource data size 198" (so, the false 8BIM data length is still 0xC6). The resulting file is probably the same as in earlier IM versions. The difference (with version 6.6.4-6 or newer) now is, that identify takes this wrong profile and displays it as IPTC. But probably no other tool can read that. And as I said, the display of normal Photoshop profiles is now broken, too. :?