ImageEditor.st
changeset 1770 9000adb21f79
parent 1769 8782d5b6dc24
child 1774 cb9832e71cae
equal deleted inserted replaced
1769:8782d5b6dc24 1770:9000adb21f79
  3548                 (self confirm:'Generate mask from black ?') ifTrue:[
  3548                 (self confirm:'Generate mask from black ?') ifTrue:[
  3549                     maskThreshold := 0.1.
  3549                     maskThreshold := 0.1.
  3550                     maskImage := Depth1Image fromImage:(image asThresholdMonochromeImage:maskThreshold). 
  3550                     maskImage := Depth1Image fromImage:(image asThresholdMonochromeImage:maskThreshold). 
  3551                 ] ifFalse:[
  3551                 ] ifFalse:[
  3552                     maskImage := Depth1Image extent:image extent.
  3552                     maskImage := Depth1Image extent:image extent.
  3553                     maskImage data:(ByteArray 
  3553                     maskImage bits:(ByteArray 
  3554                                         new:(maskImage bytesPerRow * maskImage height)
  3554                                         new:(maskImage bytesPerRow * maskImage height)
  3555                                         withAll:16rFF).
  3555                                         withAll:16rFF).
  3556 
  3556 
  3557 "/                    maskImage fillRectangle:(image bounds) withColor:(Color colorId:1).
  3557 "/                    maskImage fillRectangle:(image bounds) withColor:(Color colorId:1).
  3558                 ].
  3558                 ].