From: Carlos Garcia Campos Date: Sun, 13 Jul 2008 16:18:26 +0000 (+0000) Subject: Fix bytes order on big endian. Patch by Benjamin Jacobs. Fixes bug X-Git-Tag: EVINCE_2_23_5~12 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=7119bcd8d46f21d20e55deeba2e0f9b7fa4737ef;p=evince.git 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 --- 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; }