MagickGetImagePixels for multiple scene images (MagickCore)

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
seanburke1979

MagickGetImagePixels for multiple scene images (MagickCore)

Post by seanburke1979 »

I have a tiff with multiple layers (scenes, in the IM parlance). I am looking to get the pixels values of each scene with something like MagickGetImagePixels but I can't figure out how to increment the scene in the wand. Has anyone tried this? Would MagickSetImageScene be the right call?

Thanks!

Sean
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: MagickGetImagePixels for multiple scene images (MagickCore)

Post by magick »

To iterate over your images use something like this:

Code: Select all

  MagickResetIterator(magick_wand);
  while (MagickNextImage(magick_wand) != MagickFalse)
    (void) fprintf(stdout,"index %ld scene %lu\n",
      MagickGetIteratorIndex(magick_wand),MagickGetImageScene(magick_wand));
Post Reply