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 an embroidery effect to each color in an image. |
last modified: January 04, 2024
USAGE: embroidery [-n numcolors ] [-p pattern] [-t thickness] [-g graylimit]
[-f fuzzval] [-b bgcolor] [-P process] [-a angle] [-r range] [-i intensity] [-e extent]
[-B bevel] [-A azimuth] [-E elevation] [-C contrast] [-S spread]
[-N newseed] [-M mix] [-G gain] infile outfile
-n ... numcolors ... number of desired or actual colors in image; integer>0; PURPOSE: To apply an embroidery effect to each color in an image. DESCRIPTION: EMBROIDERY applies an embroidery effect to each color in an image. The image must have limited number of colors or only the top most frequent colors will be used. Each color will get the same pattern, but at different rotation angles. ARGUMENTS: -n numcolors ... NUMCOLORS is the number of desired or actual colors in the image. Values are integers>0. The default=8. -p pattern ... PATTERN is the weave pattern. The choices are either linear (1) or crosshatch (2). The default=1. -t thickness ... THICKNESS is the weave thickness. Values are integers>=1. The default=2. -g graylimit ... GRAYLIMIT limits (converts) the colors near black and near white to gray(graylimit%) and gray(100%-graylimit%). Values are 0<=integers<=100. The default=20. -f fuzzval ... FUZZVAL is the fuzz value used for recoloring near black and near white. Values are 0<=integers<=100. The default=5. -b bgcolor ... BGCOLOR is the background color in the image. The default is most the frequent color. -P process ... PROCESS is the embroidering processing for the background color. The choices are: yes (y), no (n), transparent (t) or preserve (p). If no, the background color will not be emroidered. If transparent, the background color in the output image will be repaced with transparency. If preserve and there is a non-opaque alpha channel, then the alpha channel will be preserved in the output image and process will be reset to yes. If no or transparent options are used, you may need to disable the shadow via -extent and/or -intensity. The default=yes -a angle ... ANGLE is the initial pattern angle used for the most frequent color. Values are -360<=integers<=360. The default=0 (horizontal) -r range ... RANGE is the range of pattern angles over all the colors. Values are 0<=integers<=360. The default=90 (deg). -i intensity ... INTENSITY is the shadow intensity. Higher is darker. 0 is no shadow. Values are 0<=integers<=100. The default=25. -e extent ... EXTENT is the shadow extent in pixels. Values are integers>=0. 0 is no shadow. The default=2. -B bevel ... BEVEL is the pattern bevel amount. Values are integers>=0. The default=4. -A azimuth ... AZIMUTH is the bevel azimuth angle. Values are -360<=integers<=360. The default=130. -E elevation ... ELEVATION is the bevel elevation angle. Values are 0<=integers<=90. The default=30. -C contrast ... CONTRAST is the bevel sigmoidal-contrast amount. Values are integers>=0. The default=0 for IM >= 6.7.9.5; otherwise default=1 (no added contrast). -S spread ... SPREAD is the pattern spread (diffusion). Values are integers>=0. The default=1. -N newseed ... NEWSEED is the pattern (new) seed value. Values are integers>=0. The default is a random seed value. -M mix ... MIX is the mixing of the before and after spread result. Values are 0<=integers<=100. 100 is all spread. 0 is no spread. The default=100 -G gain ... GAIN in pattern contrast. Values are 0<=integers<=100. The default=0. NOTE: The input image should be completely opaque. If not and if a background color is explicitly specified, then any transparency will be flattened against the background color to remove it. Otherwise, the alpha channel will be disabled. 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 -- Variation in Linear Pattern Thickness |
Original |
![]() |
|
Arguments: |
![]() |
|
Arguments: |
![]() |
Example 2 -- Variation in Crosshatch Pattern Thickness |
Original |
![]() |
|
Arguments: |
![]() |
|
Arguments: |
![]() |
|
Arguments: |
![]() |
Example 3 -- Variation in Linear Pattern Shadow Intensity |
Original |
![]() |
|
Arguments: |
![]() |
|
Arguments: |
![]() |
|
Arguments: |
![]() |
Example 4 -- Variation in Linear Pattern Contrast (No Shadow) |
Original |
![]() |
|
Arguments: |
![]() |
|
Arguments: |
![]() |
Example 5 -- Variation in Linear Pattern Graylimit |
Original |
![]() |
|
Arguments: |
![]() |
|
Arguments: |
![]() |
Example 6 -- Variation In Backgrounds |
Original |
![]() |
|
Arguments: |
![]() |
|
Arguments: |
![]() |
|
Arguments: |
![]() |
Example 7 -- Variation In Pattern Contrast |
Original |
![]() |
|
Arguments: |
![]() |
|
Arguments: |
![]() |
Example 8 -- Variation In Pointsize Text And Bevel |
Original |
![]() |
|
Arguments: |
![]() |
|
Arguments: |
![]() |
|
Arguments: |
![]() |
|
Arguments: |
![]() |
|
Original |
![]() |
|
Arguments: |
![]() |
|
Arguments: |
![]() |
|
Original |
![]() |
|
Arguments: |
![]() |
|
Arguments: |
![]() |
What the script does is as follows:
See the script for details |