Image.st
changeset 7968 df68d662edff
parent 7967 fa34f3731d4e
child 7989 7f0a9dbd256e
--- a/Image.st	Mon Mar 06 14:49:50 2017 +0100
+++ b/Image.st	Tue Mar 07 07:29:26 2017 +0100
@@ -4680,7 +4680,7 @@
     ].
     self mask:anImage mask.
 
-    samePhotometric := photometric == anImage photometric.
+    samePhotometric := (photometric == anImage photometric).
     myDepth := self depth.
     otherDepth := anImage depth.
 
@@ -4722,7 +4722,9 @@
 
     "/ a hack, for now - alpha is in the low-byte !!!!!!
     (myDepth == 24 and:[otherDepth == 32]) ifTrue:[
-        (samePhotometric and:[photometric == #rgb]) ifTrue:[
+        ((samePhotometric and:[photometric == #rgb])
+          or:[ (photometric == #rgb and:[anImage photometric == #rgba]) ]
+        ) ifTrue:[
             "/ can do the bits by simple stripping off the alpha channel
             self copyPixels32AlphaLowTo24From:anImage.
 "/    anImage valuesFromX:0 y:0 toX:(width-1) y:(height-1) do:[:x :y :pixel |
@@ -4781,8 +4783,8 @@
      ]
     "
 
-    "Modified: / 22-11-2016 / 03:34:08 / cg"
     "Modified (format): / 30-01-2017 / 20:46:22 / stefan"
+    "Modified: / 07-03-2017 / 07:23:09 / cg"
 !
 
 fromSubImage:anImage in:aRectangle