Page 1 of 1

Converting from ico

Posted: 2013-03-11T06:36:11-07:00
by skoll
Hi,

I need to convert a multi-resolution ico to a png. When I invoke the command

Code: Select all

convert image.ico image.png
I get several output files, one for each resolution in the ico.

When I invoke the command

Code: Select all

convert image.ico -thumbnail 64x64 -flatten image.png
I do get one file as output, but it seems to use the first resolution in the ico as input, which is the smallest one. With the files I'm using, it generates the 64x64 output based on 16x16 input.

How can I generate one png file, that's based on the 64x64 resolution bitmap that I know to exist inside the ico?

Thanks in advance.

Re: Converting from ico

Posted: 2013-03-11T07:13:47-07:00
by snibgo
I haven't any samples to test this, but you can probably use the [n] notation. eg ...

Code: Select all

convert image.ico[4] -thumbnail 64x64 -flatten image.png
... where "4" is whichever number for the one you want. If you don't know which number that is, you can probably find it from "identify -verbose".

Re: Converting from ico

Posted: 2013-03-11T12:01:10-07:00
by glennrp
snibgo wrote:I haven't any samples to test this, but you can probably use the [n] notation. eg ...

Code: Select all

convert image.ico[4] -thumbnail 64x64 -flatten image.png
... where "4" is whichever number for the one you want. If you don't know which number that is, you can probably find it from "identify -verbose".
Simply "identify file.ico" should work (without the "-verbose"). It'll list the dimensions for each "[n]".

Re: Converting from ico

Posted: 2013-03-12T00:44:04-07:00
by skoll
Thanks a lot! That's exactly what I was looking for.