evanolds Posted November 13, 2006 Share Posted November 13, 2006 Is there a safe and easy way to read the entire image into memory before I display my effect dialog? I can use the render function and some tricks to pass the entire image to my dialog if it needs it, but this gets a little messy and involves some large allocated objects in the config token, which I take it is not desired. Let's say I wanted to make an effect like Photoshop's "variations", where you see 9 or so different thumbnail previews at once (very helpful). Any suggestions for getting the active image to my config dialog? Quote There are no warranties whatsoever on my plug-ins. Use them at your own risk. You may redistribute them if you'd like, but I'd prefer you just link to the download on my site. Please do not modify and redistribute. Link to comment Share on other sites More sharing options...
Rick Brewster Posted November 13, 2006 Share Posted November 13, 2006 Oh man, yeah what you're trying to do goes far beyond the scope of the current effect framework's design. Something like this would want to be built in to Paint.NET at this point whereby it could render multiple effects (or tokens) using the same src and dst buffers so as to save all tons of memory. This does give me some ideas though -- I'll have to get back to you. Nothing related to this will make it for v3.0, fyi. 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...
Ed Harvey Posted November 17, 2006 Share Posted November 17, 2006 Is there a safe and easy way to read the entire image into memory before I display my effect dialog? The source surface is available from the EffectConfigDialog.EffectSourceSurface property after the OnLoad event. This is how I got the info for the histogram in my 'Threshold' effect. But, as Rick pointed-out, this may not help much if you effect is complex. If the effect is a pixel-op, you could extract a thumbnail image from the source surface and then duplicate the thumbnail once for each preview image, appply a different effect to each... Quote Link to comment Share on other sites More sharing options...
evanolds Posted November 20, 2006 Author Share Posted November 20, 2006 The source surface is available from the EffectConfigDialog.EffectSourceSurface property after the OnLoad event. Ah, I think I actually used this in one of my earlier effects that I didn't release, but I'd forgotten. Thanks. Quote There are no warranties whatsoever on my plug-ins. Use them at your own risk. You may redistribute them if you'd like, but I'd prefer you just link to the download on my site. Please do not modify and redistribute. 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.