Sunday 19 April 2015

software - Are Gimp's "color space" blend modes the same as those in Photoshop?


The Wikipedia article on Blend Modes describes three of them in particular like this:



Photoshop’s hue, saturation, color, and luminosity blend modes are based on a color space with dimensions that the article HSL and HSV calls hue, chroma, and luma. Note that this space is different from both HSL and HSV, and only the hue dimension is shared between the three; see that article for details.




...



Because these blend modes are based on a color space which is much closer than RGB to perceptually relevant dimensions, it can be used to correct the color of an image without altering perceived lightness, and to manipulate lightness contrast without changing the hue or chroma. The Luminosity mode is commonly used for image sharpening, because human vision is much more sensitive to fine-scale lightness contrast than color contrast. See Contrast (vision).



and, without references, adds:



Few editors other than Photoshop implement this same color space for their analogs of these blend modes. Instead, they typically base their blend modes on HSV (aka HSB) or HSL. Blend modes based on HSV are typically labeled hue, saturation, and brightness. Using HSL or HSV has the advantage that most operations become invertible (at least in theory), but the disadvantage that the dimensions of HSL and HSV are not as perceptually relevant as the dimensions of the space Photoshop uses.



In my version of Gimp, those options are Hue, Saturation, Color, and Value. This isn't exactly the same as the terminology used in Photoshop (value replaces luminosity), but it's also not "hue, saturation, and brightness" as in the paragraph above.



As the Wikipedia article explains it, the color space Photoshop uses here would appear to be an advantage for photography, since it's more perceptually-relevant. Which does Gimp use?



Answer



I guess technically speaking I would call HSL and HSV a "color model", same as RGB or CMYK, as they are tools for modeling and describing color. A "color space" is a tool for calculating color adjustments or comparing colors, such as XYV or Lab. Either way, I am not sure either color spaces nor color models really matter for the question at hand...


Based on the references you have linked, and the terminology used, I can offer two possibilities in regards to how Gimp's blending modes work (which are not really color space or color model related...they are simply layer blending operations that work on different channels, and should work the same regardless of what working color space your image is in, or what color model your image is using.


Option 1


The first option is that Gimp and Photoshop behave the same for those four blending modes. This is based on the assumption that the terms "Luminosity" and "Value" refer to the same thing...the luma axis, the facet of color that determines whether a color is light or dark, irrespective of its chromaticity (hue and saturation.) If this is the case, you can assume that applying the "Value" blend mode will preserve the luminosity of the top layer, and keep the hue and saturation/chroma of the bottom layer.


Option 2


The second option is that Gimp assumes the "value" term is akin to the HSV color model's Value component. In HSV, value is a bit different than luminosity/brightness, in that at maximum value, you achieve maximum color purity for a given saturation. If saturation is zero, you get pure white, where as if saturation is 1.0 (100%) you get that pure hue. This is in contrast with the HSL/B color model, where in luminosity/brightness is an agnostic component. At maximum brightness, regardless of hue and saturation, you get white. At 0.5 (50%) brightness, you achieve maximum color purity for a given saturation. If saturation is zero, you still get pure white, where as if saturation is 1.0 (100%) you get that pure hue. Photoshop uses luminosity according to HSL/B rather than value when you look at things this way.


If Gimp uses Value in the same way as the HSV, I can not say for sure exactly what the outcome of the "Value" blend mode would be. The most logical way to think about it would be that it keeps the value numeric value (say 0.5) of the top layer, and applies that to the hue and saturation values of the bottom layer. If the top layer has a red hue and 100% saturation at 50% value, while the bottom layer has a green hue and 50% saturation at 100% value, I would assume the final outcome is green hue at 50% saturation and 50% value. In other words, a soft, semi-desaturated dark (but not blackish) green.


UPDATE:



Here are some sample images from both Photoshop and GIMP that demonstrate each mode. The differences between the Luminosity blend in Photoshop and the Value blend in GIMP are pretty clear...it does appear as though GIMP treats Value blend according to the rules that govern Value in HSV. GIMP also seems to apply some stronger curves during processing, or simply has a slightly different approach to blending the two colors for each pixel, than Photoshop...producing slightly harsher results. Photoshop on the left, GIMP on the right:


Photoshop HueGIMP Hue
Photoshop SatGIMP Sat
Photoshop ColorGIMP Color
Photoshop LumGIMP Value


No comments:

Post a Comment

Why is the front element of a telephoto lens larger than a wide angle lens?

A wide angle lens has a wide angle of view, therefore it would make sense that the front of the lens would also be wide. A telephoto lens ha...