Jump to content

davidf

Members
  • Posts

    63
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by davidf

  1. Great stuff -- thanks for doing this! Just one thing: when I compiled this using Visual C# 2010 (Express), Paint.net didn't initially recognise the plugin. The fix was to go to Properties and change "Target Framework" from 4.0 to 3.5. Are there any potential issues with that?
  2. Thanks Nitenurse79 (or should that be Mrs Forum Troll of 2011??). You're always encouraging!
  3. Effects > Color > Subtract Color This is one approach to the "color to alpha" idea. The transparency of each pixel depends on how similar its color is to the selected color. The resulting image has the following property: if a layer of the selected color is placed underneath the resulting image, it will look (almost) exactly like the original image. Suggestions: It is usually better to select an area to remove color from, rather than applying this effect to the whole image. For best results, choose an extreme color (fully saturated, black or white) instead of a color close to an extreme value (e.g. choose RGB (255, 0, 100) rather than RGB (245, 10, 100)). The parameters are: Color - pixels of this color will have the maximum transparency. The closer a pixel's color is to this value, the more transparent it will be. Function - "subtract color" (the main function), "show alpha as grayscale" (display fully transparent pixels as black, opaque pixels as white and semi-transparent pixels as gray) or "show original image" (for quick comparison). Tolerance - affects how similar a pixel needs to be to the chosen color to be made transparent. Tolerance sharpness - degree of "feathering" at the edge of the tolerance value (between transparent and non-transparent pixels). Alpha intensity - maximum transparency to assign the pixels (100 means fully transparent). Any feedback welcome! Download: SubtractColor.zip (For another plugin with a different approach, see Tanel's Color to Alpha: http://forums.getpai...?showtopic=7767)
  4. Effects > Artistic > Alpha to Dots This plugin sets all alpha values in the image to 0 or 255, with a probability based on the current alpha value. The result is a "dotty" transition instead of a blended one. Download: AlphaToDots.zip
  5. Lots of special cases -- I'm looking for patterns of pixels and then inverting some of them. Does bilinear sampling introduce new colours (grey levels)? In this plugin I'm sticking to black & white ...
  6. It's pretty specialised at the moment, and the results aren't all that great, so probably not ... though I might have a try at something more general one day. Doing this has given me a fresh appreciation of how good humans are at text recognition! There are some subtle things that are hard to detect with a computer program.
  7. I felt like a challenge, so I made a plugin that you can use to (kind of) improve the image ... here are the results: Before using the plugin, you need to scale the image by half, since the original is made up of 2x2 blocks. Use Image > Resize with a value of 50%. Make sure you set the resampling method to Nearest neighbor so no grey values are introduced; the plugin expects only black and white images. Then run the plugin twice in a row; the second time, untick the box called "First pass". The result still isn't all that perfect, since there is a kind of checkered effect in places that makes it hard to distinguish the background from the letters -- but I hope this is still helpful! The plugin appears in the Effects > Noise > Fix Scan menu. Download: FixScan.zip There are instructions for installing plugins here: http://boltbait.com/...lingEffects.asp David
  8. Effects > Noise > Local Noise This plugin is similar to Effects > Distort > Frosted Glass, but with a bit more control. It modifies each pixel based on the value of one or more pixels within a certain radius. The influential pixels can be restricted to the current selection (compare the bottom left to the bottom right image below) or biased towards closer points (top right). The parameters are: Radius - The maximum distance for influential pixels. Strength - The amount of influence; 50 means the current pixel is blended evenly with the influential pixel(s), 100 means the current pixel value is ignored. Coverage - the percent chance of a pixel being altered. Use points - method for choosing influential pixels. "Within radius" picks a point up to that distance away; "within radius and selection" is the same but only uses points inside the current selection; "anywhere in selection" ignores the radius and just picks a point inside the current selection; "anywhere in image" picks any point in the picture. Number of points to blend - the number of influential points (RGB values are averaged). Higher values give a smoother effect. Distance bias - higher values increase the likelihood of an influential point being close to the current point. (This number of points is generated and only the closest one is kept, so a value of 1 means the points are evenly distributed - see top right image above). This parameter is only used if use points is set to something that mentions a radius. Plugin number two! Download: LocalNoise.zip
  9. Hey, that's a real "pencil sketch" ... or maybe a "paintbrush sketch" I assume Artistic is the most appropriate effect menu for this plugin, rather than Noise?
  10. Yep, it was with CodeLab (which I am enjoying playing with!).
  11. Effects > Artistic > Dot This plugin reduces an image to two colors, called "dark color" and "light color" in the GUI. The (greyscale) value of the original pixel determines the chance of being changed into each color. It is also possible to use only one of the colors and keep the rest of the pixels unchanged (see the rose on the right of the image below). Notes: High contrast images turn out best. Resolution makes a big difference; view results at 100%. Some examples: The inputs are: Dark color -- the color that dark pixels in the original image have a higher chance of being set to. Light colour -- the color that light pixels have a higher chance of being set to. Options -- "use both colors", "lighten only" or "darken only": whether to use or ignore the previous two colors. Bias -- increase or decrease each pixel's value (brightness) before randomly deciding whether to use the dark or light color. Jitter -- instead of using the current pixel, use a pixel up to this distance away. Feedback welcome! (If something like this exists already, it was still good practice for my first plugin). Download: Dot.zip
  12. Aha, that fixes it. Thanks for that! (And thanks for the welcome :-) )
  13. Thanks so much for creating Code Lab -- it's a lot of fun to use. I came across something odd, though ... when I try "Save as DLL" for some code that uses RandomNumber, it fails with the following error message: "The name 'RandomNumber' does not exist in the current context (CS0103)" ... even though the code builds and runs just fine otherwise . Tiny example: void Render(Surface dst, Surface src, Rectangle rect) { ColorBgra CurrentPixel; for (int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) { CurrentPixel = src[x,y]; CurrentPixel.R = (byte) RandomNumber.Next(256); dst[x,y] = CurrentPixel; } } } RandomNumber obviously works fine for everybody else (there's all that code out there that uses it!), so I'm at a loss to work out what I am doing differently (Windows 7, 64 bit, Paint.net version 3.5.10, build 3.510.4297.28964, installed in the standard location C:\Program Files\Paint.NET).
×
×
  • Create New...