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!