[Libdlo] udlfb flush on close (Was: Basic PNG and SVG display)

Sven Killig sven at killig.de
Tue May 26 12:41:57 PDT 2009


> -----Original Message-----
> From: libdlo-bounces at lists.freedesktop.org [mailto:libdlo-
> bounces at lists.freedesktop.org] On Behalf Of Phil Endecott
> Sent: Tuesday, May 26, 2009 8:27 PM
> To: libdlo at lists.freedesktop.org
> Subject: [Libdlo] udlfb flush on close (Was: Basic PNG and SVG display)
>
> (BTW, does anyone know how
> to convert an image to 565 16-bit raw RGB?  I was expecting there to be
> some pnmtorgb utility but I can't find one.  ImageMagick's convert will
> convert to 24- or 32-bpp raw RGB, but AFAICT Roberto's code doesn't yet
> support 24bpp.)

for a complete image (courtesy of Florian):

void DisplayLink::rgb24_to_rgb16( uint8_t* rgb24, uint8_t* rgb16, int count ) {
	for (int i = 0; i < count; i++) {
		uint8_t r = rgb24[i*3+0];
		uint8_t g = rgb24[i*3+1];
		uint8_t b = rgb24[i*3+2];
		rgb16[i*2+0] =  (r & 0xF8)       | ((g & 0xE0) >> 5);
		rgb16[i*2+1] = ((g & 0x1C) << 3) | ((b & 0xF8) >> 3);
	}
}

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3414 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/libdlo/attachments/20090526/49959910/attachment.bin 


More information about the Libdlo mailing list