Jump to content

PhilipLB

Members
  • Posts

    21
  • Joined

  • Last visited

Everything posted by PhilipLB

  1. Hi, I'd find this very usefull: Select either the paintbrush or the pencil. Hold down shift. The first click on the canvas will now be the startingpoint of a line and every next click with shift-down generates a line from the last click-position to the current click-position.
  2. Do you mean this: - you add a new layer and draw everything you want to have selected black - you run the plugin and everything on the current layer which is black, gets selected ?
  3. What are burnt edges? Could you show an example of it?
  4. I think in no way, didn't know about it. But nonetheless usefull as I'll write at least 2 more plugins based on this.
  5. Hi, here is a plugin to perform the basic morphologic operations dilate and erode. More to come based on this. Morphologic.zip
  6. I think the original code is more performant.
  7. Yeah, sorry, wrote a bit confusing, I'm new to the API of Paint.NET and actually new to C#. I wrote only a few plugins for TheGIMP in C so far.
  8. Updated a minor bug in both. Could cause problems with multithreading.
  9. Oh, thanks for that hint. Yeah, sure, of course this can happen. I'll switch to OnSetRenderInfo then.
  10. I stayed with my first solution with the flag. A private boolean, which indicates, whether it's the first call of the render-function. If so, I loop over so whole Sourceimage to determine the min- and maxvalues of the pixels.
  11. The difference: The default one only detects angles in a certain direction. Mine detects all edges. See on the image, how some edges aren't detected by the default-one. The ui of mine is simple. Just a slider to controll the amount of noise-reduce. First image: Really nice result with noise-reduce = 1 and then normalized (See viewtopic.php?f=16&t=23154 ).
  12. I don't know, how the default-one works. I think it goes in a specific angle with scanlines over the image and the result is the first derive of the pixels in this direction. Mine goes in x- and y-direction with the second derive and combines the two results (Laplace-filter). First, it reduces the noise with a gaussian blurr. -> Laplace-Kernel: 0 1 0 1 -4 1 0 1 0
  13. Sure, but a different one with some angle-stuff.
  14. Right. I updated the zip in the first post.
  15. Hi, first try with some ui. A simple Mexican Hat Edge Detect filter. Mexican Hat Edge Detect.zip
  16. Effects -> Photo -> Egalize Effects -> Photo -> Normalize Hi, I'm getting started with writing plugins for Paint.net. To get my feet wet, I chose two simple histogram-transformations, normalize and egalize. Normalize stretches the histogram, so the whole range of colors is used and egalize modifies the colors, so they are used in the same amount. Both operations are trying to get more information out of the image. RangetransformationsPlugins.zip
  17. Hi, for my plugin I need the min- and maxvalues of R,G,B, so I need to loop over the whole source. How do I do that? The render-function seems to be called often and srcArgs.Surface seems to contain only the current tile. I tried this, but this is very slow and crashes: for (int y = 0; y < srcArgs.Bitmap.Height; ++y) { for (int x = 0; x < srcArgs.Bitmap.Width; ++x) { r = srcArgs.Bitmap.GetPixel(x, y).R; g = srcArgs.Bitmap.GetPixel(x, y).G; b = srcArgs.Bitmap.GetPixel(x, y).B; if (r < minR) { minR = r; } if (g < minG) { minG = g; } if (b < minB) { minB = b; } if (r > maxR) { maxR = r; } if (g > maxG) { maxG = g; } if (b > maxB) { maxB = b; } } } And if I'm right with my tile-suspicion, it would be kinda unessessary to determine the min- and maxvalues every time render is called. Is there any way to do this only once? //Edit: Ok, found a way to actually debug some values within a dll, sry, C#-beginner. render() is actually called ca a million times. Each time the srcArgs.Surface has the same width and height as the original image. This is weird because it means tiles seems not the reason for the many calls? //Edit2: "Solved" it now with some private class variables and a flag which indicates, whether it is the first call of render. Kinda ugly though.
  18. But I'd also like to see the generated source. So 2 feature-requests: - A button "Save generated source" or so - A button "Build and save dll" to specify, where the dll is saved
  19. Works now. Is there any way to get the generated source-code? I'd like to release my plugin as opensource.
  20. Hi, when I try to compile a plugin with CodeLab which doesn't exist yet, I get an error: Internal Error: System.IO.FileNotFoundException: Could not find file blabla.dll where blabla.dll stands for some random DLL-Filename like ucb9af.dll. Then the plugin does not appear in the entered submenu, it appears directly in the Effects-Menu and works fine.
×
×
  • Create New...