Wrong(legacy) luminance formula in some plugins
Hi. I am not a native English speaker, so I apologize if I write with errors (I hope you can understand me).
It seems that some plugins use the wrong formula to calculate luminosity.
https://github.com/GNOME/gimp/blob/master/plug-ins/common/sample-colorize.c#L45 https://github.com/GNOME/gimp/blob/master/plug-ins/imagemap/imap_preview.c#L184
Perhaps somewhere else.
The coefficients used for NTSC RGB, for sRGB need others. You can find more details in this table: http://www.brucelindbloom.com/index.html?WorkingSpaceInfo.html
Or in the W3C specification: https://www.w3.org/WAI/GL/wiki/Relative_luminance Also, GEGL already uses the correct formula, for example:
https://github.com/GNOME/gegl/blob/master/operations/common/svg-luminancetoalpha.c#L61
This is easy to fix, and I can send a commit or attach a patch, but I think that opening the discussion first is a better way. Thanks for attention.