changed:
authorClaus Gittinger <cg@exept.de>
Wed, 18 Jan 2012 14:19:35 +0100
changeset 2870 0f130285be97
parent 2869 aa4cdac32055
child 2871 23c3bb9d51be
changed: #findColorMapMode #updateColorsFromImage:
ImageEditor.st
--- a/ImageEditor.st	Wed Jan 18 11:36:38 2012 +0100
+++ b/ImageEditor.st	Wed Jan 18 14:19:35 2012 +0100
@@ -3594,7 +3594,7 @@
 
     image depth > 12 ifTrue:[
         newListOfColors := OrderedCollection new.
-        image colorMap isEmptyOrNil ifTrue:[
+        (image depth > 16 or:[image colorMap isEmptyOrNil]) ifTrue:[
             someOrAllUsedColors := image usedColorsMax:10000.
             someOrAllUsedColors notNil ifTrue:[
                 someOrAllUsedColors := someOrAllUsedColors asArray.
@@ -3632,7 +3632,8 @@
     self listOfColors asOrderedCollection ~= newListOfColors ifTrue:[
         self listOfColors contents:newListOfColors.
     ].
-    "Modified: / 07-07-2006 / 12:27:43 / cg"
+
+    "Modified: / 18-01-2012 / 13:58:38 / cg"
 !
 
 update:something with:aParameter from:changedObject
@@ -3766,15 +3767,22 @@
 updateColorsFromImage:image
     |colors|
 
+    image depth > 16 ifTrue:[
+        self listOfColors contents:#().
+        ^ self.
+    ].
+
     colors := image colorMap.
     colors isNil ifTrue:[
         Error handle:[:ex |
             colors := OrderedCollection new.
         ] do:[
             colors := image usedColors asSet.
-        ]
+        ].
     ].
     self listOfColors contents:(colors asOrderedCollection).
+
+    "Modified: / 18-01-2012 / 13:57:43 / cg"
 !
 
 updateForNoImage