ImageEditor.st
changeset 1393 c4a11a7d407f
parent 1392 f6f7a70c5d41
child 1398 284781677ae1
equal deleted inserted replaced
1392:f6f7a70c5d41 1393:c4a11a7d407f
  2246             ].
  2246             ].
  2247         ].
  2247         ].
  2248 
  2248 
  2249         imageEditView makeUndo.
  2249         imageEditView makeUndo.
  2250 
  2250 
  2251         newImage    := (Image implementorForDepth: depth) new.  
  2251         newImage    := Image newForDepth:depth.  
  2252         oldFileName := oldImage fileName.
  2252         oldFileName := oldImage fileName.
  2253 
  2253 
  2254         Image imageErrorSignal handle:[:ex|
  2254         Image imageErrorSignal handle:[:ex|
  2255             Color colorErrorSignal handle:[:ex|
  2255             Color colorErrorSignal handle:[:ex|
  2256                 imageEditView undo.
  2256                 imageEditView undo.
  2257                 ^ self warn:(resources string:'Conversion failed !!')
  2257                 ^ self warn:(resources string:'Conversion failed !!')
  2258             ] do:[
  2258             ] do:[
  2259                 newImage := (Image implementorForDepth: depth) new.
  2259                 newImage := Image newForDepth:depth.
  2260                 newImage width:oldImage width height:oldImage height depth:depth.
  2260                 newImage width:oldImage width height:oldImage height depth:depth.
  2261                 newImage colorMap:newColorMap.
  2261                 newImage colorMap:newColorMap.
  2262                 newImage photometric:#palette.
  2262                 newImage photometric:#palette.
  2263                 newImage bits:(ByteArray new:(newImage bytesPerRow * newImage height)).
  2263                 newImage bits:(ByteArray new:(newImage bytesPerRow * newImage height)).
  2264             
  2264