xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Opened 8 years ago

Closed 8 years ago

Last modified 16 months ago

#463 closed defect (fixed)

handle rgb modes without PIL

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 0.11
Component: server Version:
Keywords: Cc:


With older versions, we were grabbing the pixels using gdk pixbuf and it was doing the conversion to RGB(A) for us.

Now that we have XShm, we get pixel data in BGRA format (on small endian systems) and we therefore need to do the byteswapping ourselves (as clients expect RGB 24-bit or RGBA 32-bit). The code works fine using PIL, but since we don't require PIL as a hard dependency, the server should still work when it is missing.

The patch attached tries to do that:

  • forces PIL off (easier to test)
  • uses the argb module for the byteswapping
  • changes the argb module to access one int rather than one long at a time since we deal with 32-bit pixels

But doesn't seem to work...

Attachments (1)

rgb-no-PIL.patch (8.4 KB) - added by Antoine Martin 8 years ago.
try to convert to RGB without PIL

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by Antoine Martin

Attachment: rgb-no-PIL.patch added

try to convert to RGB without PIL

comment:1 Changed 8 years ago by Antoine Martin

Resolution: fixed
Status: newclosed


  • r4805 adds more byteswapping functions to the argb module and avoids reading with longs, which may read past the end of the buffer! (should be backported)
  • r4806 uses the argb module as fallback for PIL
  • r4807 + r4808 ensures the client tells the server which RGB modes are supported for the window: RGBA if we have transparency support, RGB otherwise (should be backported)

comment:2 Changed 8 years ago by Antoine Martin

Partial backport to v0.10.x in r4823

comment:3 Changed 16 months ago by migration script

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/463

Note: See TracTickets for help on using tickets.