summaryrefslogtreecommitdiffstats
path: root/src/trace/imagemap-gdk.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/trace/imagemap-gdk.cpp')
-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;