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. |
Creates a multi-variant collage of the input image. |
last modified: December 15, 2018
USAGE: collage [-d dimensions] [-b bgcolor] [-m mode] [-n newseed]
[-p pattern] [-s scale] [-g geometry] [-f format] [-r radius] [-t taper]
infile [overlayfile] outfile
-d ... dimensions ... WidthxHeight of output; if only one, then output will PURPOSE: Creates a multi-variant collage of the input image. DESCRIPTION: Creates a multi-variant collage of the input image. Choices are either 18 variants in the collage or 8 variants in the collage. Variants are randomized in position, orientation and scale. An optional overlay image may be added with 4 choices of number and positions of the variants added atop of the collaged input image. ARGUMENTS: -d dimensions ... DIMENSIONS are the WidthxHeight of output. If only one value is specified, then the output will be a square. If neither are provided, then the output will be the size of input. Values are integers>0. The default is the size of input. -b bgcolor ... BGCOLOR is the background color for the output image. Any valid opaque IM color is allowed. The default is black. -m mode ... MODE is either all (a) or half (h); all uses 18 variants of the input image in the collage. Half uses only 9 variants of the input image in the collage. The default is all. -n newseed ... NEWSEED is the seed value for the randomization of the variants. Values are integers>0. The default causes every output to be different. Use of any other value will cause the output to be repeatable. -p pattern ... PATTERN for the optional overlay image. The choices are: 1, 2, 3 or 4. 1 is one copy in the middle or over the whole output based upon the scale value. 2 is a variant in the southeast and northwest corners. 3 is a variant in the southwest and northeast corners. 4 is a variant in all 4 corners of the output. The default=1. -s scale ... SCALE is the scale factor for the overlay image variants expressed a as a percent of the output image dimensions. Values are 0<integer<=100. The default=50. -g geometry ... GEOMETRY offset in pixels for both x and y for the overlay image variants. Values are integers. The default=0. -f format ... FORMAT is the preprocessing format for the overlay image. The choices are: none, flip, flop, rot90, rot180, rot270. The default=none. -r radius ... RADIUS of the vignette expressed as a percent of half of the input image dimensions. Values are 0<integer<=100. The default=50. -t taper ... TAPER rate of the vignette expressed as a (blur) sigma value. Values are integers>0. The default=10. NOTE: The optional overlay image should be a mostly transparent image so that it does not cover too much of the collage. 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 -- No Overlay Image |
Original Image |
Arguments: |
|
Arguments: |
|
Arguments: |
|
Example 2 -- With Overlay Image |
Original Image |
Overlay Image |
Arguments: |
|
Arguments: |
|
Arguments: |
|
Arguments: |
|
What the script does for m=all is as follows:
See the code for details |