frio Posted October 18 Posted October 18 (edited) Quick Alpha->Alpha to Gray Quick Alpha->Clipboard to Alpha, multiply Quick Alpha->Clipboard to Alpha, overwrite Quick Alpha->Gray to Alpha, primary color Quick Alpha->Gray to Alpha, retain color Quick Alpha->Remove Alpha Quick Alpha->Silhouette, primary color Download: F_QuickAlpha.zip Description: I made myself a single click, no options -set of alpha handling plugins quite long ago, but I figured I'd share them. Note: these plugins do nothing that other existing plugins couldn't accomplish but for my workflow having them in a single menu, with a single click, with no UI is very useful - the vast majority of time I do not require all the extra features and settings many plugins offer and having to select layers and parameters slows me down a lot. That is also why they go into their own menu folder. Alpha to Gray Similar to: BoltBait's Alpha to Gray Converts the current layer's alpha channel into grayscale values. Original color data and alpha channel are removed. Clipboard to Alpha Similar to: BoltBait's Paste Alpha, illnab1024's Alpha Mask Import The current image on the clipboard is scaled to the image's dimensions (note: NOT the selection's!) and converted to grayscale by averaging the color values. Overwrite inserts it into the alpha channel. If nothing usable is on the clipboard, nothing happens. Multiply mode instead blends it with the existing alpha channel by multiplying the values. Gray to Alpha Similar to: BoltBait's Gray to Alpha / Apply Alpha Mask, Rider01's Alphalizer Interprets the current layer as grayscale by averaging the color values and puts that into the alpha channel. Primary color mode replaces all color data with the current primary color, ignoring the color's own alpha. Retain color does not replace color data. Remove Alpha Similar to: a whole lot of plugins Simply sets the alpha to fully opaque. Color is retained. Silhouette, primary color Similar to: Mike Ryan's Silhouette Plus Keeps alpha and sets color to primary color, ignoring the color's own alpha. Same as Alpha to Gray followed by Gray to Alpha, primary. Change log: Version 1.1, 2024-11-19: Added Silhouette, primary color. Version 1.0, 2024-10-18: Initial release. Edited November 19 by frio Added Silhouette, primary color 1 5 Quote
Rick Brewster Posted October 18 Posted October 18 If this is using new 5.1 APIs, then I'll move it to Plugin Developer's Central for now. Once 5.1 stable is released, I'll move it back. (remind me if I forget) Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html
Rick Brewster Posted October 18 Posted October 18 Once thing I noticed is that you're using IClipboardService.TryGetImage() and then copying it directly into a BGRA32 bitmap. TryGetImage() does not necessarily provide a BGRA32 bitmap! So this will either fail or it might even crash. If you want a guaranteed BGRA32 bitmap, use TryGetImageBgra32() or TryGetImage<ColorBgra32>() (they're equivalent) 1 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html
frio Posted October 18 Author Posted October 18 3 minutes ago, Rick Brewster said: If this is using new 5.1 APIs, then I'll move it to Plugin Developer's Central for now. Once 5.1 stable is released, I'll move it back. (remind me if I forget) Alright, gotcha! I made these a while back but they had had no author info or anything since they were for private use, when I recompiled them I had to change the ones accessing the clipboard/primary color, the others weren't using anything that changed, but best keep them in a bundle. 2 minutes ago, Rick Brewster said: If you want a guaranteed BGRA32 bitmap, use TryGetImageBgra32() or TryGetImage<ColorBgra32>() (they're equivalent) Understood, I'll change that up and reupload in a bit. Quote
frio Posted November 13 Author Posted November 13 On 10/18/2024 at 8:32 PM, Rick Brewster said: Once 5.1 stable is released, I'll move it back. (remind me if I forget) Reminder! Quote
Rick Brewster Posted November 13 Posted November 13 4 minutes ago, frio said: Reminder! done! 1 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html
frio Posted November 19 Author Posted November 19 V1.1 update: added Silhouette, primary color. I realized "keep alpha but change all color to primary" happens often enough for me to warrant a variant. 1 1 Quote
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.