MagickSetImageIndex() and profiles

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
sacha
Posts: 17
Joined: 2012-04-12T14:37:19-07:00
Authentication code: 8675308

MagickSetImageIndex() and profiles

Post by sacha »

For some real-world images (usually TIFFs or TIFF-like images, e.g. NEF), we find that there are multiple images in the format, e.g. a preview thumbnail as well as the main image.

For our image processing we iterate through them using MagickGetNumberImages() and MagickSetIndex() looking for the largest one, and then proceed.

However, this appears to interfere with the MagickGetImageProfile() and MagickGetImageProperties() functions, because it seems profiles are associated with specific image indexes rather than the wand as a whole. So for example all the EXIF and IPTC data may be associated with the image at index 0 whereas the main image is at index 1.

My question is, can I assume the profiles will always be associated with index 0 (as seems to be the case) or should I iterate through the indexes again looking for profiles?

(I'm using ImageMagick 6.7.7 in case this was actually a bug.)
Post Reply