meifwong Posted April 2, 2022 Share Posted April 2, 2022 I have an image, but it has both opaque, half-transparent (anywhere between a visibility of 1% to 99%) and transparent pixels. Can I convenietly delete any pixel with a transparency of 1% to 99% (not fully transparent and not fully opaque)? Quote Link to comment Share on other sites More sharing options...
BoltBait Posted April 2, 2022 Share Posted April 2, 2022 Here is a CodeLab script to do what you want: // Name: Transparency Threshold // Submenu: Adjustments // Author: BoltBait // Title: Transparency Threshold v1.0 // Version: 1.0 // URL: https://forums.getpaint.net/topic/119839-how-to-delete-transparent-pixels-from-an-image/ // Help: Copyright (C)2022 BoltBait #region UICode IntSliderControl Amount1 = 128; // [0,255] Threshold CheckboxControl Amount2 = true; // Maximize alpha of remaining pixels #endregion void Render(Surface dst, Surface src, Rectangle rect) { ColorBgra currentPixel; for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; for (int x = rect.Left; x < rect.Right; x++) { currentPixel = src[x,y]; if (currentPixel.A <= Amount1) { currentPixel.A = 0; } else { if (Amount2) { currentPixel.A = 255; } } dst[x,y] = currentPixel; } } } If someone gave you a CodeLab script and just want to know what to do with it, read this: https://forums.getpaint.net/topic/111233-codelab-for-average-users-a-laymans-guide/ Enjoy. 1 Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
Pixey Posted April 2, 2022 Share Posted April 2, 2022 5 hours ago, meifwong said: Can I convenietly delete any pixel with How about using AA's Assistant on your image/text. Quote How I made Jennifer & Halle in Paint.net My Gallery | My Deviant Art "Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon. Link to comment Share on other sites More sharing options...
MJW Posted April 3, 2022 Share Posted April 3, 2022 Red ochre's Alpha threshold plugin can do that. 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.