--- a/ImageEditor.st Mon Sep 14 20:00:14 1998 +0200
+++ b/ImageEditor.st Tue Sep 15 18:39:38 1998 +0200
@@ -2072,11 +2072,23 @@
self information:('Compress colorMap: %1 colors used.' bindWith:usedColors size).
self withExecuteCursorDo:[
- newColorMap := Array new:usedColors size.
+"/ newColorMap := Array new:usedColors size.
"/ translation table
oldToNew := ByteArray new:(1 bitShift:depth).
newColorMap := usedColors asArray.
+ newColorMap sort:[:a :b |
+ a redByte == b redByte ifTrue:[
+ a greenByte == b greenByte ifTrue:[
+ a blueByte < b blueByte
+ ] ifFalse:[
+ a greenByte < b greenByte
+ ]
+ ] ifFalse:[
+ a redByte < b redByte
+ ]
+ ].
+
oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr |
|newPixel|
@@ -2131,7 +2143,7 @@
]
"Created: / 28.7.1998 / 20:03:11 / cg"
- "Modified: / 31.7.1998 / 01:13:57 / cg"
+ "Modified: / 15.9.1998 / 17:53:32 / cg"
! !
!ImageEditor methodsFor:'user actions - editing'!