On Wed, Aug 16, 2006 at 11:36:54AM -0700, Glenn Linderman wrote
> Experimentally, I have found that duplicating a picture to two
> identical layers, choosing layer mode "screen", and varying selections
> for opacity depending on how dark a picture is, can nicely brighten
> a picture without that "washed out" look that comes from simply
> choosing the "brighten" operation.
>
> Does anyone have a clue how to produce that same effect in ImageMagick?
I've got a couple of "convert" formulas that preferentially brighten
darker pixels. Note that they analyze individual pixels, and a
2560x1920 image takes 30 seconds on an AMD64 3000+ with 2 gigs of ram.
The best effect is from logarithmic brightness boost. I call the
script "logg". It looks like so...
#!/bin/bash
convert ${1} -fx "ln(u*(${3}-1)+1)/ln(${3})" ${2}
It's invoked like...
logg input_image output_image 3
The 3rd parameter is a positive number (float) that must be greater than
1. The larger the 3rd parameter, the more brightening you get.
Another script is "pwrr". It uses a power curve for a similar
brightening effect.
#!/bin/bash
convert ${1} -fx u^${3} ${2}
It's invoked like...
pwrr input_image output_image 0.75
The 3rd parameter is a positive number (float) less than 1. The lower
the 3rd parameter, the more brightening you get.
--
Walter Dnes <[EMAIL PROTECTED]> In linux /sbin/init is Job #1
My musings on technology and security at http://tech_sec.blog.ca
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users