ImageEditor.st
changeset 3461 bd826e508822
parent 3460 5d1d7e85222c
child 3462 e9eb914481b7
equal deleted inserted replaced
3460:5d1d7e85222c 3461:bd826e508822
  6618                     ].
  6618                     ].
  6619                 
  6619                 
  6620                 image := newImage
  6620                 image := newImage
  6621             ].
  6621             ].
  6622         ] do:[ 
  6622         ] do:[ 
  6623             image := newImage 
  6623             |newPhotometric|
  6624                         fromImage:oldImage 
  6624 
  6625                         photometric:((newColorMap notNil and:[newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]])
  6625             depth == 32 ifTrue:[
  6626                                         ifTrue:[#palette]
  6626                 newPhotometric := #rgba.
  6627                                         ifFalse:[nil]).
  6627             ] ifFalse:[
  6628                          "/ -- nope; keep the newly determined photometric. photometric:oldImage photometric.
  6628                 (newColorMap notNil and:[newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]]) ifTrue:[
       
  6629                     newPhotometric := #palette
       
  6630                 ]
       
  6631             ]. 
       
  6632             self halt.
       
  6633             image := newImage fromImage:oldImage photometric:newPhotometric.
       
  6634             "/ -- nope; keep the newly determined photometric. image photometric:oldImage photometric.
  6629         ].
  6635         ].
  6630 
  6636 
  6631         (aMode asString startsWith:'mask') ifTrue:[
  6637         (aMode asString startsWith:'mask') ifTrue:[
  6632             image mask isNil ifTrue:[
  6638             image mask isNil ifTrue:[
  6633                 (oldImage depth == 32 and:[ oldImage photometric == #rgba ]) ifTrue:[
  6639                 (oldImage depth == 32 and:[ oldImage photometric == #rgba ]) ifTrue:[
  6673         (imageEditView image: image) notNil ifTrue:[
  6679         (imageEditView image: image) notNil ifTrue:[
  6674             self fetchImageData.
  6680             self fetchImageData.
  6675         ]
  6681         ]
  6676     ]
  6682     ]
  6677 
  6683 
  6678     "Modified: / 11-04-2017 / 01:45:55 / cg"
  6684     "Modified: / 24-08-2017 / 18:15:18 / cg"
  6679 !
  6685 !
  6680 
  6686 
  6681 colorize
  6687 colorize
  6682     "interactive Hue editing"
  6688     "interactive Hue editing"
  6683 
  6689