archip 4 Posted June 4, 2013 Report Share Posted June 4, 2013 This plugin deletes small islands of pixels. When I use the magic wand, some pixels aren't deleted. The plugin deletes them, if they are surrounded by transparent pixels. : It has two parameters : - radius threshold : Delete island up to this size. - alpha threshold : A pixel will be considered transparent up to this value. @toe_head2001 has recompiled this plugin to make it compatible with PDN 4.0+. StrayPixelRemover.zip Spoiler Original PDN 3.5.11 version: StrayPixelRemover.zip <--- Incompatible with Paint.NET 4.x 2 Quote Link to post Share on other sites
nitenurse79 690 Posted June 4, 2013 Report Share Posted June 4, 2013 I would like to try this out, but for some reason my browser (both IE10 & Chrome) and my Avast internet security won't permit me to download the file ? Quote Link to post Share on other sites
pyrochild 362 Posted June 4, 2013 Report Share Posted June 4, 2013 PS: I can't upload DLL files so you have to rename the "StrayPixelRemover.txt" to "StrayPixelRemover.dll".Zip them. A lot more people understand ZIP files than changing extensions, especially since Windows hides extensions by default. 1 Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to post Share on other sites
archip 4 Posted June 4, 2013 Author Report Share Posted June 4, 2013 Thanks, I've updated the first post Quote Link to post Share on other sites
Lloyd 139 Posted June 4, 2013 Report Share Posted June 4, 2013 This is looking interesting. Do you need to make a - selection - surrounding the stray pixel(s) or will this auto remove them for you? Quote Link to post Share on other sites
Ego Eram Reputo 2,754 Posted June 5, 2013 Report Share Posted June 5, 2013 It will auto remove if it finds a pixel to be surrounded by transparent pixels. Making a selection will constrain the effect within the selection bounds. @archip: I'm going to take issue with the menu placement. Misc? To me, that's less than helpful. Why not place it in the Object menu? (as this operates on tiny pixel objects). 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 post Share on other sites
Lloyd 139 Posted June 5, 2013 Report Share Posted June 5, 2013 It will auto remove if it finds a pixel to be surrounded by transparent pixels. Making a selection will constrain the effect within the selection bounds. Thank you EER. Quote Link to post Share on other sites
archip 4 Posted June 5, 2013 Author Report Share Posted June 5, 2013 For now, the effect is applied to the entire image, I'll change this when I find how. I'll also change the menu placement. If you have suggestion post them and I'll see what I can do. Quote Link to post Share on other sites
archip 4 Posted June 8, 2013 Author Report Share Posted June 8, 2013 I have updated the plugin! Quote Link to post Share on other sites
Shadowfire Omega 0 Posted August 28, 2013 Report Share Posted August 28, 2013 Is there any way to target pixels that are surrounded on three sides by transparency? To clear up little outcroppings and such. Quote Link to post Share on other sites
Allan 0 Posted November 30, 2016 Report Share Posted November 30, 2016 I have tried installing this on Windows 10 and Windows 7 and in both in crashes paint. Quote Link to post Share on other sites
toe_head2001 1,789 Posted November 30, 2016 Report Share Posted November 30, 2016 On 11/30/2016 at 6:30 AM, Allan said: I have tried installing this on Windows 10 and Windows 7 and in both in crashes paint. I've updated the effect using the original source code provided by @archip in the first post. Fixes: - No longer crashes - Faster and more efficient - Works properly on non-rectangular selections 5 Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to post Share on other sites
Djisves 534 Posted November 30, 2016 Report Share Posted November 30, 2016 I came back to this thread to confirm the crash and probable incompatibility with PDN 4. Thank you toe_head. You fixed it in the time it took me to test it! Quote Link to post Share on other sites
Ego Eram Reputo 2,754 Posted December 28, 2016 Report Share Posted December 28, 2016 Thanks for the update toe_head. I've added your zip file to the first post. 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 post Share on other sites
AndrewDavid 730 Posted April 13, 2017 Report Share Posted April 13, 2017 First try and it crashed my paint. Crashlog sent to the usual email. Quote Link to post Share on other sites
toe_head2001 1,789 Posted April 13, 2017 Report Share Posted April 13, 2017 16 minutes ago, AndrewDavid said: First try and it crashed my paint. Crashlog sent to the usual email. You used the updated release I made, or the original one for paint.net v3? Post the crashlog here in this forum thread. Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to post Share on other sites
AndrewDavid 730 Posted April 13, 2017 Report Share Posted April 13, 2017 As you wish - the new one you just updated. Application version: paint.net 4.0.15 (Final 4.15.6309.42632) Time of crash: 2017-04-13 2:41:49 PM Application uptime: 00:01:23.0193871 Application state: Running Working set: 206,276 KiB Handles and threads: 1796 handles, 34 threads, 218 gdi, 248 user Install directory: C:\Program Files\paint.net Current directory: C:\Program Files\paint.net OS Version: 10.0.14393.0 Workstation x64 .NET version: CLR 4.0.30319.42000 x64, FX 4.6 Processor: "Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz" @ ~3193MHz (4C/4T, DEP, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, XSAVE) Physical memory: 8143 MB Video card: NVIDIA GeForce GT 720 (v:10DE, d:1286, r:161), Microsoft Basic Render Driver (v:1414, d:8C, r:0) Hardware acceleration: True (default: True) UI animations: True UI DPI: 96.00 dpi (1.00x scale) UI theme: Aero/Aero + DWM (Aero.msstyles) Updates: True, 2017-04-13 Locale: pdnr.c: en-US, hklm: en-US, hkcu: en-US, cc: en-CA, cuic: en-US Flags: Exception details: System.InvalidOperationException: Collection was modified; enumeration operation may not execute. at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) at System.Collections.Generic.List`1.Enumerator.MoveNextRare() at ExamplePropertyBased.StrayPixelsEffect.OnRender(Rectangle[] rois, Int32 startIndex, Int32 length) at PaintDotNet.Effects.Effect`1.Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, Int32 startIndex, Int32 length) in D:\src\pdn\src\Effects\Effect`1.cs:line 98 at PaintDotNet.Effects.BackgroundEffectRenderer.RenderWithClipMask(Effect effect, EffectConfigToken token, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, IRenderer`1 clipMaskRenderer) in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 170 at PaintDotNet.Effects.BackgroundEffectRenderer.RendererContext.RenderTile(EffectConfigToken token, Int32 tileIndex) in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 150 at PaintDotNet.Effects.BackgroundEffectRenderer.RendererContext.RenderNextTile(EffectConfigToken token) in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 142 at PaintDotNet.Effects.EffectRendererWorkItemQueue.OnExecuteNextWorkItem() in D:\src\pdn\src\PaintDotNet\Effects\EffectRendererWorkItemQueue.cs:line 131 at PaintDotNet.Threading.MultithreadedWorkItemDispatcher.WorkThreadProc(Object context) in D:\src\pdn\src\Core\Threading\MultithreadedWorkItemDispatcher.cs:line 512 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart(Object obj) Managed assemblies: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @ C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll PaintDotNet, Version=4.15.6309.42632, Culture=neutral, PublicKeyToken=null @ C:\Program Files\paint.net\PaintDotNet.exe PaintDotNet.Base, Version=4.15.6309.42632, Culture=neutral, PublicKeyToken=null @ C:\Program Files\paint.net\PaintDotNet.Base.dll WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 @ C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @ C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @ C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @ C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 @ C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.dll PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 @ C:\WINDOWS\Microsoft.Net\assembly\GAC_64\PresentationCore\v4.0_4.0.0.0__31bf3856ad364e35\PresentationCore.dll System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @ C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll PaintDotNet.Core, Version=4.15.6309.42632, Culture=neutral, PublicKeyToken=null @ C:\Program Files\paint.net\PaintDotNet.Core.dll PaintDotNet.SystemLayer, Version=4.15.6309.42632, Culture=neutral, PublicKeyToken=null @ C:\Program Files\paint.net\PaintDotNet.SystemLayer.dll PaintDotNet.Framework, Version=4.15.6309.42632, Culture=neutral, PublicKeyToken=null @ C:\Program Files\paint.net\PaintDotNet.Framework.dll PaintDotNet.Resources, Version=4.15.6309.42632, Culture=neutral, PublicKeyToken=null @ C:\Program Files\paint.net\PaintDotNet.Resources.dll Quote Link to post Share on other sites
Rick Brewster 1,751 Posted April 14, 2017 Report Share Posted April 14, 2017 That's an exception you'll see if your `List<T>` is modified (e.g. via `Add()` or `Remove()` etc.) at the same time as enumeration (like with a `foreach`). So, basically, the use of this `List<T>` is being done without synchronization (locks). This can be fixed in many ways. One hacky approach is to use `EffectFlags.SingleThreaded`. Edit: darn, I forgot that this forum doesn't support Markup. Pretend all of my `things in ticks` are using a "code" font Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to post Share on other sites
toe_head2001 1,789 Posted April 14, 2017 Report Share Posted April 14, 2017 Here's a small update to fix the crash that @AndrewDavid was experiencing. StrayPixelRemover.zip 3 Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to post Share on other sites
Ego Eram Reputo 2,754 Posted April 15, 2017 Report Share Posted April 15, 2017 Nice. Thank you Toe-Head. I've updated the first post. 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 post Share on other sites
ph9214 0 Posted July 17, 2020 Report Share Posted July 17, 2020 How do we Use this tool nowadays? Quote Link to post Share on other sites
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.