Black and White histogram

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Elapido
Posts: 42
Joined: 2011-06-10T14:27:28-07:00
Authentication code: 8675308

Black and White histogram

Post by Elapido »

Hi. How's the code to create a histogram in black and white, but pure black and white, that is a 2-color image, not greys. Thanx.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Black and White histogram

Post by snibgo »

If the image is greyscale, the histogram will be black and white only. eg:

Code: Select all

convert rose: -colorspace gray -define histogram:unique-colors=false histogram:h.png
snibgo's IM pages: im.snibgo.com
Post Reply