简体   繁体   中英

Imagemagick not outputting reflection on windows

I am trying to do the same as described here http://www.imagemagick.org/Usage/advanced/#reflections

I am using imagemagick on windows and the command I am using is like this -

convert test3.jpg -alpha on -virtual-pixel transparent -clone 0 +distort Perspective "0,0,100,50 0,394,100,344 300,394,300,394 394,0,394,0" -clone 0  -channel A -evaluate multiply .35 +channel +distort Perspective "0,0,100,-50  0,394,100,344  300,394,300,394  394,0,394,0" -delete 0 +swap -background none  -layers merge +filter  -size "594x500^!" xc:none +swap -gravity North -geometry +0+5 -composite  reflect_distort_new.jpg

The actual image is

在此处输入图片说明

The result I am getting is like this -

在此处输入图片说明

I was wondering if any one can help me fixing the following issues -

  1. I want to add a reflection as explained in the example, but it does not appear with my command line. I have removed parenthesis from the -clone command as it was giving error on windows.
  2. How to remove the black background being added there?
  3. How to apply antialising as there are edges on the resultant image.

Ah Well, after trying 1000+ times, I got it correct -

convert magCover1.png -alpha on   -virtual-pixel transparent ^
  ( +clone -flip -channel A -evaluate multiply .35 +channel ) -append ^
  +distort Perspective "0,0,200,100 0,788,200,788 600,788,600,850 788,0,740,50" ^
  -gravity North  -crop "1094x1000+0-5^!" ^
  -background none -compose Over -flatten -transparent white  reflect_distort.png

I get the following result -

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM