Re: [gtk-list] GdkImage vs. GdkPixmap




The difference between image and pixmap comes from X.  The section of
the O'Reilly Xlib manual on XImage describes things well.  I'll
paraphrase.

Pixmaps live in the server, and come with a rich set of functions for
their manipulation (draw lines, arcs, text, etc.).  Images live in the
client, leaving all the work to the client (draw pixel, do color
conversion, etc.).

The Image is more appropriate when an application is doing all of the
pixel level operations itself anyway, e.g. a video application.
Making an X call for every pixel draw in a video frame would be too
much overhead.  

There are shared memory extensions for both images and pixmaps.
GdkImage automatically makes use of the image shared memory extension.
I don't know anything about shared pixmaps.

Also, there are Gtk+ things that live above images, like imlib
(Raster's image library) and GtkRgb (handles color conversions and
dithering).

-- Buck




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