color reduction algorithm fixed
authorClaus Gittinger <cg@exept.de>
Sat, 21 Jun 2003 12:00:18 +0200
changeset 1727 8c626d784494
parent 1726 7117789f3020
child 1728 8247a19e2262
color reduction algorithm fixed
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.')
+            ]
         ]
     ].
 !