How do I find out if a ICO contains multi layers?

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
Cat
Posts: 2
Joined: 2012-09-28T08:01:07-07:00
Authentication code: 67789

How do I find out if a ICO contains multi layers?

Post by Cat »

I have been using GetImageInformation and GetConvertedImage to try figure out if my ICO contains multi layers (Using another drawing tool I know my ICO is valid and contains several resolutions) but those functions are not returning me anything. In fact I never return from those functions and my application fails silently. Do you know what function I should be calling to figure out the format of the image and whether the ICO contains multiple resolutions>
Thanks
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: How do I find out if a ICO contains multi layers?

Post by anthony »

Just identify the image. if the image contains multiple images, identify will list them.

Alternativally you can use %n in a -format to just get the number of images IM found.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply