Convert colored document in perfect black&white

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
kadkam
Posts: 9
Joined: 2008-01-09T08:20:23-07:00

Convert colored document in perfect black&white

Post by kadkam »

Hi

Hi need to convert a document with red/green background in a black&white.
After, i need to apply a rgb curve modification but it's hard to understand.
Please can you write for me a command line example that, approximated, respect the modification curve?

Before

Image

after

Image

THANKS
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert colored document in perfect black&white

Post by fmw42 »

Do you have the software that created the curve? If so, then on IM create a PNG hald:8 image. Take that image to your other software. Apply the curve to the hald image and save it as PNG (not JPG). Then bring it back to IM and apply the hald image to your grayscale image (or colored image converted to gray with -colorspace gray) using -hald-clut.

See
http://www.imagemagick.org/Usage/color_mods/#hald-clut
Post Reply