"Zac Witte" on  wrote...
| I'm trying to use MagickWand to read in a .pgm file and get the grayscale
| intensities of each pixel into an array, but I'm having trouble figureing
| out how to get that pixel data once I read in the image. I'm using
| MagickReadImage() which works pretty well and I've verified it understands
| the image correctly by outputting it again as a .png file. But I've found
| the documentation lacking. I guess I can use GetImageFromMagickWand() to get
| an Image stuct, but I can't find the documentation for whats inside the
| Image and how to access the pixels. I've found this function called
| AcquireImagePixels(), but that gives me an array of PixelPackets and I can't
| find documentation for what a PixelPacket consists of and how to access its
| members. Plus, I have to somehow detect the image dimensions and generate
| this ExceptionInfo object. How do I then get those pixels into an int array?
| 
The "Architecture Overview" page
    http://www.imagemagick.org/script/architecture.php
which tells you how to make use of the low level  MagickCore functions.

It is NOT for use by  MagickWand  API programs.

For MagickWand see the introduction page...
   http://www.imagemagick.org/script/magick-wand.php
And in particular the Pixel Iterator Methods

The one example given, however is only for Wand Iterating (looping
though a list of images in a single wand.  (GIF's can be a multi-image
animation).

It does not list an examples of using the "Pixel Iterator Methods"
  http://www.imagemagick.org/api/pixel-iterator.php
which is used to go though the pixel data of an image.

I think however the above manual could use some basic examples page.
Say to explain how all various sets of functions fit together to read or
modify the pixels of an image.

Something simular to the one in the "Architecture Overview" for
MagickCore and using its "Pixel Cache" Methods.

Many of the current API function method could also use a quick example
too.  For example what does the output of
PixelGetColorAsNormalizedString() typically look like?

However as these are extracted from the library source, the small
example will have to be placed in that source for it to appear in the
manual.

| Has whoever is responsible for maintaining the documentation considered
| using something more similar to JavaDoc or Doxygen? Could make people's
| lives much easier.
| 
I think we need a volunter to generate a page of basic MagickWand
Examples for inclusion in the above documentation.

I myself don't use a lot of MagickWand, and have enough to do just
trying to document everything that is posible with the command line API
whcih intern shows how many of the MagickCore functions actually works.


  Anthony Thyssen ( System Programmer )    <[EMAIL PROTECTED]>
 -----------------------------------------------------------------------------
   "Effect-wise, I think its a modified three dimensional
                    holographic binary decomposion of a Mandelbrot set."
   "Kelvin?", Orson said.    "Yeah?"     "Get a life would you?"
                    --- Niven and Barnes, "Barzoom Project" (Dream Park)
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to