Luminosity Issues
There are several ways to give all pixels in an image an identical luminosity value, and each method has issues. I found the most precise one, which works perfectly, is doing it in Lab. However, when converting it to sRGB (to create a jpg file), the apparent image looks different, as it creates variations in colors and contrast, as well as some variations in luminosity. So, I get (and found some sources) there are issues in computing and converting saturation and luminosity in such different color spaces.
However, it would have seemed as though the simplest imaginable method of doing it in the sRGB color space itself would be efficient as well. This is by putting a gray layer on top in using the luminosity blend mode. This should have given a fixed luminosity value to all pixels in the image below. That does not happen, however.
You may argue that the way I measure luminosity, by using the Lab’s L, is in a different color space, so I run again into transitions and calculations problems, and that nothing is wrong with the Gray-Luminosity action. This however is incorrect.
After transferring an image from Lab to sRGB, I can assess luminosity variations by creating an RGB mask (i.e., by selecting the RGB channel). If I do this to the Lab-sRGB conversion I do get some variations that I can see in the RGB Mask. However, if I put a Gray-Luminosity layer on top, and Stamp the image, and repeat the creation of an RGB mask, the variations in it actually increase. What is going on? It goes much beyond rounding errors. Is it a Photoshop bug?
