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. |
Distorts repeated text to warp it to the shape of the image content. |
last modified: December 16, 2018
USAGE: textdistort -t text [-p pointsize] [-f font] [-c color] [-s soften]
[-C contrast] [-d distort] [-r roll] [-b background] [-u ucolor] [-P] [-R rfactor]
infile outfile
-t ... text ........ text to apply to the image. Required. PURPOSE: Distorts repeated text to warp it to the shape of the image content. DESCRIPTION: TEXTDISTORT distorts repeated text to warp it to the shape of the image content. The image is typically a human face. The background of the result may be some solid color or the original image. ARGUMENTS: -t text ... TEXT to apply to the image. Required. -p pointsize ... POINTSIZE for the text. Values are integer>0. The default=16. -f font ... FONT name or path to font file. The default=arial. -c color ... COLOR of the font. Any valid opaque IM color is allowed. The default=white. -s soften ... SOFTEN (blur) the grayscale version of the image used in the distort processing. Values are integers>=0. The default=20. -C contast ... CONTRAST is a sigmoidal-contrast adjustment of the grayscale image to increase contrast in order to make the image stand out when using background=undercolor and also to help distort the text better. Values are integers>=0. The default=5. -d distort ... DISTORT is a comma separate pair of distortion values for the x and y distortion directions. Values are integers>=0. The default="10,10". -r roll ... ROLL the text overlay to the left to adjust for distortion bias. Values are integers>=0. The default=0. -b background ... BACKGROUND is the type of background for the text. The choices are: undercolor (u) to use a constant color under the text or image (i) to use the original image under the text. The default=undercolor. -u ucolor ... UCOLOR is the color to use for the background. Any valid opaque IM color is allowed. The default=black. -P ... USE PANGO: rather than CAPTION: to create the text overlay. Pango will justify the text, while caption will center the text as it wraps. Pango will run faster than caption and may require smaller pointsizes to match that of caption. Pango must be installed as a delegate to use it. The default is to use caption: -R rfactor ... RFACTOR is a repeat factor to adjust the automatic computation of how many times to repeat the text. It is needed when fonts are not monospaced. Values are floats>=1. The default=2.5
Reference: 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. |
Example 1 -- Background = undercolor |
Original Image |
|
Arguments: -t "Now is the time for all good men to come to the aid of their country." -p 16 -r 5 |
|
Arguments: -t "Now is the time for all good men to come to the aid of their country." -p 13 -r 0 -P |
Example 2 -- Background = image |
Original Image |
|
Arguments: -t "Now is the time for all good men to come to the aid of their country." -p 16 -c black -r 5 |
|
Arguments: -t "Now is the time for all good men to come to the aid of their country." -p 13 -c black -r 0 -P |
What the script does is as follows:
|