[Xcb] Displaying DIBs using xcb-util/xcb

Peter Harris git at peter.is-a-geek.org
Thu Jul 16 08:20:50 PDT 2009


On Thu, Jul 16, 2009 at 8:17 AM, Jeetu Golani wrote:
>
> I want to display a DIB onto an X server using XCB and I would
> appreciate if someone could give me pointers. I've been toying with
> the image libarary which is part of xcb-util though I don't mind using
> core xcb too. From what I understand the possible issues could include
> different depths between DIB and X Server and a need to convert

XCB/util does provide image conversion helpers that will change depth
and swap byte orders as necessary. What it does not do is handle any
sort of palette (depth 4 or depth 8 DIBs drawn onto a TrueColor
screen, or TrueColor DIBs drawn to a PseudoColor screen).

You may wish to look into an image utility library such as ImageMagick
if you need more flexible image format conversion. Also, looking at
the source code for xli <http://packages.debian.org/lenny/xli> may
provide some guidance.

Peter Harris


More information about the Xcb mailing list