![]() PinLight, Hue) can be made compatible by just doing: As = Sa * (1 - Da) With the exception of SoftLight, the core blend math is the same as those used by GIMP and elsewhere.Īny other blend operation (e.g. If referring to the documentation, the fact that the blend math is the same gets obfuscated because the blend and composition are algebraically combined using premultiplied alpha to reduce the overall computational cost. The GEGL methods to be used by GIMP in the future follow the SVG methods, so I figure that suggests the propriety of the legacy methods.įor what it's worth, the SVG methods are all based on a Porter-Duff Src-Over composition. I've decided to add support for both SVG 1.2 and legacy GIMP methods. I can at least answer the last question by obviating it. Some things it does incorrectly maybe this is something else that Really suggest a particular expected behavior. Am I wrong to use GIMP's behavior as a reference? I don't have PS toĬompare against, and ImageMagick is so flexible that it doesn't.Although I haven't found anything, are there other applications.Does it make sense that colors in a transparent BG region are unaffected by multiplication with an opaque foreground color? Wouldn't this risk causing bleeding of unaltered data near hard mask edges with some future operation?.This may be best asked of a GIMP forum somewhere, but I figured it would be more fruitful to approach a general audience. Certainly, this approach produces results which match GIMP, but I'm uncomfortable establishing this as a default behavior if I don't understand the reasoning. The points of curiosity lie in the fact that I don't understand conceptually why one would take the minimum of layer alphas for composition. OUTalpha = BGalpha + (1 - BGalpha) * FGalpha After spending a few hours looking naively through the GIMP 2.8.10 source, I notice a few things that confuse me.īarring certain modes and a few ancillary things that happen during export that I haven't gleaned in the code yet, the approach is approximately thus: if ~normalmodeįGalpha = min(FGalpha, BGalpha) % << why this? Specifically, the foreground's color influence over the background is zero where the background alpha is zero. The output alpha matches, but the RGB data differs. When compared to the output from GIMP, this produced similar, but differing results. My original approach was to simply use a a Src-Over composition for "normal" blend mode and Src-Atop composition for other modes. Among others, I've been using these links as my references as to how foreground and background alpha plays into the composition of both the output color data and output alpha. ![]() In my quest to add alpha capacity to my image blending tools in Matlab, I've come across a bit of a snag.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |