MJW Posted February 26, 2021 Share Posted February 26, 2021 Now that Erase Selection fills the erased selections with transparent black, it seems to me it would be consistent to also use transparent black, instead of transparent white, to fill newly-created layers. 1 Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted February 27, 2021 Share Posted February 27, 2021 Yeah I think that's the last transparent white filling that exists. I think I was worried it would cause issues with plugins or something. Still, it's probably the right thing to do anyway. I'll look into it for 4.2.16. 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...
Red ochre Posted February 27, 2021 Share Posted February 27, 2021 (edited) I initially thought it may cause issues with anti-aliasing around objects on some early plugins, however, I cannot find any examples...so hopefully not an issue. Would it create problems with old Pdn files where semi-transparent layers are using blend modes? What is the advantage of changing, other than mathematical 'neatness'? Would file sizes be smaller? The main problem I have is with the way Windows file explorer displays transparency in thumbnails. Sometimes black sometimes white, regardless of the actual values within the png and often changing when the thumbnail display size is changed! - all beyond Paint.net's control. Very frustrating when using black shadows or text on a transparent background and the thumbnail just shows a black square. Curiously 'Optipng' seems to display transparency consistently as white in the Windows thumbnails? From a screenshot of my 'objects' folder:- (Ps. both files have a background of BGRA = 0,0,0,0) Edited February 27, 2021 by Red ochre tested files alpha values Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
ardneh Posted February 27, 2021 Share Posted February 27, 2021 (edited) From this thread: One example is this topic: White alpha New Layers can quickly be converted to black alpha with two keystrokes. Ctrl A Delete If black alpha became the norm for New Layers could they be converted to white alpha easily? Edited June 14, 2021 by ardneh Quote Link to comment Share on other sites More sharing options...
MJW Posted February 27, 2021 Author Share Posted February 27, 2021 It seems to me that plugins that have problems with new layers being filled with transparent black will already have problems now that selections are erased with transparent black. 15 minutes ago, ardneh said: If black alpha became the norm for New Layers could they be converted to white alpha easily? You could use a plugin like Transparent to Transparent White. Having to use a plugin may be less appealing that using the built-in commands; however, leaving in an inconsistency in order to support a function that's rarely needed seems to fall into the "It's not a bug, it's a feature" category. Quote Link to comment Share on other sites More sharing options...
Red ochre Posted February 27, 2021 Share Posted February 27, 2021 In the 'white stripes' thread, I would think @ZerTerO would do better to use non anti-aliased selections as E.E.R suggests. My 'Selection2clear' plugin fills the selection with transparent white (and maintains the selection). My 'Object2colour' can easily change the colour of zero alpha areas (select 'clean clear' from the preset options for transparent white)... it was partly written to fix the problem encountered by @Doughty - here (I subsequently rewrote Gradients Galore and it no longer suffers from this problem.) I believe @Boltbait favours keeping the colours of erased areas in case the user wants to recover them by increasing the alpha. New layers are currently created transparent white...hence I use that convention. @MJW would prefer transparent black... completely logical but it may have unintended consequences. I don't really mind what decision is reached I just wish Windows would display thumbnails predictably!🙄 New transparent white layers with areas of transparent black (from erasing) seems to be worst choice of all.🤪 The colour value of a fully transparent pixel should not really be used when blending pixels values but I can't guarantee that I have not done that on older effects. I note using the standard Gaussian blur on an object currently changes transparent white to transparent black regardless of the size of blur, so perhaps the decision has already been made?😉 Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
midora Posted February 27, 2021 Share Posted February 27, 2021 5 hours ago, Red ochre said: (Ps. both files have a background of BGRA = 0,0,0,0) You are talking about the bKGD chunk in PNG? This chunk doesn't provide an alpha value and viewers are allowed to ignore it. Did you compare the color model and transparency chunks? I never checked which chunks are written by paint.net... 1 Quote Link to comment Share on other sites More sharing options...
Red ochre Posted February 28, 2021 Share Posted February 28, 2021 2 hours ago, midora said: You are talking about the bKGD chunk in PNG? No, just the pixel values measured with the ink dropper tool. I have no idea about how the information is stored within the png file. I'm happy to upload I have now uploaded both files to my site if you wish to investigate why the Optipng version displays correctly and the standard png, created by Pdn, doesn't. The files can downloaded here: plain png version and the Optipng version I can't find the bKGD chunk when searching through either file in Notepad+. Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
null54 Posted February 28, 2021 Share Posted February 28, 2021 1 hour ago, Red ochre said: Optipng version displays correctly and the standard png, created by Pdn, doesn't. The Optipng version uses an 8-bit palette with a transparent color index, and the paint.net is saved as 32-bit RGBA. 1 Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
Red ochre Posted February 28, 2021 Share Posted February 28, 2021 Many thanks for taking a look @Null54. Perhaps they were bad example files to choose. I have others in full (24 bit) colour with (8 bit) transparency saved with standard Paint.net .png that also show with a black background in Windows explorer .. and yet others that show a white background? I have even known the thumbnail background to change from black to white when changing thumbnail size or refreshing the Windows explorer view. However it is files with black images on a transparent background that are most problematic for me, so will stick with saving as Optipng for those. I've just read a little about .pngs here I'm currently opening the .png files in Notepad + as 'normal text files' - is there a way to show the numbers or are the byte values always displayed as strange ASC11 characters (I assume)?... I'm new to this! Many thanks (Hope I haven't hijacked your thread @MJW, sorry) Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
null54 Posted February 28, 2021 Share Posted February 28, 2021 44 minutes ago, Red ochre said: is there a way to show the numbers or are the byte values always displayed as strange ASC11 characters (I assume)? I use a hex editor when examining binary files like images (HxD is one free option). You will not be able to see the pixel color values because PNG files store the image data in a compressed format. 43 minutes ago, Red ochre said: Perhaps they were bad example files to choose. I have others in full (24 bit) colour with (8 bit) transparency saved with standard Paint.net .png that also show with a black background in Windows explorer .. and yet others that show a white background? I do not have any idea what Windows Explorer does when it displays files in its thumbnail view. Some of the WIC (Windows Imaging Component) modes used for resizing images convert images with an alpha channel to premultiplied alpha as part of their processing, so if the image was resized to generate the thumbnail it can result in transparent white being converted to transparent black. 1 Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
midora Posted February 28, 2021 Share Posted February 28, 2021 As @null54said, HxD is a good free option to check the content of PNGs. All chunks are in the form [length32 name32 data crc32]. So you can search for the text bKGN. Both example PNGs show a white background in Windows explorer on my win10. But bKGN is not used. This is one of the methods optimizer can use to reduce the size of PNGs. Quote 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.