Image Color Summarizer

rgb, hsl & lch image color statistics — simple and easy

API

To use the API, call this script with the following URL

# plain-text output
http://mkweb.bcgsc.ca/color_summarizer/?text=1&url=IMAGE_URL&precision=PRECISION
# XML output
http://mkweb.bcgsc.ca/color_summarizer/?xml=1&url=IMAGE_URL&precision=PRECISION

where IMAGE_URL is the URL of the input image and PRECISION is one of "low" (resized to 75 px), "medium" (resized to 100 px), "high" (resized to 200 px) or "extreme" (resized to 300 px).

For example, to obtain a color summary of this Flickr image which lives at http://static.flickr.com/37/88847543_d1eb68c5b9_m.jpg at medium precision,

# plain-text output
mkweb.bcgsc.ca/color_summarizer/?text=1&url=http://static.flickr.com/37/88847543_d1eb68c5b9_m.jpg&precision=medium
# XML output
mkweb.bcgsc.ca/color_summarizer/?xml=1&url=http://static.flickr.com/37/88847543_d1eb68c5b9_m.jpg&precision=medium

By default, plain-text output is space-delimited. To obtain tab-delimited output, add tab=1.

If you omit the xml=1 and text=1 parameter, you will obtain color statistics in a formatted HTML table.

# HTML output
mkweb.bcgsc.ca/color_summarizer/?url=http://static.flickr.com/37/88847543_d1eb68c5b9_m.jpg&precision=medium

detailed reporting — histograms and pixel data

RGB and HSV histograms and raw pixel values are now no longer shown by default. To include these,

# include histogram data
mkweb.bcgsc.ca/color_summarizer/?text=1&url=http://static.flickr.com/37/88847543_d1eb68c5b9_m.jpg&precision=medium&histogram=1

# include raw pixel data
mkweb.bcgsc.ca/color_summarizer/?text=1&url=http://static.flickr.com/37/88847543_d1eb68c5b9_m.jpg&precision=medium&rawpixel=1