can someone please tell me how can I create this effect in imageMagick?
2 images, one as overlay with a gradient in the middle over the first image.

Thank you in advance.
Pim.
Code: Select all
convert image1 image2 \( -clone 1 -channel rgba -alpha transparent -sparse-color barycentric '0,0 white %w,0 black' \) -compose over -composite result
Code: Select all
convert 1.jpg 2.jpg \( -clone 1 -channel rgba -alpha transparent -sparse-color barycentric '0,0 white %w,0 black' \) -compose over -composite result.jpg
If you're using IM7 you should be using the command "magick" instead of "convert".pimboli wrote: ↑2018-10-05T04:49:10-07:00I am on IM7 on OSx:
convert --version
Version: ImageMagick 7.0.8-11 Q16 x86_64 2018-09-08 https://www.imagemagick.org
The command that you gave me does not work, I suppose it's related to IM7?
Code: Select all
magick in1.jpg in2.jpg ( -clone 0 -sparse-color barycentric "0,0 black %[w],0 white" ) -composite out.jpg
Code: Select all
magick 1.jpg 2.jpg \( -clone 1 -channel rgba -alpha transparent -sparse-color barycentric '0,0 white %w,0 black' \) -compose over -composite result.jpg
Here are the input images and the result.jpg:bash-3.2$ magick 1.jpg 2.jpg ( -clone 1 -channel rgba -alpha transparent -sparse-color barycentric '0,0 white %w,0 black' ) -compose over -composite result.jpg
bash: syntax error near unexpected token `('
How much of the ends and middle? 1/3, 1/3, 1/3? or some other portions?Could please tell me if you know how I could make the beginning and the end of the image "un-transparent" and only the middle part transparent gradient.
Yes 1/3, 1/3 , 1/3 would be good I think so.
In the example commands above there's a section inside parentheses. That's where you're creating the mask for the gradient overlay. You can use FX expressions in that "-sparse-color" operation to make the black and white start and end wherever you like. Here's a way to make that mask for a 1/3 solid first image, 1/3 fade to second image, and end with a 1/3 solid second image...
Code: Select all
... \( -clone 0 -sparse-color barycentric "%[fx:w*0.333],0 black %[fx:w*0.667],0 white" \) ...