The script implements Dan Margulis' concept, The Bigger Hammer, from his book Modern Photoshop Color Workflow, Chapter 10. Please consult this book for examples and details on using the script. The script is useful for enhancing details in highlights and/or shadows.
"The bigger hammer" script is my first attempt in using Script-fu. As such it works but I may not have been using the most appropriate methods. This is to some extent caused by the fact that I've had to search the Internet heavily for details on how to do this and that. Anyway it works and hopefully some may find it useful.
Running the script on an image's topmost layer leaves you with three new layers:
- Darken only (or lighten only depending on the option selected in the dialog box)
(- Original layer)
Please note that the overlay layer is not created with the GIMP overlay mode but by emulating the overlay mode used in Photoshop. The Photoshop overlay mode can be emulated by swapping the two layers in question and setting the upper layer to hard light mode (please see http://en.wikipedia.org/wiki/Blend_modes for the mathematical expressions).
Suggestions for improvement of the code are very welcome.