I use the x11amp bmp.c file.
It creates a guchar table of size w*h*3, and endodes the image as a RGB
the it uses the gdk_draw_rgb_image function to put it into a Pixmap.
register guchar *ptr;
> In comp.os.linux.development.apps Fabien Derreal
> : Hi
> : I'm working on some gtk program which uses bmp skin
> : I can take the bmp file and translate it to a GdkPixmap and a GdkBitmap
> : represeting the image and the mask.
> : now, my pixmap is made of several images put together ( a 200x10 pixmap
> : 20 10x10 images)
> : I can cut the pixmap in pieces using gdk_pixmap_draw, but i didn't found
> : anything for the bitmap
> Are you sure that GdkBitmap is the thing you want?
> You are talkink about bmp files, which typically are not monochrome.
> In X11 Bitmaps usilly mean _bit_ maps, i.e. thing where pixel can be
> either on or off. On Windows they misleadingly call any raster graphic
> bitmap, when in X11 it is more accurately called Pixmap.
> So, you typically lose nothing but some amount of memory and CPU time
> if you use Pixmap, where Bitmap is enough. But if you program on Gtk,
> you shouldn't worry about performance and resource consuming.
> If you worry about it, you should at first look to normal X11 graphic
> Photographing a volcano is just about the most miserable thing you can do.
> -- Robert B. Goodman
> [Who has clearly never tried to use a PDP-10. Ed.]
Hey, do you guys know how to create a GdkPixmap from an XPixmap? I'm
trying to do some graphics work as a home hobby and I'd like to use GDK
to simplify all the window design elements. However, GDK only seems to
allow creation of a GdkPixmap from either XPM, Bitmaps or some weird
data format (which doesn't seem to be specified all that well). Is
there a way to just create an off-screen Pixmap with Xlib, and pass it