dshimer wrote: ↑2017-11-15T07:45:56-07:00I tried the same thing on a machine with 7.0.7-11 installed and the same exact command yields a file that has a hard edged mask which looks like a pure black and white mask with the transition being somewhere near a midpoint threshold of the grey values.
I've encountered the same issue using an input image, a gradient mask the same size as the input, and a command like this...
Code: Select all
magick in.tif -write-mask mask.tif -level 30%,100%,0.7 +write-mask out.tif
The output has a hard edge division about half way down, with the modified image above and the original input below. It does seem to be incorrect behavior, but maybe I'm also misunderstanding how "-write-mask" is supposed to work.
Using IM 7.0.7-11 I can get the correct result you describe with a command like this...
Code: Select all
magick in.tif ( -clone 0 -level 30%,100%,0.7 ) mask.tif -composite out.tif
That reads the input image, modifies a clone of it inside the parentheses, reads the gradient mask image, then composites the modified clone over the original input using the mask to create the graduated effect.