Instruments - mono mixer - add Preserve luminosity

Ideas for improvements and requests for new features in XnView MP

Moderators: XnTriq, helmut, xnview

User avatar
user0
XnThusiast
Posts: 2004
Joined: Sat May 09, 2015 9:37 am

Instruments - mono mixer - add Preserve luminosity

Post by user0 »

XnViewMP 1.8.2 64bit
Windows11 (23H2), display resolution 3840x2160, win scaling 150%


Instruments - mono mixer
https://docs.gimp.org/2.10/en/gimp-filter-mono-mixer.html wrote: Preserve luminosity
The mixing can result in an image where some of the colors are too light. This option lessens the luminosity of the color channels while keeping a good visual ratio between them. So, you can change the relative weight of the colors without changing the overall luminosity.

Here is how the Preserve Luminosity works in the monochrome mode: “For example, suppose the sliders were Red:75%, Green:75%, Blue:0%. With Preserve Luminosity disabled, the resulting picture would be at 75%+75%+0% =150%, very bright indeed. A pixel with a value of, say, R,G,B=127,100,80 would map to 127*0.75+100*0.75+80*0=170 for each channel. With Preserve Luminosity enabled, the sliders will be scaled so they always add up to 100%. In this example, that scale value is 1/(75%+75%+0%) or 0.667. So the pixel values would be about 113. The Preserve Luminosity option just assures that the scale values from the sliders always adds up to 100%. Of course, strange things happen when any of the sliders have large negative values.” (from the plug-in author himself).
see instrument effect intensity at min/max in GIMP (☑ Preserve luminosity) and Photoshop
effect_mono_mixer_add_preserve_luminosity.png
test image


Suggestion
  • add Preserve luminosity
    effect should be applied to RGB colors and Colorize Saturation
    Not sure if dedicated setting is required, maybe just update the calculations to match Photoshop
  • set default values to something usable, eg
    - RGB to 33%
    - Saturation to 20% (like in Photoshop)




Related
You do not have the required permissions to view the files attached to this post.