--- 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.