I want to do the following distortion:
Is there a specific name for this?
Is there a built in tool to do it?
If I need to use -fx, could someone give me a hand with it?
Thanks all.
Newbie: Help with Arc distortion variant
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Newbie: Help with Arc distortion variant
see barrel distortion http://www.imagemagick.org/Usage/distorts/#barrel
see Anthony's rose examples
you need to combine half of two images, top half of bulge (barrel) and bottom half of pinch (pincushion)
rose.jpg
convert rose.jpg -matte -virtual-pixel transparent \
-distort Barrel "0.0 0.0 0.0 1.0 0.0 0.0 0.5 0.5" \
barrel_bulge.png
convert rose.jpg -matte -virtual-pixel transparent \
-distort Barrel "0.0 0.0 0.0 1.0 0.0 0.0 -0.5 1.9" \
barrel_pinch.png
convert barrel_bulge.png[70x23+0+0] barrel_pinch.png[70x23+0+23] -append barrel_bulge_pinch.png
In one long command line it would be:
convert rose.jpg \
\( -clone 0 -matte -virtual-pixel transparent \
-distort Barrel "0.0 0.0 0.0 1.0 0.0 0.0 0.5 0.5" -crop 70x23+0+0 +repage \) \
\( -clone 0 -matte -virtual-pixel transparent \
-distort Barrel "0.0 0.0 0.0 1.0 0.0 0.0 -0.5 1.9" -crop 70x23+0+23 +repage \) \
-delete 0 -append barrel_bulge_pinch.png
see http://www.imagemagick.org/Usage/basics/#image_seq
for parenthesis and image sequence processing
Good reading at:
http://www.imagemagick.org/Usage/
and
http://www.imagemagick.org/script/comma ... ptions.php
see Anthony's rose examples
you need to combine half of two images, top half of bulge (barrel) and bottom half of pinch (pincushion)
rose.jpg
convert rose.jpg -matte -virtual-pixel transparent \
-distort Barrel "0.0 0.0 0.0 1.0 0.0 0.0 0.5 0.5" \
barrel_bulge.png
convert rose.jpg -matte -virtual-pixel transparent \
-distort Barrel "0.0 0.0 0.0 1.0 0.0 0.0 -0.5 1.9" \
barrel_pinch.png
convert barrel_bulge.png[70x23+0+0] barrel_pinch.png[70x23+0+23] -append barrel_bulge_pinch.png
In one long command line it would be:
convert rose.jpg \
\( -clone 0 -matte -virtual-pixel transparent \
-distort Barrel "0.0 0.0 0.0 1.0 0.0 0.0 0.5 0.5" -crop 70x23+0+0 +repage \) \
\( -clone 0 -matte -virtual-pixel transparent \
-distort Barrel "0.0 0.0 0.0 1.0 0.0 0.0 -0.5 1.9" -crop 70x23+0+23 +repage \) \
-delete 0 -append barrel_bulge_pinch.png
see http://www.imagemagick.org/Usage/basics/#image_seq
for parenthesis and image sequence processing
Good reading at:
http://www.imagemagick.org/Usage/
and
http://www.imagemagick.org/script/comma ... ptions.php
Re: Newbie: Help with Arc distortion variant
Thanks for taking the time to answer my question. Unfortunately your suggestion gives
when what I'm looking for is
Is there something else to try?
when what I'm looking for is
Is there something else to try?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Newbie: Help with Arc distortion variant
Use the older -wave distortion.
http://www.imagemagick.org/Usage/distorts/#wave
this offsets each column of the image according to the sine-wave you specified. A half cycle sin wave looks exactly like what you want.
http://www.imagemagick.org/Usage/distorts/#wave
this offsets each column of the image according to the sine-wave you specified. A half cycle sin wave looks exactly like what you want.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/