Q: IdentifyImage for files containing multiple Images

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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

To identify each image in the list you must iterate over the list. Something like:

Code: Select all

for (next=image; next != (Image *) NULL; next=GetNextImageInList(next))
  IdentifyImage(next,...);
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

ImageMagick tries to determine what file format an image is in but can't always succeed. If the magic number does not confirm its format it tries to use the file extension (.ico means the image is in the ICO format). You can always force a format. For example,
  • ico:image.dat
tells ImageMagick the image format is ICO.
Post Reply