equal
deleted
inserted
replaced
6610 "/ -- nope; keep the newly determined photometric. photometric:oldImage photometric. |
6610 "/ -- nope; keep the newly determined photometric. photometric:oldImage photometric. |
6611 ]. |
6611 ]. |
6612 |
6612 |
6613 (aMode asString startsWith:'mask') ifTrue:[ |
6613 (aMode asString startsWith:'mask') ifTrue:[ |
6614 image mask isNil ifTrue:[ |
6614 image mask isNil ifTrue:[ |
6615 false "(Dialog confirm:'Generate mask from black ?' default:false)" ifTrue:[ |
6615 (oldImage depth == 32 and:[ oldImage photometric == #rgba ]) ifTrue:[ |
6616 maskThreshold := 0.1. |
6616 maskImage := ImageMask fromAlphaInImage:oldImage |
6617 maskImage := Depth1Image fromImage:(image asThresholdMonochromeImage:maskThreshold). |
6617 ] ifFalse:[ |
6618 ] ifFalse:[ |
6618 false "(Dialog confirm:'Generate mask from black ?' default:false)" ifTrue:[ |
6619 maskImage := ImageMask extent:image extent. |
6619 maskThreshold := 0.1. |
6620 maskImage bits:(ByteArray |
6620 maskImage := Depth1Image fromImage:(image asThresholdMonochromeImage:maskThreshold). |
6621 new:(maskImage bytesPerRow * maskImage height) |
6621 ] ifFalse:[ |
6622 withAll:16rFF). |
6622 maskImage := ImageMask extent:image extent. |
|
6623 maskImage bits:(ByteArray |
|
6624 new:(maskImage bytesPerRow * maskImage height) |
|
6625 withAll:16rFF). |
|
6626 ]. |
6623 ]. |
6627 ]. |
6624 image mask:maskImage. |
6628 image mask:maskImage. |
6625 ]. |
6629 ]. |
6626 ] ifFalse:[ |
6630 ] ifFalse:[ |
6627 image mask: nil. |
6631 image mask: nil. |
6651 (imageEditView image: image) notNil ifTrue:[ |
6655 (imageEditView image: image) notNil ifTrue:[ |
6652 self fetchImageData. |
6656 self fetchImageData. |
6653 ] |
6657 ] |
6654 ] |
6658 ] |
6655 |
6659 |
6656 "Modified: / 06-04-2017 / 13:23:26 / cg" |
6660 "Modified: / 11-04-2017 / 01:45:55 / cg" |
6657 ! |
6661 ! |
6658 |
6662 |
6659 colorize |
6663 colorize |
6660 "interactive Hue editing" |
6664 "interactive Hue editing" |
6661 |
6665 |