From 7119bcd8d46f21d20e55deeba2e0f9b7fa4737ef Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Sun, 13 Jul 2008 16:18:26 +0000 Subject: [PATCH] Fix bytes order on big endian. Patch by Benjamin Jacobs. Fixes bug 2008-07-13 Carlos Garcia Campos * libdocument/ev-document-misc.c: (ev_document_misc_pixbuf_from_surface): Fix bytes order on big endian. Patch by Benjamin Jacobs. Fixes bug #540950. svn path=/trunk/; revision=3069 --- ChangeLog | 8 ++++++++ libdocument/ev-document-misc.c | 8 ++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 04adffd6..56d3a40a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-07-13 Carlos Garcia Campos + + * libdocument/ev-document-misc.c: + (ev_document_misc_pixbuf_from_surface): + + Fix bytes order on big endian. Patch by Benjamin Jacobs. Fixes bug + #540950. + 2008-07-11 Nickolay V. Shmyrev * backend/comics/comics-document.c (comics_document_load): diff --git a/libdocument/ev-document-misc.c b/libdocument/ev-document-misc.c index 133a6c6a..7898a8cd 100644 --- a/libdocument/ev-document-misc.c +++ b/libdocument/ev-document-misc.c @@ -220,10 +220,10 @@ ev_document_misc_pixbuf_from_surface (cairo_surface_t *surface) p[3] = (has_alpha) ? p[3] : 0xff; #else tmp = p[0]; - p[0] = (has_alpha) ? p[3] : 0xff; - p[3] = p[2]; - p[2] = p[1]; - p[1] = tmp; + p[0] = p[1]; + p[1] = p[2]; + p[2] = p[3]; + p[3] = (has_alpha) ? tmp : 0xff; #endif p += pixbuf_n_channels; } -- 2.43.5