summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2011-07-27 05:54:50 +0000
committerJon A. Cruz <jon@joncruz.org>2011-07-27 05:54:50 +0000
commit3b780cbf81e0dd6f27f58888a518e33d39265a6b (patch)
treec13badcc49b10a5d83be763851bc68e3a06c3fad /src
parentCleaning up trace methods to aid fixing color inversion. (diff)
downloadinkscape-3b780cbf81e0dd6f27f58888a518e33d39265a6b.tar.gz
inkscape-3b780cbf81e0dd6f27f58888a518e33d39265a6b.zip
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)
Diffstat (limited to 'src')
-rw-r--r--src/trace/imagemap-gdk.cpp4
1 files changed, 2 insertions, 2 deletions
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;