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. |
Randomly shuffles positions of square sized tiles in an image. |
last modified: December 15, 2018
USAGE: shuffle [-s size] [-p percent] [-c center] [-r radii] [-R rounding]
[-n] [-e ecolor] infile [maskfile] outfile
-s ... size ....... size of square tiles; integer>0; default=32 PURPOSE: To randomly shuffle positions of square sized tiles in an image. DESCRIPTION: SHUFFLE randomly shuffle the positions of square sized tiles in an image. An optional round rectangle mask may be defined to delineate where the shuffling will be shown. Or an external mask image may be provided. ARGUMENTS: -s size ... SIZE of the square-sized tiles to randomly shuffle. Values are integers>1. The default=32. -p percent ... PERCENT is the percentage of patches to randomly shuffle. Values are 0<=integers<=100. The default=100 (all tiles). -c center ... CENTER is the x and y center coordinates of the round rectangle mask with white on the inside and black on the outside; comma separate pair of integers>=0; default=center of image -r radii ... RADII are the x and y radii of a round rectangle mask expressed as a comma separated pair of integers>=0. The default="0,0" (no mask). -R rounding ... ROUNDING is the round rectangle corner radii expressed as a pair of comma separated values. Values are integers>=0. The default="0,0". -n negate ... NEGATE the mask (invert black and white). -e ecolor ... ECOLOR is the edge color of the mask boundary to show on the resulting image. Any valid opaque IM color is allowed. The default is not to show the edge boundary on the image. NOTE: The script runs slowly. A 256x256 sized image processed on my INTEL Mac Mini in about 10 sec for dimension 16 and about 2 sec for dimension 32. Thus larger sized patches will process faster. 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. |
Original: |
Arguments: |
Original: |
Arguments: |
Original: |
Arguments: |
Original: |
Arguments: |
Original: |
Arguments: |
Original: |
Mask: |
Arguments: |
Original: |
Arguments: |
What the script does is as follows:
This is equivalent to the following IM commands
|