Fred's ImageMagick Scripts



    Licensing:

    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.

WARHOLEFFECT


Creates an Andy Warhol style image.

Download Script

last modified: December 16, 2018



USAGE: warholeffect [-r rows] [-c cols] [-c1 colors1] ... [-c16 colors16] [-i interp] infile outfile

USAGE: warholeffect [-help]

-r ..... rows ....... number of rows of tiles; integer>0; maximum of 16
..................... total tiles in rows and columns; default=2
-c ..... cols ....... number of columns of tiles; integer>0; maximum of 16
..................... total tiles in rows and columns; default=2
-c1 .... colors1 .... space delimited set of colors for the first tile;
..................... Any set of opaque IM colors are allowed; Number of
..................... colors must be at least 3; default=3

etc up to

-c16 ... colors16 ... space delimited set of colors for the last tile;
..................... Any set of opaque IM colors are allowed; Number of
..................... colors must be at least 3; default=3
-i ..... interp ..... interpolation method for colorizing; Any valid IM
..................... interpolation method allowed; default=nearestneighbor

PURPOSE: To create an Andy Warhol style image.

DESCRIPTION: WARHOLEFFECT creates an Andy Warhol style colorization image. This image is a montage of images, each colored with different sets of colors from the input image converted to grayscale. The default is a 2x2 montage with 3 colors each.

ARGUMENTS:

-r rows ... number of ROWS of tiles. Values are integers>0. A maximum of 16 total tiles in rows and columns combined. The default=2.

-c cols ... number of COLS of tiles. Values are integers>0. A maximum of 16 total tiles in rows and columns combined. The default=2

-c1 colors1 ... COLORS1 are a space delimited set of colors for the first tile. Any set of opaque IM colors are allowed. The number of colors must be at least 3. If not specified, random colors will be created. The default=3. Note: do not add spaces in rgb(...) color triplets.

etc up to

-c16 colors16 ... COLORS16 are a space delimited set of colors for the last tile. Any set of opaque IM colors are allowed. The number of colors must be at least 3. If not specified, random colors will be created. The default=3. Note: do not add spaces in rgb(...) color triplets.

-i interp ... INTERP is the interpolation method for colorizing; Any valid IM interpolation method is allowed. The default=nearestneighbor.

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.


EXAMPLES


Original Image

 

Arguments:
-r 2 -c 2

 

Arguments:
-r 2 -c 2
-c1 "rgb(52,42,121) rgb(147,192,4) rgb(255,249,0)"
-c2 "rgb(239,103,0) rgb(148,0,211) rgb(254,249,167)"
-c3 "rgb(229,8,119) rgb(252,241,5) rgb(3,131,233)"
-c4 "rgb(117,72,147) rgb(113,191,251) rgb(245,133,8)"

 

Arguments:
-r 3 -c 3

 

Arguments:
-r 4 -c 2


What the script does is as follows:

  • Computes random colors for each tile specified
  • Createa a color lut from the colors
  • Applies each color lut to its respective tile image
  • Montages the tile images together