# HG changeset patch # User Claus Gittinger # Date 1056189618 -7200 # Node ID 8c626d7844941a441f40ab865f5087cdfa2ba453 # Parent 7117789f3020e88b70ff41e8141e97cc54641337 color reduction algorithm fixed diff -r 7117789f3020 -r 8c626d784494 ImageEditor.st --- a/ImageEditor.st Tue May 20 18:55:39 2003 +0200 +++ b/ImageEditor.st Sat Jun 21 12:00:18 2003 +0200 @@ -3888,7 +3888,7 @@ ! reduceNumberOfColors - |s n anyChange img| + |s n anyChange img usedColors| s := Dialog request:'Number of color bits to strip (1-7) ?'. s size == 0 ifTrue:[^ self]. @@ -3910,7 +3910,12 @@ "/ self listOfColors contents:(img colorMap). "/ self findColorMapMode. "/ self updateLabelsAndHistory. - Dialog information:(img usedColors size printString , ' colors used.') + usedColors := img usedColorsMax:10000. + usedColors size == 10000 ifTrue:[ + Dialog information:('>= ' , usedColors size printString , ' colors used.') + ] ifFalse:[ + Dialog information:(usedColors size printString , ' colors used.') + ] ] ]. !