On Sat, 15 Jun 2002, Mark Vojkovich wrote: > On Sun, 16 Jun 2002, Yuri van Oers wrote: > > On Sat, 15 Jun 2002, Mark Vojkovich wrote: > > > On Sat, 15 Jun 2002, Yuri van Oers wrote: > > > > > > > There has to be some way of blitting a simple RGB image to a window, > > > > without the use of something like Qt or Gtk, hasn't there? > > > > (Main reason for not using Qt et al. is speed.) > > > > > > XShmPutImage. Or XPutImage if not local or shared memory is not > > > available. XShmPutImage can be considerably faster for local > > > connections. > > > > What should I use; ZPixmap? In that case, what's the RGB format; ARGB or > > something else (I need RGB)? > > ZPixmap. XImages aren't RGB per se, they are pixel data that > gets interpreted according to the visual. So if you're using them > with a Window that has a TrueColor visual you'll want them to > match the RGB masks for that visual. See the man page on XVisualInfo > for determining the RGB masks associated with a visual.
I see my first thoughts weren't all that wrong. Querying visuals, I get (among others): Visual 1: ID: 33 screen: 0 depth: 24 red mask: FF0000 green mask: FF00 blue mask: FF colormap size: 256 bits per rgb: 8 According to xdpyinfo, the class is Truecolor. This looks like what I need to me. But reality disagrees. A fabricated image, with a red bar at the top, a green bar in the middle and a blue bar at the bottom, is displayed as a picture with the first three pixels blue, green and red pixel respectively, then repeated in the whole image: RRRRRRRRRRR rgbrgbrgbrgbrg RRRRRRRRRRR brgbrgbrgbrgbr GGGGGGGGGGG -> gbrgbrgbrgbrgb GGGGGGGGGGG rgbrgbrgbrgbrg BBBBBBBBBBB brgbrgbrgbrgbr BBBBBBBBBBB gbrgbrgbrgbrgb This looks like packed information is interpreted as planed. What am I doing wrong? Thanks, Yuri _______________________________________________ Xpert mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/xpert
