8BIM data length is wrong

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
dirk1976
Posts: 27
Joined: 2010-09-08T22:16:11-07:00
Authentication code: 8675308
Location: Germany

8BIM data length is wrong

Post by dirk1976 »

I was wondering why identify don't show an included IPTC profile after I insert it in a jpg file. Only a 8BIM profile should be included. After I inspect this I found IM write a wrong 8BIM data length (not the jpeg segment data length). I try some times with different iptc data and always '01 E0' as data length was writen. This only happen if '-profile IPTC:test.iptc' is used. The option '-profile 8BIM:test.iptc' write the data length correct.

I only test jpg files with ImageMagick 6.6.3-10 2010-08-30 Q16

Please check this, thank you.
dirk1976
Posts: 27
Joined: 2010-09-08T22:16:11-07:00
Authentication code: 8675308
Location: Germany

Re: 8BIM data length is wrong

Post by dirk1976 »

Can anybody agree with me this is a bug?

Maybe I have to explain it in more detail. Here is a hex dump from my image after iptc was written with the command:
convert test_without_iptc.jpg -profile iptc:test.iptc test_with_iptc.jpg

00000000 FF D8 FF E0 00 10 4A 46 49 46 00 01 01 01 01 2C ÿØÿà..JFIF.....,
00000010 01 2C 00 00 FF FE 00 13 43 72 65 61 74 65 64 20 .,..ÿþ..Created
00000020 77 69 74 68 20 47 49 4D 50 FF ED 00 2E 50 68 6F with GIMPÿí..Pho
00000030 74 6F 73 68 6F 70 20 33 2E 30 00 38 42 49 4D 04 toshop 3.0.8BIM.
00000040 04 00 00 00 00 01 E0 1C 02 78 00 0C 61 20 74 65 ......à..x..a te
00000050 73 74 20 69 6D 61 67 65 00 FF DB 00 43 00 05 03 st image.ÿÛ.C...

The jpeg segment markers are bold and the length of the Photoshop 3.0 segment is highlighted with blue. The wrong 8BIM data length is highlighted in red. You can see the whole length of the Photoshop segment is shorter than the 8BIM data length

I test it with then newest version '6.6.4-2'.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: 8BIM data length is wrong

Post by magick »

We can reproduce the problem you reported and have a patch in ImageMagick 6.6.4-3 Beta available by sometime tomorrow. Thanks.
dirk1976
Posts: 27
Joined: 2010-09-08T22:16:11-07:00
Authentication code: 8675308
Location: Germany

Re: 8BIM data length is wrong

Post by dirk1976 »

Thank you for your answer. I test it with the new version (6.6.4-4) but the bug is still in. I can see only one changes, now 0x00C6 as 8BIM length is written.
Last edited by dirk1976 on 2010-09-18T19:56:17-07:00, edited 3 times in total.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: 8BIM data length is wrong

Post by magick »

We'll need a test / use case from you. The patch fixed the problem for the JPEG image file we used that includes a IPTC profile embedded in a 8BIM resource.
dirk1976
Posts: 27
Joined: 2010-09-08T22:16:11-07:00
Authentication code: 8675308
Location: Germany

Re: 8BIM data length is wrong

Post by dirk1976 »

Ok, I create a zip file what include a test image and a test iptc file. You can download it under http://rapidshare.com/files/419889424/8 ... c_test.zip (maximum 10 downloads).

I use the command: convert test_without_iptc.jpg -profile iptc:test.iptc t1.jpg

Thank you.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: 8BIM data length is wrong

Post by magick »

We'll get a patch for this problem into ImageMagick 6.6.4-5 Beta by sometime tomorrow. Thanks.
dirk1976
Posts: 27
Joined: 2010-09-08T22:16:11-07:00
Authentication code: 8675308
Location: Germany

Re: 8BIM data length is wrong

Post by dirk1976 »

Tests with the current version (6.6.4-8 2010-09-29 Q16) don't work, the bug is still in. The written 8bim length is now 0x00C6.
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: 8BIM data length is wrong

Post by Drarakel »

Well, IM itself can read your IPTC profile with the latest patch. :)
But yeah, the whole 8BIM/IPTC thing is broken. See also here:
viewtopic.php?f=3&t=17134
Post Reply