php image reflection with gradient not working in imagemagick command line
Posted: 2017-05-09T02:16:09-07:00
I have original image like this
https://ibb.co/d9hGRQ
After running these commands
convert image.jpg -scale 310x496\! scaled.png
convert scaled.png +clone -flip -crop 310x150 -compose Dst -composite out/shadow.png
convert -size 310x150 -alpha set gradient:rgba\(255,0,255,0.6\)-rgba\(255,255,0,0.50\) out/grad.png
convert out/shadow.png out/grad.png -compose Dst_Out -composite out/shadow_gradiented.png
convert shadow_gradiented.png out/shadowed.png -append out/final.png
I am getting output like this
https://ibb.co/hbGzfk
But I need output like this.
https://ibb.co/h1tqmQ
What should I do the gradient is not applying correctly. Additionally Is there any way I can make all commands as one?
Thank you.
https://ibb.co/d9hGRQ
After running these commands
convert image.jpg -scale 310x496\! scaled.png
convert scaled.png +clone -flip -crop 310x150 -compose Dst -composite out/shadow.png
convert -size 310x150 -alpha set gradient:rgba\(255,0,255,0.6\)-rgba\(255,255,0,0.50\) out/grad.png
convert out/shadow.png out/grad.png -compose Dst_Out -composite out/shadow_gradiented.png
convert shadow_gradiented.png out/shadowed.png -append out/final.png
I am getting output like this
https://ibb.co/hbGzfk
But I need output like this.
https://ibb.co/h1tqmQ
What should I do the gradient is not applying correctly. Additionally Is there any way I can make all commands as one?
Thank you.