#BUGFIX
authormatilk
Mon, 22 Feb 2016 16:04:01 +0100
changeset 7156 97b4f12aa796
parent 7147 e914d0679641
child 7157 9c370b5a2596
child 7162 748069482527
#BUGFIX class: Image changed: #fromImage:photometric: support converting from rgba to rgb
Image.st
--- a/Image.st	Tue Feb 16 12:24:58 2016 +0100
+++ b/Image.st	Mon Feb 22 16:04:01 2016 +0100
@@ -5640,7 +5640,11 @@
         photometric := self class defaultPhotometric
         "/ photometric := anImage photometric
     ] ifFalse:[
-        photometric := photometricOrNil
+        photometricOrNil == #rgba ifTrue:[
+            samplesPerPixel == 3 ifTrue:[ photometric := #rgb ]
+        ] ifFalse:[
+            photometric := photometricOrNil
+        ].
     ].
 
     photometric == #palette ifTrue:[