Description of problem: I have an ICNS file created by Apple's IconComposer. The ICNS file appears to work properly on Mac OS X. It contains 4-channel icons at 16x16, 32x32, 128x128, 256x256, and 512x512. icns2png is unable to extract all of the icons from this file. This is what I get when I use icns2png to list the contents: [uckelman@scylla 3.1]$ icns2png -l vassal-apple.icns ---------------------------------------------------- Reading icns family from vassal-apple.icns... Icon family type is 'icns' Icon family size is 180945 bytes Listing icon elements... 'is32' 16x16 32-bit icon (1024 bytes compressed to 719) 's8mk' 16x16 8-bit mask (256 bytes) 'il32' 32x32 32-bit icon (4096 bytes compressed to 2236) 'l8mk' 32x32 8-bit mask (1024 bytes) 'it32' 128x128 32-bit icon (65536 bytes compressed to 18266) 't8mk' 128x128 8-bit mask (16384 bytes) 'ic08' 256x256 32-bit icon (262144 bytes compressed to 41997) 'ic09' 512x512 32-bit icon (1048576 bytes compressed to 99979) libicns: icns_get_image_info_for_type: Unable to parse icon type 'icnV' 'icnV' 0x0 0-bit (4 bytes) 9 elements total in vassal-apple.icns. An assertion fails when I try to extract the images: [uckelman@scylla 3.1]$ icns2png -x vassal-apple.icns ---------------------------------------------------- Reading icns family from vassal-apple.icns... Saved 'is32' element to vassal-apple_16x16x32.png. Saved 'il32' element to vassal-apple_32x32x32.png. Saved 'it32' element to vassal-apple_128x128x32.png. icns2png: jpc_dec.c:1072: jpc_dec_tiledecode: Assertion `dec->numcomps == 3' failed. Aborted If I try to extract the images individually, it works for all of them except the 256x256 and 512x512, which give me this same failed assertion: [uckelman@scylla 3.1]$ icns2png -s 256 -x vassal-apple.icns ---------------------------------------------------- Reading icns family from vassal-apple.icns... icns2png: jpc_dec.c:1072: jpc_dec_tiledecode: Assertion `dec->numcomps == 3' failed. Aborted [uckelman@scylla 3.1]$ icns2png -s 512 -x vassal-apple.icns ---------------------------------------------------- Reading icns family from vassal-apple.icns... icns2png: jpc_dec.c:1072: jpc_dec_tiledecode: Assertion `dec->numcomps == 3' failed. Aborted According to the libicns release notes, it needs to be linked against jasper or libopenjpeg to handle the largest images sizes, but ldd says that icns2png is linked agianst libjasper, so I think that's not the problem. Version-Release number of selected component (if applicable): libicns-0.6.1-1.fc10.x86_64 libicns-utils-0.6.1-1.fc10.x86_64 How reproducible: Always. Steps to Reproduce: 1. icns2png -x vassal-apple.icns Actual results: An assertion fails while extracting the 256x256 image. Expected results: All images should extract successfully.
Created attachment 329820 [details] a ZIIP archive containing the ICNS file which triggers the problem I had to upload the file inside a ZIP archive because the file itself exposed yet another bug---if I try to select it in Firefox's file chooser, Firefox crashes, which seems to have something to do with the file chooser's attempt to show an image preview of the ICNS file.
I have opened an upstream bug for this: SF 2531242 https://sourceforge.net/tracker/index.php?func=detail&aid=2531242&group_id=174339&atid=868840
Hi, This is due to a bug in the upstream of jasper. You can see details of the problem and a proposed fix here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=469786 (As seen, the fix has since been integrated into Debian) You can also see some discussion on the formal mailing list here: http://tech.groups.yahoo.com/group/jasper-discussion/message/1774 http://tech.groups.yahoo.com/group/jasper-discussion/message/1831 http://tech.groups.yahoo.com/group/jasper-discussion/message/1832 It sounds as if the fix will be in the next upstream release of Jasper, but there is no real word on how long it will be until that takes place... Let me know if there is are any further problems. Thank you, -Mathew Eis
Would it be possible to get this patch applied to the Fedora build of jasper instead of waiting for it to be fixed upstream? The same bug in jasper also causes Firefox to crash (Bug 481291) which I'd guess counts as a Big Deal, in comparison with icns2png being broken.
(In reply to comment #4) > Would it be possible to get this patch applied to the Fedora build of jasper > instead of waiting for it to be fixed upstream? The same bug in jasper also > causes Firefox to crash (Bug 481291) which I'd guess counts as a Big Deal, in > comparison with icns2png being broken. Reassigning this bug to jasper. I think this is the quickest way to have this fixed.
Sure, I'll take a look.
Try out: https://admin.fedoraproject.org/updates/jasper-1.900.1-9.fc10
(In reply to comment #7) > Try out: > https://admin.fedoraproject.org/updates/jasper-1.900.1-9.fc10 I can extract the large icons successfully with this build of jasper. This appears to fix the bug.
jasper-1.900.1-9.fc10 has been pushed to the Fedora 10 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update jasper'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-0986
jasper-1.900.1-9.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report.
jasper-1.900.1-9.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.