Note that there are some explanatory texts on larger screens.

plurals
  1. POImageMagick Reflection
    primarykey
    data
    text
    <p>Brief:</p> <pre><code>convert ( -size 585x128 gradient: ) NewImage.png </code></pre> <p>How do I change the above ImageMagick command so it takes the width and height from an existing image? I need it to remain a one line command.</p> <hr> <p>Details:</p> <p>I'm trying to programatically create an image reflection using ImageMagick. The effect I am looking for is similar to what you would see when looking at an object on the edge of a pool of water. There is a pretty good thread on what I am trying to do <a href="http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&amp;t=11585" rel="nofollow noreferrer">here</a> but the solution isn't exactly what I am looking for. Since I will be calling ImageMagick from a C#.Net application I want to use one call without any temp files and return the image through stdout. So far I have this...</p> <pre><code>convert OriginalImage.png ( OriginalImage.png -flip -blur 3x5 \ -crop 100%%x30%%+0+0 -negate -evaluate multiply 0.3 \ -negate ( -size 585x128 gradient: ) +matte -compose copy_opacity -composite ) -append NewImage.png </code></pre> <p>This works ok but doesn't give me the exact fade I am looking for. Instead of a nice solid fade from top to bottom it is giving me a fade from top left to bottom right. I added the (-negate -evaluate multiply 0.3 -negate) section in to lighten it up a bit more since I wasn't getting the fade I wanted. I also don't want to have to hard code in the size of the image when creating the gradient ( -size 585x128 gradient: ) I'm also going to want to keep the original image's transparency if possible.</p> <p>To go to stdout I plan on replacing "NewImage.png" with "-"</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload