# HG changeset patch # User Claus Gittinger # Date 1484158808 -3600 # Node ID c88532134a2b181a53abfc1b31a564385da1a751 # Parent 31415966af416a70b08df927b8bdf1a683214796 #BUGFIX by cg class: ImageEditor changed: #colorMapMode: diff -r 31415966af41 -r c88532134a2b ImageEditor.st --- a/ImageEditor.st Wed Jan 11 22:26:17 2017 +0000 +++ b/ImageEditor.st Wed Jan 11 19:20:08 2017 +0100 @@ -5313,7 +5313,11 @@ (aMode == #depth24 or:[aMode == #masked24]) ifTrue:[ depth := 24. ] ifFalse:[ - depth := (newColorMap size log:2) asInteger. + (aMode == #depth16 or:[aMode == #masked16]) ifTrue:[ + depth := 16. + ] ifFalse:[ + depth := (newColorMap size log:2) asInteger. + ]. ]. ]. @@ -5477,7 +5481,7 @@ ] do:[ image := newImage fromImage:oldImage - photometric:(newColorMap notNil + photometric:((newColorMap notNil and:[newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]]) ifTrue:[#palette] ifFalse:[nil]). "/ -- nope; keep the newly determined photometric. photometric:oldImage photometric.