#BUGFIX by cg
authorClaus Gittinger <cg@exept.de>
Tue, 22 Nov 2016 03:45:03 +0100
changeset 3356 10e247f059f1
parent 3355 47dfcea38127
child 3357 97c7ed5950e5
#BUGFIX by cg class: ImageEditor changed: #colorMapMode: preserve colormap, when converting down
ImageEditor.st
--- a/ImageEditor.st	Tue Nov 22 01:50:12 2016 +0100
+++ b/ImageEditor.st	Tue Nov 22 03:45:03 2016 +0100
@@ -5393,6 +5393,7 @@
                     ^ self   "/ cancel
                 ].
             ].
+            newColorMap := oldImage colorMap.
         ].
 
         imageEditView makeUndo.
@@ -5452,7 +5453,12 @@
                 image := newImage
             ].
         ] do:[ 
-            image := newImage fromImage:oldImage "/ -- nope; keep the newly determined photometric. photometric:oldImage photometric.
+            image := newImage 
+                        fromImage:oldImage 
+                        photometric:(newColorMap notNil
+                                        ifTrue:[#palette]
+                                        ifFalse:[nil]).
+                         "/ -- nope; keep the newly determined photometric. photometric:oldImage photometric.
         ].
 
         (aMode asString startsWith:'mask') ifTrue:[
@@ -5500,7 +5506,7 @@
         ]
     ]
 
-    "Modified: / 21-11-2016 / 16:34:03 / cg"
+    "Modified: / 22-11-2016 / 03:44:00 / cg"
 !
 
 colorize