ImageEditor.st
changeset 921 a5aca21ea803
parent 920 bde5b9369ef8
child 926 04887448fab8
equal deleted inserted replaced
920:bde5b9369ef8 921:a5aca21ea803
  1522                     ].
  1522                     ].
  1523                 ]
  1523                 ]
  1524             ]
  1524             ]
  1525         ] ifFalse:[
  1525         ] ifFalse:[
  1526             "/ standard colormap
  1526             "/ standard colormap
       
  1527             usedColors := oldImage usedColors.
       
  1528             (usedColors conform:[:clr | newColorMap includes:clr]) ifFalse:[
       
  1529                 useNearest := Dialog 
       
  1530                                     confirmWithCancel:('Not all colors are present in the new colormap.\\Map missing ones to nearest (or map to black) ?'
       
  1531                                                        ) withCRs
       
  1532                                     labels:#('cancel' 'black' 'nearest').
       
  1533                 useNearest isNil ifTrue:[
       
  1534                     ^ self   "/ cancel
       
  1535                 ].
       
  1536             ].
  1527         ].
  1537         ].
  1528 
  1538 
  1529         imageEditView makeUndo.
  1539         imageEditView makeUndo.
  1530 
  1540 
  1531         newImage    := (Image implementorForDepth: depth) new.  
  1541         newImage    := (Image implementorForDepth: depth) new.  
  1606             self findColorMapMode.
  1616             self findColorMapMode.
  1607             self updateLabelsAndHistory.
  1617             self updateLabelsAndHistory.
  1608         ]
  1618         ]
  1609     ]
  1619     ]
  1610 
  1620 
  1611     "Modified: / 28.7.1998 / 21:51:24 / cg"
  1621     "Modified: / 28.7.1998 / 22:29:53 / cg"
  1612 !
  1622 !
  1613 
  1623 
  1614 compressColorMap
  1624 compressColorMap
  1615     "calculates a new color map for the image, using only used colors"
  1625     "calculates a new color map for the image, using only used colors"
  1616 
  1626