paladinz Posted November 7, 2007 Share Posted November 7, 2007 I am very new to Paint.NET effects development and I have not been able to find answers to these 2 questions. If they have already been answered elsewhere, my apologies (please let me know where, though!): I am using CodeLab, if it matters. 1. I am trying to create an effect that does a custom palletization routine on the image. I basically need to: (a) go through the entire image and collect color frequencies, then ( create a color index, followed by © map each pixel in the image to one of those indexed colors. The Render function is called multiple times for different Rectangles. Right now, I'm basically throwing a small hack so that it ignores the call each time after the first one; I do all of these operations in the first call. This effectively takes away any multithreading in the code. The problem is that (a) and ( MUST be done before ©. (a) and © can both be multithreaded, but I have to ensure that there are 3 discrete passes. How do I accomplish this? Is there a PreRender() or PostRender() function? 2. Is there a way to batch an effect on multiple images? (I have a whole folder of images I would like palletized.) Thanks! Quote Link to comment Share on other sites More sharing options...
BoltBait Posted November 7, 2007 Share Posted November 7, 2007 Instead of using CodeLab, you should probably be using Sepcot's excellent template for writing effects: viewtopic.php?f=5&t=2618 Since you understand the problem you are having, you should see how the render function in the template solves it for you. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game 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.