Page 1 of 1

Formatting "damaged" ICO files

Posted: 2012-03-31T04:00:32-07:00
by chturne
Hi,

Please excuse my ignorance with image file formats, but I've noticed some smelly behaviour whilst using ImageMagick.

I have some .ICO files which I can view with gPhoto, the IDENTIFY command fails with them. Whilst perplexing, that's not my question today, my question concerns the semantics of -format when dealing with "damaged" .ICO files.

Meet r.ico, he's not feeling well:

Code: Select all

$ identify r.ico
r.ico[0] ICO 256x256 256x256+0+0 8-bit DirectClass 285KB 0.020u 0:00.019
... this goes on 13 more times trying different dimensions
From shell scripts, the following behavioir is annoying me:

Code: Select all

$ identify -format "%i" r.ico 
r.icor.icor.icor.icor.icor.icor.icor.icor.icor.icor.icor.icor.icor.icor.icor.icor.ico
I can understand why that happened (it matches the 14 occurrence above), but this seems inappropriate behaviour, even for r.ico.

Thanks for your patience,
Charles.

Re: Formatting "damaged" ICO files

Posted: 2012-03-31T18:29:27-07:00
by glennrp
It's not "trying" different sizes, it's just showing you all the sizes that are in the file.