# HG changeset patch # User Claus Gittinger # Date 1123092383 -7200 # Node ID c5068006116d1ec6486ff1414bd7e7d8dc0137c9 # Parent b3d2dab90f9b6ed1b8733ffd50183092de60a77f colors of deep images diff -r b3d2dab90f9b -r c5068006116d ImageEditor.st --- a/ImageEditor.st Tue Aug 02 17:41:38 2005 +0200 +++ b/ImageEditor.st Wed Aug 03 20:06:23 2005 +0200 @@ -2900,7 +2900,7 @@ findColorMapMode "finds the colorMapMode for a new image" - |image listOfColors colorMapModeKey drawColor1 drawColor2| + |image listOfColors colorMapModeKey drawColor1 drawColor2 someOrAllUsedColors| image := self image. @@ -2916,7 +2916,9 @@ image depth > 12 ifTrue:[ listOfColors removeAll. image colorMap isEmptyOrNil ifTrue:[ - listOfColors add:Color black; add:Color white. + someOrAllUsedColors := image usedColorsMax:10000. + listOfColors addAll:someOrAllUsedColors. + "/ listOfColors add:Color black; add:Color white. ] ifFalse:[ listOfColors addAll:(image colorMap). ].