pixel-iterator functions

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
harryspier
Posts: 6
Joined: 2012-06-17T17:10:46-07:00
Authentication code: 13

pixel-iterator functions

Post by harryspier »

I'm developing an OCR application and using the Wand C api. (I'm new to ImageMagick). I'm using MagickExportPixels on a grayscale (monochrome) image to extract the pixel data. It works just fine but I'd like to speed it up if I could and I noticed that there are also pixel iterator methods and pixel wand methods in the Wand C api.

1) What exactly are pixel iterator methods? I'm assuming that they are ways to iterate over a pixel array?

2) Can I use pixel iterator methods with pixel wand methods to extract the pixel data and if so would that be a faster method of extracting the pixel data than with MagickExportPixels?

Thanks,
Harry Spier
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: pixel-iterator functions

Post by anthony »

harryspier wrote:1) What exactly are pixel iterator methods? I'm assuming that they are ways to iterate over a pixel array?
yes. One pixel at a time. Typically used for color or level changes to an image on a per-pixel bases, without regard to the contents of neighbouring pixels.
2) Can I use pixel iterator methods with pixel wand methods to extract the pixel data and if so would that be a faster method of extracting the pixel data than with MagickExportPixels?
You can, but really it depends what you want the data for. You can write 'blobs' (image files in memory) using image file coders too.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply