The lcms2 16-to-8 bit transform/conversion codepath is supposed to set
the alpha channel to 0xFF.  Instead, it presently nukes everything but
the alpha channel, which causes all my preview widget view to come up
black.

Whoops.

>From 58c1d6038eac35c5ad00fb69fd2b018b0221ba3d Mon Sep 17 00:00:00 2001
From: John Sheu <[email protected]>
Date: Mon, 28 May 2012 02:37:58 -0700
Subject: [PATCH] Fix lcms2 16-to-8 conversion alpha channel

---
 plugins/colorspace-transform/rs-cmm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/plugins/colorspace-transform/rs-cmm.c
b/plugins/colorspace-transform/rs-cmm.c
index fe965fa..7c400f7 100644
--- a/plugins/colorspace-transform/rs-cmm.c
+++ b/plugins/colorspace-transform/rs-cmm.c
@@ -262,7 +262,7 @@ rs_cmm_transform8(RSCmm *cmm, RS_IMAGE16 *input,
GdkPixbuf *output, gint start_x
                /* Set alpha */
                guint *outi = (guint*) out;
                for (i = 0; i < w; i++)
-                       outi[i] &= 0xff000000;
+                       outi[i] |= 0xff000000;
        }
 }

-- 
1.7.3.4

_______________________________________________
Rawstudio-dev mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-dev

Reply via email to