Re: GM -normalize without clipping highlights

[email protected] Tue, 20 Jul 2010 14:07:04 +0000 (UTC)
Newsgroups gmane.comp.video.graphicsmagick.core
Message-ID <570577810.150119.1279634824144.JavaMail.root@sz0023a.westchester.pa.mail.comcast.net>
Here is a procedure that normalizes without clipping the highlights.

    1. convert to linear colorspace
    2. run "identify" to find the max and min values of
       each channel.  Chose the maximum of the R,G,B maxima
       and the minimum of the R,G,B minima
    3. convert -level max/1.0/min image.in image.out
    4. convert to the colorspace you want, such as sRGB.

This doesn't address the original poster's request to compress
the highlight range using some sort of sigmoid transformation,
but with a little more work that can probably be done.

Glenn

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first