Package: icoutils Version: 0.31.0-2 Severity: important Hi,
I've found two problems with the icotool program provided in this package, when used with icons containing some PNG images (Vista and above). I've attached a `script` output of the problem commands ran against some test icons pulled straight out of Microsoft DLLs 1. If you specify a wildcard for the filename, you can't specify any attributes for the icon (such as width or bit-depth). No error message, just no output at all. 2. When trying to extract from a 'Vista' icon, you can't specify any attributes either. In my test, I tried to extract icon5.ico[22] (the 32x32x32 image). I got a bogus error 'incorrect total size of bitmap' as shown in the attachment. When I removed the parameters, and just blindly extracted everything from icon5.ico, they all extracted perfectly. Something appears to be wrong with the program not being able to calculate the icon offsets and sizes when parameters are specified, when the icon contains PNG images conforming to the icon specification introduced in Windows Vista. -- System Information: Debian Release: jessie/sid APT prefers testing-updates APT policy: (500, 'testing-updates'), (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 3.13-1-amd64 (SMP w/1 CPU core) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages icoutils depends on: ii libc6 2.18-5 ii libpng12-0 1.2.50-1 ii libwww-perl 6.06-1 ii perl 5.18.2-2+b1 ii zlib1g 1:1.2.8.dfsg-1 icoutils recommends no packages. Versions of packages icoutils suggests: pn libterm-readline-gnu-perl | libterm-readline-perl-perl <none> -- no debconf information
Script started on Thu 08 May 2014 16:30:47 BST root@debian:~# file * test1.ico: MS Windows icon resource - 1 icon, 16x16, 16 colors test2.ico: MS Windows icon resource - 12 icons, 40x40, 16 colors test3.ico: MS Windows icon resource - 13 icons, 48x48, 16 colors test4.ico: MS Windows icon resource - 12 icons, 32x32, 16 colors test5.ico: MS Windows icon resource - 24 icons, 256x256, 16 colors root@debian:~# icotool --list --width=32 *.ico root@debian:~# icotool --list *.ico --icon --index=1 --width=16 --height=16 --bit-depth=4 --palette-size=16 --icon --index=1 --width=40 --height=40 --bit-depth=4 --palette-size=16 --icon --index=2 --width=32 --height=32 --bit-depth=4 --palette-size=16 --icon --index=3 --width=20 --height=20 --bit-depth=4 --palette-size=16 --icon --index=4 --width=16 --height=16 --bit-depth=4 --palette-size=16 test2.ico: clr_important field in bitmap should be zero --icon --index=5 --width=40 --height=40 --bit-depth=8 --palette-size=256 test2.ico: clr_important field in bitmap should be zero --icon --index=6 --width=32 --height=32 --bit-depth=8 --palette-size=256 test2.ico: clr_important field in bitmap should be zero --icon --index=7 --width=20 --height=20 --bit-depth=8 --palette-size=256 test2.ico: clr_important field in bitmap should be zero --icon --index=8 --width=16 --height=16 --bit-depth=8 --palette-size=256 --icon --index=9 --width=40 --height=40 --bit-depth=32 --palette-size=0 --icon --index=10 --width=32 --height=32 --bit-depth=32 --palette-size=0 --icon --index=11 --width=20 --height=20 --bit-depth=32 --palette-size=0 --icon --index=12 --width=16 --height=16 --bit-depth=32 --palette-size=0 --icon --index=1 --width=48 --height=48 --bit-depth=4 --palette-size=16 --icon --index=2 --width=32 --height=32 --bit-depth=4 --palette-size=16 --icon --index=3 --width=24 --height=24 --bit-depth=4 --palette-size=16 --icon --index=4 --width=16 --height=16 --bit-depth=4 --palette-size=16 test3.ico: clr_important field in bitmap should be zero --icon --index=5 --width=48 --height=48 --bit-depth=8 --palette-size=256 test3.ico: clr_important field in bitmap should be zero --icon --index=6 --width=32 --height=32 --bit-depth=8 --palette-size=256 test3.ico: clr_important field in bitmap should be zero --icon --index=7 --width=24 --height=24 --bit-depth=8 --palette-size=256 test3.ico: clr_important field in bitmap should be zero --icon --index=8 --width=16 --height=16 --bit-depth=8 --palette-size=256 --icon --index=9 --width=256 --height=256 --bit-depth=32 --palette-size=0 --icon --index=10 --width=48 --height=48 --bit-depth=32 --palette-size=0 --icon --index=11 --width=32 --height=32 --bit-depth=32 --palette-size=0 --icon --index=12 --width=24 --height=24 --bit-depth=32 --palette-size=0 --icon --index=13 --width=16 --height=16 --bit-depth=32 --palette-size=0 --icon --index=1 --width=32 --height=32 --bit-depth=4 --palette-size=16 --icon --index=2 --width=24 --height=24 --bit-depth=4 --palette-size=16 --icon --index=3 --width=20 --height=20 --bit-depth=4 --palette-size=16 --icon --index=4 --width=16 --height=16 --bit-depth=4 --palette-size=16 test4.ico: clr_important field in bitmap should be zero --icon --index=5 --width=32 --height=32 --bit-depth=8 --palette-size=256 test4.ico: clr_important field in bitmap should be zero --icon --index=6 --width=24 --height=24 --bit-depth=8 --palette-size=256 test4.ico: clr_important field in bitmap should be zero --icon --index=7 --width=20 --height=20 --bit-depth=8 --palette-size=256 test4.ico: clr_important field in bitmap should be zero --icon --index=8 --width=16 --height=16 --bit-depth=8 --palette-size=256 --icon --index=9 --width=32 --height=32 --bit-depth=32 --palette-size=0 --icon --index=10 --width=24 --height=24 --bit-depth=32 --palette-size=0 --icon --index=11 --width=20 --height=20 --bit-depth=32 --palette-size=0 --icon --index=12 --width=16 --height=16 --bit-depth=32 --palette-size=0 --icon --index=1 --width=256 --height=256 --bit-depth=32 --palette-size=0 --icon --index=2 --width=128 --height=128 --bit-depth=4 --palette-size=16 --icon --index=3 --width=96 --height=96 --bit-depth=4 --palette-size=16 --icon --index=4 --width=64 --height=64 --bit-depth=4 --palette-size=16 --icon --index=5 --width=48 --height=48 --bit-depth=4 --palette-size=16 --icon --index=6 --width=32 --height=32 --bit-depth=4 --palette-size=16 --icon --index=7 --width=24 --height=24 --bit-depth=4 --palette-size=16 --icon --index=8 --width=16 --height=16 --bit-depth=4 --palette-size=16 --icon --index=9 --width=256 --height=256 --bit-depth=32 --palette-size=0 test5.ico: clr_important field in bitmap should be zero --icon --index=10 --width=128 --height=128 --bit-depth=8 --palette-size=256 test5.ico: clr_important field in bitmap should be zero --icon --index=11 --width=96 --height=96 --bit-depth=8 --palette-size=256 test5.ico: clr_important field in bitmap should be zero --icon --index=12 --width=64 --height=64 --bit-depth=8 --palette-size=256 test5.ico: clr_important field in bitmap should be zero --icon --index=13 --width=48 --height=48 --bit-depth=8 --palette-size=256 test5.ico: clr_important field in bitmap should be zero --icon --index=14 --width=32 --height=32 --bit-depth=8 --palette-size=256 test5.ico: clr_important field in bitmap should be zero --icon --index=15 --width=24 --height=24 --bit-depth=8 --palette-size=256 test5.ico: clr_important field in bitmap should be zero --icon --index=16 --width=16 --height=16 --bit-depth=8 --palette-size=256 --icon --index=17 --width=256 --height=256 --bit-depth=32 --palette-size=0 --icon --index=18 --width=128 --height=128 --bit-depth=32 --palette-size=0 --icon --index=19 --width=96 --height=96 --bit-depth=32 --palette-size=0 --icon --index=20 --width=64 --height=64 --bit-depth=32 --palette-size=0 --icon --index=21 --width=48 --height=48 --bit-depth=32 --palette-size=0 --icon --index=22 --width=32 --height=32 --bit-depth=32 --palette-size=0 --icon --index=23 --width=24 --height=24 --bit-depth=32 --palette-size=0 --icon --index=24 --width=16 --height=16 --bit-depth=32 --palette-size=0 root@debian:~# icotool --list --width=32 test2.ico --icon --index=2 --width=32 --height=32 --bit-depth=4 --palette-size=16 test2.ico: clr_important field in bitmap should be zero test2.ico: clr_important field in bitmap should be zero --icon --index=6 --width=32 --height=32 --bit-depth=8 --palette-size=256 test2.ico: clr_important field in bitmap should be zero test2.ico: clr_important field in bitmap should be zero --icon --index=10 --width=32 --height=32 --bit-depth=32 --palette-size=0 root@debian:~# icotool --list --width=32 test3.ico --icon --index=2 --width=32 --height=32 --bit-depth=4 --palette-size=16 test3.ico: clr_important field in bitmap should be zero test3.ico: clr_important field in bitmap should be zero --icon --index=6 --width=32 --height=32 --bit-depth=8 --palette-size=256 test3.ico: clr_important field in bitmap should be zero test3.ico: clr_important field in bitmap should be zero test3.ico: incorrect total size of bitmap (49046 specified; 9640 real) test3.ico: skipping 39406 bytes of garbage at 22110 test3.ico: premature end root@debian:~# icotool --list --width=32 test4.ico --icon --index=1 --width=32 --height=32 --bit-depth=4 --palette-size=16 test4.ico: clr_important field in bitmap should be zero --icon --index=5 --width=32 --height=32 --bit-depth=8 --palette-size=256 test4.ico: clr_important field in bitmap should be zero test4.ico: clr_important field in bitmap should be zero test4.ico: clr_important field in bitmap should be zero --icon --index=9 --width=32 --height=32 --bit-depth=32 --palette-size=0 root@debian:~# icotool --list *.ico | grep width=32 test2.ico: clr_important field in bitmap should be zero test2.ico: clr_important field in bitmap should be zero test2.ico: clr_important field in bitmap should be zero test2.ico: clr_important field in bitmap should be zero test3.ico: clr_important field in bitmap should be zero test3.ico: clr_important field in bitmap should be zero test3.ico: clr_important field in bitmap should be zero test3.ico: clr_important field in bitmap should be zero test4.ico: clr_important field in bitmap should be zero test4.ico: clr_important field in bitmap should be zero test4.ico: clr_important field in bitmap should be zero test4.ico: clr_important field in bitmap should be zero test5.ico: clr_important field in bitmap should be zero test5.ico: clr_important field in bitmap should be zero test5.ico: clr_important field in bitmap should be zero test5.ico: clr_important field in bitmap should be zero test5.ico: clr_important field in bitmap should be zero test5.ico: clr_important field in bitmap should be zero test5.ico: clr_important field in bitmap should be zero --icon --index=2 --width=32 --height=32 --bit-depth=4 --palette-size=16 --icon --index=6 --width=32 --height=32 --bit-depth=8 --palette-size=256 --icon --index=10 --width=32 --height=32 --bit-depth=32 --palette-size=0 --icon --index=2 --width=32 --height=32 --bit-depth=4 --palette-size=16 --icon --index=6 --width=32 --height=32 --bit-depth=8 --palette-size=256 --icon --index=11 --width=32 --height=32 --bit-depth=32 --palette-size=0 --icon --index=1 --width=32 --height=32 --bit-depth=4 --palette-size=16 --icon --index=5 --width=32 --height=32 --bit-depth=8 --palette-size=256 --icon --index=9 --width=32 --height=32 --bit-depth=32 --palette-size=0 --icon --index=6 --width=32 --height=32 --bit-depth=4 --palette-size=16 --icon --index=14 --width=32 --height=32 --bit-depth=8 --palette-size=256 --icon --index=22 --width=32 --height=32 --bit-depth=32 --palette-size=0 root@debian:~# icotool --list test5.ico --icon --index=1 --width=256 --height=256 --bit-depth=32 --palette-size=0 --icon --index=2 --width=128 --height=128 --bit-depth=4 --palette-size=16 --icon --index=3 --width=96 --height=96 --bit-depth=4 --palette-size=16 --icon --index=4 --width=64 --height=64 --bit-depth=4 --palette-size=16 --icon --index=5 --width=48 --height=48 --bit-depth=4 --palette-size=16 --icon --index=6 --width=32 --height=32 --bit-depth=4 --palette-size=16 --icon --index=7 --width=24 --height=24 --bit-depth=4 --palette-size=16 --icon --index=8 --width=16 --height=16 --bit-depth=4 --palette-size=16 --icon --index=9 --width=256 --height=256 --bit-depth=32 --palette-size=0 test5.ico: clr_important field in bitmap should be zero --icon --index=10 --width=128 --height=128 --bit-depth=8 --palette-size=256 test5.ico: clr_important field in bitmap should be zero --icon --index=11 --width=96 --height=96 --bit-depth=8 --palette-size=256 test5.ico: clr_important field in bitmap should be zero --icon --index=12 --width=64 --height=64 --bit-depth=8 --palette-size=256 test5.ico: clr_important field in bitmap should be zero --icon --index=13 --width=48 --height=48 --bit-depth=8 --palette-size=256 test5.ico: clr_important field in bitmap should be zero --icon --index=14 --width=32 --height=32 --bit-depth=8 --palette-size=256 test5.ico: clr_important field in bitmap should be zero --icon --index=15 --width=24 --height=24 --bit-depth=8 --palette-size=256 test5.ico: clr_important field in bitmap should be zero --icon --index=16 --width=16 --height=16 --bit-depth=8 --palette-size=256 --icon --index=17 --width=256 --height=256 --bit-depth=32 --palette-size=0 --icon --index=18 --width=128 --height=128 --bit-depth=32 --palette-size=0 --icon --index=19 --width=96 --height=96 --bit-depth=32 --palette-size=0 --icon --index=20 --width=64 --height=64 --bit-depth=32 --palette-size=0 --icon --index=21 --width=48 --height=48 --bit-depth=32 --palette-size=0 --icon --index=22 --width=32 --height=32 --bit-depth=32 --palette-size=0 --icon --index=23 --width=24 --height=24 --bit-depth=32 --palette-size=0 --icon --index=24 --width=16 --height=16 --bit-depth=32 --palette-size=0 root@debian:~# icotool --extract --index=22 test5.ico test5.ico: incorrect total size of bitmap (18423 specified; 10344 real) test5.ico: skipping 8079 bytes of garbage at 10734 test5.ico: compressed image data not supported root@debian:~# icotool --extract test5.ico test5.ico: clr_important field in bitmap should be zero test5.ico: clr_important field in bitmap should be zero test5.ico: clr_important field in bitmap should be zero test5.ico: clr_important field in bitmap should be zero test5.ico: clr_important field in bitmap should be zero test5.ico: clr_important field in bitmap should be zero test5.ico: clr_important field in bitmap should be zero root@debian:~# file *.png test5_10_128x128x8.png: PNG image data, 128 x 128, 8-bit/color RGBA, non-interlaced test5_11_96x96x8.png: PNG image data, 96 x 96, 8-bit/color RGBA, non-interlaced test5_1_256x256x32.png: PNG image data, 256 x 256, 8-bit/color RGBA, non-interlaced test5_12_64x64x8.png: PNG image data, 64 x 64, 8-bit/color RGBA, non-interlaced test5_13_48x48x8.png: PNG image data, 48 x 48, 8-bit/color RGBA, non-interlaced test5_14_32x32x8.png: PNG image data, 32 x 32, 8-bit/color RGBA, non-interlaced test5_15_24x24x8.png: PNG image data, 24 x 24, 8-bit/color RGBA, non-interlaced test5_16_16x16x8.png: PNG image data, 16 x 16, 8-bit/color RGBA, non-interlaced test5_17_256x256x32.png: PNG image data, 256 x 256, 8-bit/color RGBA, non-interlaced test5_18_128x128x32.png: PNG image data, 128 x 128, 8-bit/color RGBA, non-interlaced test5_19_96x96x32.png: PNG image data, 96 x 96, 8-bit/color RGBA, non-interlaced test5_20_64x64x32.png: PNG image data, 64 x 64, 8-bit/color RGBA, non-interlaced test5_2_128x128x4.png: PNG image data, 128 x 128, 8-bit/color RGBA, non-interlaced test5_21_48x48x32.png: PNG image data, 48 x 48, 8-bit/color RGBA, non-interlaced test5_22_32x32x32.png: PNG image data, 32 x 32, 8-bit/color RGBA, non-interlaced test5_23_24x24x32.png: PNG image data, 24 x 24, 8-bit/color RGBA, non-interlaced test5_24_16x16x32.png: PNG image data, 16 x 16, 8-bit/color RGBA, non-interlaced test5_3_96x96x4.png: PNG image data, 96 x 96, 8-bit/color RGBA, non-interlaced test5_4_64x64x4.png: PNG image data, 64 x 64, 8-bit/color RGBA, non-interlaced test5_5_48x48x4.png: PNG image data, 48 x 48, 8-bit/color RGBA, non-interlaced test5_6_32x32x4.png: PNG image data, 32 x 32, 8-bit/color RGBA, non-interlaced test5_7_24x24x4.png: PNG image data, 24 x 24, 8-bit/color RGBA, non-interlaced test5_8_16x16x4.png: PNG image data, 16 x 16, 8-bit/color RGBA, non-interlaced test5_9_256x256x32.png: PNG image data, 256 x 256, 8-bit/color RGBA, non-interlaced root@debian:~# ls -alh *.png -rw-r--r-- 1 root root 15K May 8 16:34 test5_10_128x128x8.png -rw-r--r-- 1 root root 9.1K May 8 16:34 test5_11_96x96x8.png -rw-r--r-- 1 root root 18K May 8 16:34 test5_1_256x256x32.png -rw-r--r-- 1 root root 5.1K May 8 16:34 test5_12_64x64x8.png -rw-r--r-- 1 root root 3.6K May 8 16:34 test5_13_48x48x8.png -rw-r--r-- 1 root root 2.0K May 8 16:34 test5_14_32x32x8.png -rw-r--r-- 1 root root 1.3K May 8 16:34 test5_15_24x24x8.png -rw-r--r-- 1 root root 689 May 8 16:34 test5_16_16x16x8.png -rw-r--r-- 1 root root 76K May 8 16:34 test5_17_256x256x32.png -rw-r--r-- 1 root root 18K May 8 16:34 test5_18_128x128x32.png -rw-r--r-- 1 root root 12K May 8 16:34 test5_19_96x96x32.png -rw-r--r-- 1 root root 6.7K May 8 16:34 test5_20_64x64x32.png -rw-r--r-- 1 root root 5.7K May 8 16:34 test5_2_128x128x4.png -rw-r--r-- 1 root root 4.2K May 8 16:34 test5_21_48x48x32.png -rw-r--r-- 1 root root 2.3K May 8 16:34 test5_22_32x32x32.png -rw-r--r-- 1 root root 1.5K May 8 16:34 test5_23_24x24x32.png -rw-r--r-- 1 root root 783 May 8 16:34 test5_24_16x16x32.png -rw-r--r-- 1 root root 3.4K May 8 16:34 test5_3_96x96x4.png -rw-r--r-- 1 root root 1.9K May 8 16:34 test5_4_64x64x4.png -rw-r--r-- 1 root root 1.4K May 8 16:34 test5_5_48x48x4.png -rw-r--r-- 1 root root 736 May 8 16:34 test5_6_32x32x4.png -rw-r--r-- 1 root root 511 May 8 16:34 test5_7_24x24x4.png -rw-r--r-- 1 root root 308 May 8 16:34 test5_8_16x16x4.png -rw-r--r-- 1 root root 26K May 8 16:34 test5_9_256x256x32.png root@debian:~# exit Script done on Thu 08 May 2014 16:34:59 BST

