From 3d888c2eb56da7e4143f48a2ea5b2f0296ef3c67 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 12 Aug 2015 21:08:44 -0700 Subject: [PATCH] GUAC-240: Byte order of pixels is BGR, not BRG. --- src/libguac/encode-jpeg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libguac/encode-jpeg.c b/src/libguac/encode-jpeg.c index e985059d..83f6cd8c 100644 --- a/src/libguac/encode-jpeg.c +++ b/src/libguac/encode-jpeg.c @@ -203,17 +203,17 @@ int guac_jpeg_write(guac_socket* socket, guac_stream* stream, #ifdef JCS_EXTENSIONS /* The Turbo JPEG extentions allows us to use the Cairo surface - * (BRGx) as input without converting it */ + * (BGRx) as input without converting it */ cinfo.input_components = 4; cinfo.in_color_space = JCS_EXT_BGRX; #else /* Standard JPEG supports RGB as input so we will have to convert - * the contents of the Cairo surface from (BRGx) to RGB */ + * the contents of the Cairo surface from (BGRx) to RGB */ cinfo.input_components = 3; cinfo.in_color_space = JCS_RGB; /* Create a buffer for the write scan line which is where we will - * put the converted pixels (BRGx -> RGB) */ + * put the converted pixels (BGRx -> RGB) */ int write_stride = cinfo.image_width * cinfo.input_components; unsigned char *scanline_data = malloc(write_stride); memset(scanline_data, 0, write_stride);