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. |
Generates a spectrum-like image from the colors in an image |
last modified: December 11, 2023
USAGE: colorspectrum [-c columns] [-r rows] [-l] infile outfile
-c ...... columns .... width of spectrum; determines the maximum PURPOSE: To generate a spectrum-like image from the colors in an image. DESCRIPTION: PROFILE generates generate a spectrum-like image from the colors in an image. It uses a color reduction algorithm to extract the specified number of colors. Then it sorts the colors according to hue and creates an image of the specified height and width. See http://www.imagemagick.org/script/quantize.php for a description of the color reduction algorithm. ARGUMENTS: -c columns ... COLUMNS is the width of the spectrum and also determines the number of colors to try to generate. Allowed values are integers between 1 and 255. Note that it is possible that the color reduction algorithm will produce fewer, but never more colors than desired. If fewer colors are generated, then they will show as black areas on the left side of the spectrum. The default is 255. -r rows ... ROWS is the height of the spectrum. Values are integers greater than 0. The default is 100. -l ... Indicates to print a list of colors to the terminal. 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. |
Image And Spectrum | |
Original Image |
Spectrum Image |
What the script does is as follows:
This is equivalent to the following IM commands:
|