Still not understanding pixmaps vs RGBs



Sorry, I'm probably missing something major, but I don't see what pixmaps gain me and I'd be really appreciative of some more explanation. Currently my application works like this:

* Render content into an RGB buffer (Still image decoding and some special postprocessing). This buffer is the size of the source image, not the screen size. * Decimate or expand content, using my own hand-rolled code, into a second RGB buffer that is screen-sized. * Draw the RGB buffer into a darea that covers the whole screen (this step is slow).

One of the reasons I wanted to move to pixmaps is that someone here recently told me the pixmap functions support resizing. However, they don't. gdk_draw_pixmap is a 1:1 copy (possibly with clipping). Are there functions, maybe in XLib, that will do pixmap resizing (scaling) for me? My decimation/expansion code is horribly inefficient, I think.

One of the other reasons I wanted to move to pixmaps is that they are the same memory layout as the screen, which is 16bpp - so I'd have 30% less data to move around compared to the same sized RGB buffer. So I wanted access to the internal structure of the pixmap, on the assumption that it was internally a header (dimensions, depth, phase of the moon information) followed by a flat display-format buffer.

Is a pixmap something like a PICT on the Macintosh, i.e. more like a metafile format than just a frame buffer? Or is it like a device-dependent bitmap on Windows?

--
-- Lewin A.R.W. Edwards (Embedded Engineer)
Work     http://www.digi-frame.com/
Personal http://www.larwe.com/
Tel (914) 937-4090 9am-6pm ET M-F





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