Copyright © Fred Weinhaus My scripts are available free of charge for non-commercial (non-profit) use, ONLY. For use of my scripts in commercial (for-profit) environments or non-free applications, please contact me (Fred Weinhaus) for licensing arrangements. My email address is fmw at alink dot net. If you: 1) redistribute, 2) incorporate any of these scripts into other free applications or 3) reprogram them in another scripting language, then you must contact me for permission, especially if the result might be used in a commercial or for-profit environment. Usage, whether stated or not in the script, is restricted to the above licensing arrangements. It is also subject, in a subordinate manner, to the ImageMagick license, which can be found at: http://www.imagemagick.org/script/license.php Please read the Pointers For Use on my home page to properly install and customize my scripts. |
Applies a cylinder distortion to an image using an external displacement map |
last modified: April 06, 2019
USAGE: cylinderwarp angle displacementfile infile [backgroundfile] outfile PURPOSE: To apply a cylinder distortion to an image using a displacement map and arguments provided by the script cylinderize. DESCRIPTION: CYLINDERIZE applies a cylinder distortion to an image using a displacement map and arguments provided by the script cylinderize. The arguments must be copied from cylinderize output at the terminal and pasted in the arguments section of this script. ARGUMENTS: angle ... ANGLE is the rotation of the cylinder about its axis. It is a required argument. The values are floats with -360<=angle<=360. If angle="", then it will be controlled from the roll argument provided in this file as exported from the cylinderize script. REQUIREMENTS: IM 6.5.3.4 due to the use of -compose displace -composite. Also requires the preprocessing of cylinderize in export mode (-E) to get the displacement image (displace.png) and to get the needed internal arguments that must be pasted in this script below. CAVEAT: No guarantee that this script will work on all platforms, nor that trapping of inconsistent parameters is complete and foolproof. Use At Your Own Risk. |
First Run Cylinderize With Option -E To Get Displacement Map and Terminal Listing |
|
Input Image |
|
![]() |
|
Background Image |
|
![]() |
|
Arguments: |
|
Output Image |
|
![]() |
|
Displacement Image |
|
![]() |
|
Terminal Listing |
|
mode="vertical" |
Now Copy And Past the Terminal Text into the Cylinderwarp Script and Run It ( speed gain about 4x ) |
Displacement Image |
![]() |
Input Image |
![]() |
Background Image |
![]() |
Arguments: |
![]() |
Animation |
Displacement Image |
![]() |
Input Image |
![]() |
Background Image |
![]() |
Animation Code: |
![]() |
What the script does is as follows:
|