ImageEditor.st
changeset 3356 10e247f059f1
parent 3355 47dfcea38127
child 3357 97c7ed5950e5
equal deleted inserted replaced
3355:47dfcea38127 3356:10e247f059f1
  5391                 useNearest isNil ifTrue:[
  5391                 useNearest isNil ifTrue:[
  5392                     colorMapMode value:prevMode.
  5392                     colorMapMode value:prevMode.
  5393                     ^ self   "/ cancel
  5393                     ^ self   "/ cancel
  5394                 ].
  5394                 ].
  5395             ].
  5395             ].
       
  5396             newColorMap := oldImage colorMap.
  5396         ].
  5397         ].
  5397 
  5398 
  5398         imageEditView makeUndo.
  5399         imageEditView makeUndo.
  5399 
  5400 
  5400         newImage := Image newForDepth:depth.
  5401         newImage := Image newForDepth:depth.
  5450                     ].
  5451                     ].
  5451                 
  5452                 
  5452                 image := newImage
  5453                 image := newImage
  5453             ].
  5454             ].
  5454         ] do:[ 
  5455         ] do:[ 
  5455             image := newImage fromImage:oldImage "/ -- nope; keep the newly determined photometric. photometric:oldImage photometric.
  5456             image := newImage 
       
  5457                         fromImage:oldImage 
       
  5458                         photometric:(newColorMap notNil
       
  5459                                         ifTrue:[#palette]
       
  5460                                         ifFalse:[nil]).
       
  5461                          "/ -- nope; keep the newly determined photometric. photometric:oldImage photometric.
  5456         ].
  5462         ].
  5457 
  5463 
  5458         (aMode asString startsWith:'mask') ifTrue:[
  5464         (aMode asString startsWith:'mask') ifTrue:[
  5459             image mask isNil ifTrue:[
  5465             image mask isNil ifTrue:[
  5460                 false "(Dialog confirm:'Generate mask from black ?' default:false)" ifTrue:[
  5466                 false "(Dialog confirm:'Generate mask from black ?' default:false)" ifTrue:[
  5498         (imageEditView image: image) notNil ifTrue:[
  5504         (imageEditView image: image) notNil ifTrue:[
  5499             self fetchImageData.
  5505             self fetchImageData.
  5500         ]
  5506         ]
  5501     ]
  5507     ]
  5502 
  5508 
  5503     "Modified: / 21-11-2016 / 16:34:03 / cg"
  5509     "Modified: / 22-11-2016 / 03:44:00 / cg"
  5504 !
  5510 !
  5505 
  5511 
  5506 colorize
  5512 colorize
  5507     "interactive Hue editing"
  5513     "interactive Hue editing"
  5508 
  5514