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 pagecurl effect to the lower right corner of an image. |
last modified: May 29, 2020
USAGE: pagecurl [-a amount] [-m mode] [-c color] [-b bgcolor] [-e ellipticity] [-x xcoord] [-y ycoord] [-g gcontrast] [-d dcontrast] infile [bgfile] outfile
-a .... amount .......... amount of pagecurl expressed as percent of image PURPOSE: Applies a pagecurl effect to the lower right corner of an image. DESCRIPTION: PAGECURL Applies a pagecurl effect to the lower right corner of an image. The apex of the curl is nominally in the upper right corner of the image, but can be adjusted. The curl is always right to left. The curl can be shaded and/or colored. The removed area can be colored, transparent or filled with an optional same size background image if provided. Note that this is a 2D simulation and not a true 3D effect. ARGUMENTS: -a amount ... AMOUNT of pagecurl expressed as percent of image width. Values are integers>=0. The default=50. Caution: values below about 5 may fail. -m mode ... MODE shading on the curl. Choices are: plain (or p), grad (or g) for gradient, or doublegrad (or d) for double gradient. Default=doublegrad. -c color ... COLOR is the color to apply to curl. Any valid IM color is allowed. The default=white. -b bgcolor ... BGCOLOR is the color to apply to curled away part of the image. Any valid IM color is allowed. The default=none for transparent. If a background file is provided, bgcolor must be none. -e ellipticity ... ELLIPTICITY is the amount of curl flattening from a circle to an ellipse. Values are in range 0<=float<1. The default=0 for circle. Recommended value other 0 is 0.5 for ellipse shape. -x xcoord ... XCOORD is the X coordinate for the apex of the curl. Values are 0<integers<width. The default is the right edge of the image. -y ycoord ... YCOORD is the Y coordinate for the apex of the curl. Values are integers. The default is the upper edge of the image. -g gcontrast ... GCONTRAST is the contrast adjustment for mode=grad. Values are in range 0<=integer<=100. This increases contrast only. The default=15 -d dcontrast ... DCONTRAST is the contrast adjustment for mode=doublegrad. Values are in range -100<=integer<=100. Positive values increase contrast. Negative values decrease contrast. The default=0 Thanks to Anthony Thyssen for critiqing the original version and for several useful suggestions for improvement. 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. |
Variation In Shading Mode With Ellipticity=0 (circle) |
||
Original Image |
||
Arguments: |
Arguments: |
Arguments: |
Variation In Shading Mode With Color With Ellipticity=0 (circle) |
||
Original Image |
||
Arguments: |
Arguments: |
Arguments: |
Variation In Shading Mode With Ellipticity=0.5 (ellipse) |
||
Original Image |
||
Arguments: |
Arguments: |
Arguments: |
Variation In Amount With Mode=grad AND Ellipticity=0 (circle) |
||
Original Image |
||
Arguments: |
Arguments: |
Arguments: |
Variation In Amount With Mode=grad AND Ellipticity=0.5 (ellipse) |
||
Original Image |
||
Arguments: |
Arguments: |
Arguments: |
Variation In Contrast For Mode=grad With Ellipticity=0 (cirlce) |
||
Original Image |
||
Arguments: |
Arguments: |
Arguments: |
Variation In Contrast For Mode=doublegrad With Ellipticity=0 (cirlce) |
||
Original Image |
||
Arguments: |
Arguments: |
Arguments: |
Variation In Apex Location For Mode=grad And Ellipticity=0 (circle) |
||
Original Image |
||
Arguments: |
Arguments: |
Arguments: |
Animations |
||
Original Image |
||
image="mandril3.png" |
image="mandril3.png" |
image="mandril3.png" |
What the script does is as follows for mode=grad:
This is equivalent to the following IM commands:
|