Re: Getting pixels back out of a pixmap (getting them in is easy!)




Steve Baker <ssbaker@primenet.com> writes:

> Help! Once I've drawn on a pixmap, how can I get access to the pixels
> in memory? I'd like to be able to find out whether individual pixels
> are on or off. How can I do this?

Basically you want to use gdk_image_get() on your pixmap to retrieve
an image for the data, then you need to interpret the data in the
image - gdk_image_get_pixel() is the easy way.

See app/text_tool.c in the GIMP sources for an example.

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]