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: 10998
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2006-03-09T12:21:06-07:00

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: 10998
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2006-03-10T11:36:28-07:00

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