From 3b780cbf81e0dd6f27f58888a518e33d39265a6b Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Tue, 26 Jul 2011 22:54:50 -0700 Subject: Reverse color order in tracing support function to match reversal of colors in GdkPixmaps used. Fixes bug #815596. Fixed bugs: - https://launchpad.net/bugs/815596 (bzr r10508) --- src/trace/imagemap-gdk.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/trace/imagemap-gdk.cpp b/src/trace/imagemap-gdk.cpp index e217dd619..e5ff23ad0 100644 --- a/src/trace/imagemap-gdk.cpp +++ b/src/trace/imagemap-gdk.cpp @@ -190,9 +190,9 @@ RgbMap *gdkPixbufToRgbMap(GdkPixbuf *buf) { int alpha = (int)p[3]; int white = 255 - alpha; - int r = (int)p[0]; r = r * alpha / 256 + white; + int r = (int)p[2]; r = r * alpha / 256 + white; int g = (int)p[1]; g = g * alpha / 256 + white; - int b = (int)p[2]; b = b * alpha / 256 + white; + int b = (int)p[0]; b = b * alpha / 256 + white; rgbMap->setPixel(rgbMap, x, y, r, g, b); p += n_channels; -- cgit v1.2.3