librelist archives

« back to archive

Low Level pixel access via pgmagick

Low Level pixel access via pgmagick

From:
Indraniel Das
Date:
2013-02-22 @ 17:01
Hello,

I was wondering if it possible to perform low level pixel manipulations on
an image via pgmagick.  In particular, I would like to mimic the
functionality found in the C++ GraphicsMagick API shown here:

http://www.graphicsmagick.org/Magick++/Image.html#low-level-image-pixel-access

When I try the following:

    import pgmagick
    im = pgmagick.Image('cow.png')
    pixel_cache = im.getPixels(0,0,100,100)

I get an error like the following:

    AttributeError: 'Image' object has no attribute 'getPixels'

What would be the equivalent functionality in pgmagick?

Sincerely,
Indraniel