Formatting "damaged" ICO files

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
chturne
Posts: 1
Joined: 2012-03-31T03:49:22-07:00
Authentication code: 8675308

Formatting "damaged" ICO files

Post 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.
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Formatting "damaged" ICO files

Post by glennrp »

It's not "trying" different sizes, it's just showing you all the sizes that are in the file.
Post Reply