PhilipLB
Members-
Posts
21 -
Joined
-
Last visited
Everything posted by PhilipLB
-
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 ?
-
Burn Effects Plug-in Request!
PhilipLB replied to dasNachtMahr's topic in Paint.NET Discussion and Questions
What are burnt edges? Could you show an example of it? -
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.
-
Hi, here is a plugin to perform the basic morphologic operations dilate and erode. More to come based on this. Morphologic.zip
-
I think the original code is more performant.
-
Thanks.
-
How to loop over all sourcepixels?
PhilipLB replied to PhilipLB's topic in Plugin Developer's Central
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. -
Updated a minor bug in both. Could cause problems with multithreading.
-
How to loop over all sourcepixels?
PhilipLB replied to PhilipLB's topic in Plugin Developer's Central
Oh, thanks for that hint. Yeah, sure, of course this can happen. I'll switch to OnSetRenderInfo then. -
How to loop over all sourcepixels?
PhilipLB replied to PhilipLB's topic in Plugin Developer's Central
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. -
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 ).
-
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
-
Sure, but a different one with some angle-stuff.
-
Right. I updated the zip in the first post.
-
Hi, first try with some ui. A simple Mexican Hat Edge Detect filter. Mexican Hat Edge Detect.zip
-
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
-
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.
-
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.