ImageEditor.st
changeset 958 14088f998b72
parent 956 dc4df8952e82
child 960 6196f12b97f6
equal deleted inserted replaced
957:c09018dc6954 958:14088f998b72
  1663         depth == 1 ifTrue:[
  1663         depth == 1 ifTrue:[
  1664             quest := 'Keep colormap (or use standard B&W)'
  1664             quest := 'Keep colormap (or use standard B&W)'
  1665         ] ifFalse:[
  1665         ] ifFalse:[
  1666             quest := 'Keep colormap (or use standard)'
  1666             quest := 'Keep colormap (or use standard)'
  1667         ].
  1667         ].
  1668         (self confirm:(resources string:quest)) ifTrue:[
  1668         ((colorMapMode == aMode)
       
  1669         or:[self confirm:(resources string:quest)]) ifTrue:[
  1669             "/ keep the colormap
  1670             "/ keep the colormap
  1670             depth > oldImage depth ifTrue:[
  1671             depth > oldImage depth ifTrue:[
  1671                 "/ easy - simply copy the part
  1672                 "/ easy - simply copy the part
  1672                 numColors := 1 bitShift:oldImage depth.
  1673                 numColors := 1 bitShift:oldImage depth.
  1673                 0 to:numColors-1 do:[:pixel |
  1674                 0 to:numColors-1 do:[:pixel |
  1811             self findColorMapMode.
  1812             self findColorMapMode.
  1812             self updateLabelsAndHistory.
  1813             self updateLabelsAndHistory.
  1813         ]
  1814         ]
  1814     ]
  1815     ]
  1815 
  1816 
  1816     "Modified: / 31.7.1998 / 18:53:26 / cg"
  1817     "Modified: / 17.8.1998 / 10:22:15 / cg"
  1817 !
  1818 !
  1818 
  1819 
  1819 compressColorMap
  1820 compressColorMap
  1820     "calculates a new color map for the image, using only used colors"
  1821     "calculates a new color map for the image, using only used colors"
  1821 
  1822