summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2007-06-07 17:23:41 +0000
committerMatthias Melcher <fltk@matthiasm.com>2007-06-07 17:23:41 +0000
commit38cc8c2f4da6ca58a5e745333d0de08d991492d5 (patch)
tree89f2999539fac5d80d5d43e5944e1af19d74271f
parenta914d9c27f352420a9fb9a24bb578cf4e09ed0d9 (diff)
Fixed rendering of grayscale images with alpha channel on unaccelerated machines. Thanks, Sanel (STR #1703)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5888 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--CHANGES2
-rw-r--r--src/Fl_Image.cxx2
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index ab3c6056b..280e7d1c3 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3,6 +3,8 @@ CHANGES IN FLTK 1.1.8
- Documentation fixes (STR #1454, STR #1455, STR #1456,
STR #1457, STR #1458, STR #1460, STR #1481, STR #1578,
STR #1639, STR #1645, STR #1644)
+ - Fixed rendering of grayscale images with alpha
+ channel (STR #1703)
- Fixed occasional incomplete refresh (STR #1681)
- Improved fl_down, fl_frame, added fl_box (STR #1678)
- Fixed selection of submenu items in
diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx
index b243eb274..553000fa8 100644
--- a/src/Fl_Image.cxx
+++ b/src/Fl_Image.cxx
@@ -344,7 +344,7 @@ static void alpha_blend(Fl_RGB_Image *img, int X, int Y, int W, int H, int cx, i
// Composite grayscale + alpha over RGB...
// Composite RGBA over RGB...
for (int y = H; y > 0; y--, srcptr+=srcskip)
- for (int x = W; x > 0; x--, dstptr+=3) {
+ for (int x = W; x > 0; x--) {
srcg = *srcptr++;
srca = *srcptr++;