equal
deleted
inserted
replaced
3852 ] |
3852 ] |
3853 ]. |
3853 ]. |
3854 ((prevMode = aMode) |
3854 ((prevMode = aMode) |
3855 or:[depth > oldImage depth |
3855 or:[depth > oldImage depth |
3856 or:[self confirm:(resources string:quest)]]) ifTrue:[ |
3856 or:[self confirm:(resources string:quest)]]) ifTrue:[ |
3857 (newColorMap isFixedPalette) ifFalse:[ |
3857 (newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[ |
3858 |
3858 |
3859 "/ keep the colormap |
3859 "/ keep the colormap |
3860 newColorMap atAllPut:Color black. |
3860 newColorMap atAllPut:Color black. |
3861 depth > oldImage depth ifTrue:[ |
3861 depth > oldImage depth ifTrue:[ |
3862 "/ easy - simply copy the part |
3862 "/ easy - simply copy the part |
3998 ]. |
3998 ]. |
3999 ] ifFalse:[ |
3999 ] ifFalse:[ |
4000 image mask: nil. |
4000 image mask: nil. |
4001 ]. |
4001 ]. |
4002 |
4002 |
4003 newColorMap isFixedPalette ifFalse:[ |
4003 (newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[ |
4004 realColorMap := OrderedCollection new. |
4004 realColorMap := OrderedCollection new. |
4005 image realColorMap do:[:clr| |
4005 image realColorMap do:[:clr| |
4006 (realColorMap includes: clr) ifFalse: [realColorMap add: clr] |
4006 (realColorMap includes: clr) ifFalse: [realColorMap add: clr] |
4007 ]. |
4007 ]. |
4008 newColors := realColorMap copyFrom: 1 to: (newColorMap size min: realColorMap size). |
4008 newColors := realColorMap copyFrom: 1 to: (newColorMap size min: realColorMap size). |