Fisherman's Friend Posted April 6, 2009 Share Posted April 6, 2009 I recently edited a bunch of digicam photos and encountered one memory error after another using this plugin. I have an x86 PC with 3 GB RAM and my pagefile can expand to at least 6 (?) GB. No other plugin caused problems, it was only this one, and it did it frequently and rather randomly. So I guess there's a mistake in the code. This is one of the exception logs Paint.NET showed when the plugin crashed: Datei: C:\Program Files\Paint.NET\Effects\IncreaseLocalContrast.dll Effektname: MeeSoft.Paint.Net.Plugins.IncreaseLocalContrast.EffectPlugin Vollständige Fehlermeldung: PaintDotNet.WorkerThreadException: Worker thread threw an exception ---> System.OutOfMemoryException: Eine Ausnahme vom Typ "System.OutOfMemoryException" wurde ausgelöst. bei MeeSoft.Mathematics.LinearAlgebra.MatrixFloat32.New(Int32 nRows, Int32 nCols) bei MeeSoft.ImageProcessing.PlanarBitmap.New(Int32 width, Int32 height, Int32 planeCount, Double gamma) bei MeeSoft.ImageProcessing.PlanarBitmap.Assign(Bitmap source) bei MeeSoft.Paint.Net.Plugins.IncreaseLocalContrast.EffectOperation.CheckParams(EffectPluginConfigToken param, Bitmap srcBitmap) bei MeeSoft.Paint.Net.Plugins.IncreaseLocalContrast.EffectPlugin.Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, Int32 startIndex, Int32 length) bei PaintDotNet.Effects.Effect.Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois) bei PaintDotNet.Effects.BackgroundEffectRenderer.ThreadFunction() --- Ende der internen Ausnahmestapelüberwachung --- bei PaintDotNet.Effects.BackgroundEffectRenderer.Join() bei PaintDotNet.Effects.BackgroundEffectRenderer.Abort() bei PaintDotNet.Menus.EffectMenuBase.DoEffect(Effect effect, EffectConfigToken token, PdnRegion selectedRegion, PdnRegion regionToRender, Surface originalSurface, Exception& exception) In most of the cases the crash occured when pressing the OK button, during the preview it was OK. Also, it was only a "little" error, only the plugin "died", Paint.NET continued to run. It works fine with smaller pics. Quote Link to comment Share on other sites More sharing options...
MichaelVinther Posted April 6, 2009 Author Share Posted April 6, 2009 Looks bad. How big are your images? I didn't see it in my tests but that was probably because I restarted PDN frequently. This is one of my first C# projects and I don't have much experince with memory management under .net yet... I going out travelling for four weeks soon and I probably won't have time to look at it before so I will try to find a solution when I get back. Quote Michael Vinther Link to comment Share on other sites More sharing options...
Fisherman's Friend Posted April 9, 2009 Share Posted April 9, 2009 Looks bad. How big are your images? ~2500X1900 px, 150dpi. Quote Link to comment Share on other sites More sharing options...
MichaelVinther Posted November 24, 2009 Author Share Posted November 24, 2009 A new version has been released which hopefully fixes some of the issues with the previous, and also has new sliders for adjusting the contrast in shadow and highlight areas. Quote Michael Vinther Link to comment Share on other sites More sharing options...
RedFalcon Posted November 25, 2009 Share Posted November 25, 2009 Thank you! Quote Link to comment Share on other sites More sharing options...
Fisherman's Friend Posted November 30, 2009 Share Posted November 30, 2009 Thank you! Seconded. But the plugin has a major rendering issue. It happens apparently when you enlarge the image till it is shown larger than the Paint.NET window. As a consequence, the result does not replace the original, it is rendered inside the picture. Original: Plugin used in "window" picture size: Plugin used (same settings) with the picture larger than the window (in my example, I enlarged it to 100% - 1024x768 - with the window around 890x630, the following image shows the result zoomed out to display the effect): Users of Windows Vista and Windows 7 may restore the old plugin version via shadow copies ("previous versions") until a fix is provided. Note that this works only in certain editions. Interested users can use "Help and Support" for further information. Despite any problems I want to say thanks that this plugin is still maintained and updated. Sadly, I do not understand the local maximum/minimum option. The image just turns black or white..? Quote Link to comment Share on other sites More sharing options...
MichaelVinther Posted December 1, 2009 Author Share Posted December 1, 2009 The rendering problem should be fixed now. Quote Michael Vinther Link to comment Share on other sites More sharing options...
Fisherman's Friend Posted December 7, 2009 Share Posted December 7, 2009 The rendering problem should be fixed now. It is my pleasure to confirm that the plugin seems to work properly now. At least I failed in reproducing the error shown above. Thanks for the quick fix. Just out of interest, did the old version of the plugin use the luminace or RGB based method? Quote Link to comment Share on other sites More sharing options...
MichaelVinther Posted December 7, 2009 Author Share Posted December 7, 2009 The old version used the luminace method. The luminace method will often add more contrast, but it sometimes also produces false colors, e.g. makes a big blue sky turn cyan. The RGB method should preserve the original colors perfectly. Quote Michael Vinther Link to comment Share on other sites More sharing options...
007 Nab Posted December 9, 2009 Share Posted December 9, 2009 Any chance you can keep the version names consistent? That way they'll be overwritten as users update their plugins. Quote "pyrochild, you're my favorite person ever. We should go snowboarding some time."~ 007 Nab. Ish. PDN Gallery | I Made a Deviant Art! Link to comment Share on other sites More sharing options...
MichaelVinther Posted December 9, 2009 Author Share Posted December 9, 2009 Any chance you can keep the version names consistent? What do you mean? The name of the file? As far as I remember it has always been IncreaseLocalContrast.dll Quote Michael Vinther Link to comment Share on other sites More sharing options...
007 Nab Posted December 10, 2009 Share Posted December 10, 2009 Funny... the version I replaced was called "LocalContrast.dll" Quote "pyrochild, you're my favorite person ever. We should go snowboarding some time."~ 007 Nab. Ish. PDN Gallery | I Made a Deviant Art! Link to comment Share on other sites More sharing options...
Fisherman's Friend Posted December 10, 2009 Share Posted December 10, 2009 Funny... the version I replaced was called "LocalContrast.dll" I assume you accidently deleted Tanel's plugin, which goes by that name. Link Quote Link to comment Share on other sites More sharing options...
007 Nab Posted December 10, 2009 Share Posted December 10, 2009 Woah :o I didn't even realize there were two of 'em :oops: So what's the difference? *goes and reads* Sorry for the trouble Quote "pyrochild, you're my favorite person ever. We should go snowboarding some time."~ 007 Nab. Ish. PDN Gallery | I Made a Deviant Art! Link to comment Share on other sites More sharing options...
friendly7 Posted September 11, 2010 Share Posted September 11, 2010 (edited) Wow, this is what I have been looking for. Thank you. Found this thread after searching extensively under HDR and High Dynamic Range ( maybe you should rename it :oP ) Its done amazing things to some random car and landscape pics I snapped with my generic 8 mp . Thanks again. This and the BoltBait's Gaussian Blue Plus V1.1 ( set to darken and slider on 10 ) are going to work magic for me. Awesome ( took me a long time to find this after perusing many dead end HDR threads ) NEEDS A NEW TITLE :o) "Awesome HDR" Edited September 11, 2010 by friendly7 Quote Link to comment Share on other sites More sharing options...
MichaelVinther Posted April 6, 2012 Author Share Posted April 6, 2012 I have just posted an update which has a few more parameters to tweak the effect. The new version should be better at preserving realistic colors. Quote Michael Vinther Link to comment Share on other sites More sharing options...
MichaelVinther Posted February 8, 2016 Author Share Posted February 8, 2016 This plugin has been replaced by my Laplacian pyramid filter effect plugin - http://forums.getpaint.net/index.php?/topic/24563-laplacian-pyramid-filter-effect-plugin/- which has more features and produces much better quality, Quote Michael Vinther 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.