#DOCUMENTATION by cg draft
authorClaus Gittinger <cg@exept.de>
Thu, 24 Aug 2017 18:15:49 +0200
changeset 3461 bd826e508822
parent 3460 5d1d7e85222c
child 3462 e9eb914481b7
#DOCUMENTATION by cg class: ImageEditor changed: #colorMapMode: fixed conversion of 8-to-32 plane
ImageEditor.st
--- a/ImageEditor.st	Thu Aug 24 17:55:36 2017 +0200
+++ b/ImageEditor.st	Thu Aug 24 18:15:49 2017 +0200
@@ -6620,12 +6620,18 @@
                 image := newImage
             ].
         ] do:[ 
-            image := newImage 
-                        fromImage:oldImage 
-                        photometric:((newColorMap notNil and:[newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]])
-                                        ifTrue:[#palette]
-                                        ifFalse:[nil]).
-                         "/ -- nope; keep the newly determined photometric. photometric:oldImage photometric.
+            |newPhotometric|
+
+            depth == 32 ifTrue:[
+                newPhotometric := #rgba.
+            ] ifFalse:[
+                (newColorMap notNil and:[newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]]) ifTrue:[
+                    newPhotometric := #palette
+                ]
+            ]. 
+            self halt.
+            image := newImage fromImage:oldImage photometric:newPhotometric.
+            "/ -- nope; keep the newly determined photometric. image photometric:oldImage photometric.
         ].
 
         (aMode asString startsWith:'mask') ifTrue:[
@@ -6675,7 +6681,7 @@
         ]
     ]
 
-    "Modified: / 11-04-2017 / 01:45:55 / cg"
+    "Modified: / 24-08-2017 / 18:15:18 / cg"
 !
 
 colorize