Jump to content

politician

Newbies
  • Posts

    8
  • Joined

  • Last visited

politician's Achievements

Rookie

Rookie (2/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Works for me. Everyone in this forum is damn helpful. I've gotten like 5 knowledgeable responses from 5 different people on just 2 threads.
  2. That's brilliant. I was just sitting here thinking that I'd have to build two plugins, one to push the effect to the clipboard/static state and then one to pop it onto a new layer. I'm glad I rechecked the forums...
  3. Hey, thank you for the quick response. I didn't expect to hear from the guy this quick. So, if I understand correctly, 1. In the constructor, I can opt-in to single-threaded processing. 2. When OnSetRenderInfo is invoked, I'm free to access the source surface, create a temporary surface, and render to it. 3. Finally, when OnRender is invoked, I'm supposed to just blit to the destination surface (clipped by the rois, of course). Does this mean that OnRender will be called 1 time with a full list of ROIs, or that OnRender will be called multiple times (sequentially) with partial ROIs? Although, I suppose it doesn't matter so long as I can just do all the work on OnSetRenderInfo. Thanks again.
  4. The typical way to do this is to use the Trace class. How to use Trace and Debug in C# http://support.microsoft.com/kb/815788 Trace Listeners Overview (MSDN) http://msdn.microsoft.com/en-us/library/4y5y10s7.aspx
  5. If you're sane, I suppose you should say, "no, that sounds like a hack," and I would totally agree. So let me ask a slightly different question, does Paint.NET guard its render threads with a timeout?
  6. Thanks for the quick response! That's too bad about Effects plugins, but I certainly understand how it simplifies the implementation. I don't think FileType plugins will be suitable for what I'd like to do since I believe they are for exporting into alternate file formats, correct? It sounds like my example scenario is not possible.
  7. I have a few questions about plugins and their ability to interact with layers. First, suppose I have an image with 2 layers where the top layer is transparent and the bottom layer is some image. When I run a plugin with the top layer selected, will I be able to read the pixels from the bottom layer? Or will I see the blended pixels from both layers? When I write pixels back, am I writing to the top layer? Second, can my plugin create new layers by itself? Or is that something the user will have to do? For example, can I build a plugin that reads the RGB values of an image and then write the red channel to a new layer so that when the effect ends the user can flip between the original layer and the new "red" layer? Thanks,
  8. I'd like to try my hand at porting some image processing algorithms from AForge.NET to Paint.NET plugins, but I'm concerned that the ROI work item segmentation scheme will adversely affect the algorithms (which, due to their complexity, I'd like to minimize changes to). So, for instance, connected components labeling will identify all of the black "blobs" in a black & white (binary) image where white is the background color, but the algorithm relies on building up some shared global state in the form of a disjoint set forest. Before I go down this rabbit hole, I'd like to know if ROI is going to be a showstopper. My understanding of ROI is limited to (1) Paint.NET segments effects processing into multiple write regions which are scheduled in parallel, and (2) each round has read access to the entire image. I'm thinking that for connected components labelling (the output of which is rectangles around each blob) that I could just block all but one of the ROI threads (via a Mutex), do the analysis on the one unblocked thread, then unblock/wake the locked threads to render the resulting (clipped) rectangles. I suppose I could host the data structure in the current AppDomain (i.e. as a static variable). Does that sound reasonable? Am I missing anything (like, preferably, a synchronous PreRender API)? Let me know if you need more details about what I'm trying to do. Thanks,
×
×
  • Create New...