BoltBait Posted September 3, 2007 Share Posted September 3, 2007 I know how to call the Gaussian Blur function to blur from the source canvas to the destination canvas. this.blurEffect.Render(blurToken, dstArgs, srcArgs, rois, startIndex, length); This always does a replacement on the destination canvas. Is there a way to do this AND specify a blending operation? For example, could I call the Gaussian Blur function from the source canvas to the desintation canvas and specify the "Darken" blending operation so that the destination canvas would be the result of blending the image already on the destination canvas with the gaussian blur of the source canvas (using the specified blending op, obviously)? Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
pyrochild Posted September 3, 2007 Share Posted September 3, 2007 Look into the (PaintDotNet.Data?).UserBlendOps.MultiplyBlendOp and its Apply() methods... If you still have the source code from my Outline Object plugin in your inbox, then you can look at the way I use the UserBlendOps.NormalBlendOp class. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
BoltBait Posted September 3, 2007 Author Share Posted September 3, 2007 No, I know how to use blend ops. What I want to do is blur from the source canvas to the destination canvas (and other effects) and apply a blend op on the way--without having to create another canvas as an intermediate step. Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
pyrochild Posted September 3, 2007 Share Posted September 3, 2007 No, you can't, as far as I know, even so much as run Gaussian Blur via code without providing it with a destination Surface. Whether that Surface is your final destination Surface, or an intermediate one that you create, is up to you. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
Rick Brewster Posted September 3, 2007 Share Posted September 3, 2007 Remember how I said the rendering architecture is very limiting right now? If you had a 3rd surface to work with, everything would be possible. But, memory usage makes that prohibitive. As is, we must wait for the retained-mode, tile-based rendering of Paint.NET v4.0 ... 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 September 3, 2007 Share Posted September 3, 2007 If you had a 3rd surface to work with, everything would be possible. But, memory usage makes that prohibitive. Given the huge amount of memory on modern PCs, wouldn't this would only be a problem far very large images? IIRC, your resize code allocates extra surfaces to accomplish its processing... Quote Link to comment Share on other sites More sharing options...
Simon Brown Posted November 25, 2007 Share Posted November 25, 2007 Just render from the destination canvas onto itself. Quote Link to comment Share on other sites More sharing options...
pyrochild Posted November 26, 2007 Share Posted November 26, 2007 Just render from the destination canvas onto itself. That can't always work, depending on what you're doing. Oh, and this topic is 2 months old. Let it die in peace. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! 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.