channels

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
User avatar
GreenKoopa
Posts: 457
Joined: 2010-11-04T17:24:08-07:00
Authentication code: 8675308

channels

Post by GreenKoopa »

-threshold is described as "Apply simultaneous black/white threshold to the image."
http://www.imagemagick.org/script/comma ... #threshold

But "-threshold 50%" gives a different result than "-black-threshold 50% -white-threshold 50%". The former looks at the pixel as a whole while the latter looks at one channel at a time. "-channel RGB -threshold 50%%" switches how the first is handled. Is there a similarly simple way to switch how -black-threshold is handled?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: channels

Post by anthony »

Some commands handling -channel in different ways. There is a slow consolidation of how channel is handled.

-threshold by default maps images to greyscale first, unless the -channel setting has changed. This was due to historical reasons.

The other two are straight channel only 'half threshold' operators. That is they only threshold one side of the given value.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply