Fred's ImageMagick Scripts
My scripts are available free of charge for non-commercial use. If you redistribute or incorporate any of these scripts into other free applications, you may use my scripts by simply referencing my name and this web page: Fred Weinhaus and http://www.fmwconcepts.com/imagemagick/index.html For use of my scripts in commercial use or non-free applications, please contact me for
licensing arrangements. Usage, whether stated in script or not, is also subject to the ImageMagick license, which can be found at: http://www.imagemagick.org/script/license.php |
|
Converts an image into a tilable texture. |
last modified: November 28, 2011
|
USAGE: tiler [-m method] [-o overlap] [-v vpmethod] infile outfile
-m .... method ...... method of overlap blending; choices are 1 or 2; PURPOSE: To convert an image into a tilable texture. DESCRIPTION: TILER converts an image into a tilable texture. It does this by swapping diagonal quadrants, exending the borders to get overlap and then composite blending the extended quadrants. The extension and blending attempt to minimize or avoid manual painting/blurring/cloning along the seams. ARGUMENTS: -m method ... METHOD of overlap blending. The choices are 1 or 2. Method 1 is a simple average blending. Method 2 is a ramped blending. The default=1. -o overlap ... OVERLAP is amount of extension of the quadrants in order to cover the center horizontal and vertical seems. Values are integers>=0. The default=2 -v vpmethod ... VPMETHOD is the virtual-pixel method used to extend the quadrants. Any valid IM non-background virtual-pixel method is allowed. Recommended values are either mirror or edge. The default is mirror. Requirement: IM 6.5.3-4 or higher due to the use in method 1 of convert ... -compose blend -define compose:args=50,50 -composite ... 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: Rocks |
|
|
Original Image |
|
| |
|
Quadrant Swap Only: |
Arguments: |
|
|
|
2x2 Tiling |
|
| |
|
Example: Dirt |
|
|
Original Image |
|
| |
|
Quadrant Swap Only: |
Arguments: |
|
|
|
2x2 Tiling |
|
| |
|
Example: Random |
|
|
Original Image |
|
| |
|
Quadrant Swap Only: |
Arguments: |
|
|
|
2x2 Tiling |
|
| |
|
What the script does is as follows:
This is equivalent to the following IM commands for method 1
|