Picture

Short:

convert ( -size 585x128 gradient: )  NewImage.png

How do I modify the ImageMagick command above to take the width and height from an existing image? I need it to stay on one line.


More details:

I am trying to programmatically create a reflection of an image using ImageMagick. The effect I'm looking for is similar to what you see when viewing an object on the edge of a pool of water. There is a pretty good topic on what I'm trying to do here , but the solution is not quite what I am looking for. Since I will be calling ImageMagick from a C # .Net application, I want to use one call without temporary files and return the image via stdout. While I have it ...

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

, , . , , . (-negate -evaluate multiply 0.3 -negate), , . (- 585x128 :) , .

stdout, "NewImage.png" "-"

+5
3

#, , #. ImageMagick

command = String.Format("convert bar %1x%2",img.Width,img.Height)
+1

, -fx, .

0

, :

#!/bin/sh

gamma=$1
source=$2
destination=$3
size=`identify -format "%wx%h" $source`

convert $source \
  \( -size $size xc:none \
  \( \( -flip $source -crop $size+0+0 \) \
  -size $size gradient: -gamma $gamma \
  -compose copy_opacity -composite \) \
  -compose blend -composite \) \
  -append $destination
-1

All Articles