isomorphic Posted January 10, 2012 Share Posted January 10, 2012 Hi, I briefly looked around and didn't see anyone mention anything similar so hopefully this isn't a duplicate or me doing something stupid. Yesterday I was trying to use layer blending, specifically the Multiply operation, to alter the color of an image containing sections which are completely transparent. I created a new layer over top, painted the whole thing a solid color, and then multiplied the 2 layers together. I would expect that any fully transparent areas would remain fully transparent after the multiply since an alpha value of 0 times any other alpha value should always be zero. Instead those fully transparent areas took on the solid color after the blend. In RBGA terms, I expected: 1110 x 1111 = 1110 but I got 1110 x 1111 = 1111 And here is a more visual example. This would be accurate if shown on the checkerboard (completely empty background) but it'd be tough to see what's going on so that's why the background is black here. Does Paint.NET not support alpha blending in all cases or am I inadvertently in the wrong color mode? I'm using version 3.510.4297.28964. Thanks. Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted January 11, 2012 Share Posted January 11, 2012 From the online documentation: Multiply: Each pixel component's intensity is multiplied with the pixel value in the composition. The result of using this blend mode is always pixels that are darker than the original. White pixels have no effect and are thus effectively transparent. So with this blend mode - it is the white pixels that are transparent in terms of the blending operation. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
isomorphic Posted January 11, 2012 Author Share Posted January 11, 2012 I get that; opaque white multiplied by any other color gives you that other color, and the white portions of that example image work the way I'd expect. I guess I'm just surprised that the alpha value of a color isn't taken into account during blending operations; it seems to be an RGB-only operation. If I had access to Photoshop I'd check to see if they handle it the same way. Perhaps it's just an industry standard. Quote Link to comment Share on other sites More sharing options...
delpart Posted January 11, 2012 Share Posted January 11, 2012 Thanks for the topic. This actually helped to flush out a problem I thought was my error in working with blending ... and makes me think I need to expand my reading a little. Quote *** Gallery at PDN-Fans Link to comment Share on other sites More sharing options...
Rick Brewster Posted January 11, 2012 Share Posted January 11, 2012 The alpha channel always works the same no matter which blend mode you choose. There is no mathematical error in the way things work. If a pixel is transparent (alpha = 0) then it will make no contribution, no matter what the blend mode is of the layer it's in. If a pixel is fully opaque (a = 255) then its contribution will be the full effect of the blend mode. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted January 11, 2012 Share Posted January 11, 2012 ... and makes me think I need to expand my reading a little. I've been doing a LOT of research on Paint.NET over the last month. There are so many things that I thought I knew - and found I didn't know them nearly so well as I thought Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.