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. |
Transforms a pattern image to place it over an image of some piece of clothing or outfit |
last modified: December 15, 2018
USAGE: outfitwarper [-r reduce] [-m modulate] [-x xroll] [-y yroll] [-o orientation]
[-d displace] [-D directory] infile bgfile outfile
-r ... reduce ........ reduction amount as percent for the infile (pattern image) PURPOSE: Transforms a pattern image to place it over an image of some piece of clothing or outfit. DESCRIPTION: OUTFITWARPER transforms a pattern image to place it over an image of same piece of clothing or outfit. The transformed image will display hightlights from the outfit image and be distorted to match the wrinkles in the outfit image. The outfitwarper script must be run once first using -E to create the lighting, displacement and mask images. This can be done with or without -D directory. ARGUMENTS: -r reduce ... REDUCE is the reduction amount as percent for the infile (pattern image) before tiling it. Values are integers>=0. The default=10. -m modulate ... MODULATE is the modulation (lightness, saturation, hue) applied to the infile (pattern image) before tiling it. Values are a comma separate triplet L,S,H of integers>=0. The default="100,100,100" (no change). -x xroll ... XROLL is the roll amount in pixels for the tiled image in the horizontal dimension. Values are integers. The default=0. -x yroll ... YROLL is the roll amount in pixels for the tiled image in the vertical dimension. Values are integers. The default=0. -o orientation ... ORIENTATION angle in degrees for rotation of the tiled pattern image. Values are -360<=integer<=360; default=0. -d displace ... DISPLACE is the displacement amount when applying the displacement image to distort the pattern on the background image. Values are integers>=0. The default=5. -D directory ... DIRECTORY to write all the exported data, including a text file called outfit.txt containing the same textual parameter data as sent to terminal. The directory can be specified later in the outfitwarp script to import all the needed images and textual data. NOTE: This script will not bend textures to conform to curved or bent arms. Special processing such as at http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=23348 will be needed, or alternately, use separate masks for each part that requires a different pattern orientation. REQUIREMENTS: IM 6.5.3.4 due to the use of -compose displace. 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. |
Run The Script OUTFIT And Expert Data |
Input (Pattern) Image |
Background (Hoodie) Image |
Arguments: |
Lighting Image In Directory Hoodie |
Displacement Image In Directory Hoodie |
Mask Image In Directory Hoodie |
Outfitdata.txt In Directory Hoodie |
displace="5" reduce="10" xroll="0" yroll="0" orientation="0" modulate="100,100,100" |
Run Time: 1.78 sec |
Example 1 -- OUTFITWARPER |
Input (Pattern) Image |
Background (Hoodie) Image |
Arguments: |
Run Time: 1.09 sec |
Example 2 -- OUTFITWARPER |
Input (Pattern) Image |
Background (Hoodie) Image |
Arguments: |
Example 3 -- OUTFITWARPER |
Input (Pattern) Image |
Background (Hoodie) Image |
Arguments: |
Example 4 -- OUTFITWARPER |
Input (Pattern) Image |
Background (Hoodie) Image |
Arguments: |
What the script does is as follows:
|