Page 1 of 1

get a pseudoclass bmp / ico for windows

Posted: 2010-10-17T14:24:40-07:00
by jmduga
What do I set in the convert command to make a windows icon BMP file that is
BMP 16x16 16x16+0+0 8-bit PseudoClass 256c 1.3kb

longer:

I'm converting a several hundred images, trying to make a 16x16 windows ico icon file from each

They start like this:
JPEG 208x208 208x208+0+0 8-bit PseudoClass 256c 4.55kb (and similar, all jpegs, created with IM)

I run
/usr/bin/convert img/content_creator_thumb.jpg -thumbnail 16x16 icon.ico

and I get (identify icon.ico)
ICO 16x16 16x16+0+0 8-bit DirectClass 1.12kb

These don't load in the resulting windows software (its the uTorrent beta client for Windows)

I'm trying to get the resulting images to display within an application that uses windows libraries.
The example image that *works* is a bmp with pseudoclass
(identify -verbose here: http://209.237.247.1/other/attach/WORKING_VERBOSE.txt )
the working example is
BMP 16x16 16x16+0+0 8-bit PseudoClass 256c 1.3kb
a copy of the *working image* is here:
http://209.237.247.1/other/attach/WORKING.bmp

I need to find a way to make this kind of image from the IM convert command.

I've tried literally hundreds of different command line options, and the following formats
BMP
BMP2
BMP3
ico
icon

I've tried -type with all the options, and the resulting images do not have the type I specify


What do I set in the convert command to make a windows icon BMP file that is
BMP 16x16 16x16+0+0 8-bit PseudoClass 256c 1.3kb


Thank you...

Re: get a pseudoclass bmp / ico for windows

Posted: 2010-10-17T15:24:14-07:00
by fmw42
try adding -colors 256 (or less) and -type palette before the output

also see limitations on BMP in IM at http://www.imagemagick.org/Usage/formats/#bmp

This seems to work for me:

convert rose: -thumbnail 16x16! -colors 256 -type palette BMP3:rose.bmp

identify rose.bmp
rose.bmp BMP 16x16 16x16+0+0 8-bit PseudoClass 256c 1.62KB 0.000u 0:00.000


So does this:

convert rose: -thumbnail 16x16! -colors 256 -type palette rose2.bmp

identify rose2.bmp
rose2.bmp BMP 16x16 16x16+0+0 8-bit PseudoClass 256c 1.62KB 0.000u 0:00.000


IM 6.6.5.0 Q16 Mac OSX Tiger

Re: get a pseudoclass bmp / ico for windows

Posted: 2010-10-17T16:18:23-07:00
by el_supremo
@fred: the problem arises when you then convert the pseudoclass BMP to an ICO (or try to convert directly to ICO). The ICO becomes DirectClass even though the BMP is pseudoclass.

Pete