views:

185

answers:

1

I have an integer array with a gray scale image and I need to show it in my application. I'm programing in C++ with gtkmm and I can't find any widget like a canvas that allow you to show and access each pixel in the image.

A: 

As far as I understand you need to use the following class with constructor:

Gdk::Bitmap::Bitmap(const char *data, int width, int height)

to create bitmap and load your data into it.

Later you can use Gdk::Pixmap or Gdk::Window to draw. There is also Pixbuf class to store pixels.

Sergei
Bitmap is for black and white images, but I need grayscale; for this can be good Pixmap. But my trouble is that I need an easy and fast way to get and change pixel by pixel in te screen.
NachoV