--- a/ImageEditor.st Thu Oct 01 09:45:36 2015 +0200
+++ b/ImageEditor.st Mon Oct 05 09:17:20 2015 +0200
@@ -5281,10 +5281,14 @@
prevMode := colorMapMode value.
newColorMap := self class listOfColorMaps at:aMode.
- aMode == #depth32 ifTrue:[
+ (aMode == #depth32 or:[aMode == #masked32]) ifTrue:[
depth := 32.
] ifFalse:[
- depth := (newColorMap size log:2) asInteger.
+ (aMode == #depth24 or:[aMode == #masked24]) ifTrue:[
+ depth := 24.
+ ] ifFalse:[
+ depth := (newColorMap size log:2) asInteger.
+ ].
].
useNearest := false.
@@ -5391,6 +5395,17 @@
newImage := Image newForDepth:depth.
newImage depth:depth.
+ depth >= 16 ifTrue:[
+ depth == 32 ifTrue:[
+ newImage colorMap:nil.
+ newImage samplesPerPixel:4.
+ newImage photometric:#rgba.
+ ] ifFalse:[
+ newImage colorMap:nil.
+ newImage samplesPerPixel:3.
+ newImage photometric:#rgb.
+ ].
+ ].
"/ newImage photometric:oldImage photometric.
oldFileName := oldImage fileName.