# HG changeset patch # User Claus Gittinger # Date 1503591349 -7200 # Node ID bd826e508822d142ff78438a68001d12a0bdc924 # Parent 5d1d7e85222c5f3cb28babb7572f7574312ef1eb #DOCUMENTATION by cg class: ImageEditor changed: #colorMapMode: fixed conversion of 8-to-32 plane diff -r 5d1d7e85222c -r bd826e508822 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