Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Cookies

  1. Wow, this is funny, I came by to get some plugins for my laptop yesterday and I notice this, I didn't expect that. But oh boy, it's been a long time since I was last here, looking back on it, I've really changed a lot! But, I guess, uhh... Hi! Not sure if I'll be sticking around, only time will tell, but thought I could at least say "Hi" (I would've said something yesterday if it wasn't because I was busy )
  2. Updated, completely changed how this thing works. Will work on another plugin for making dither algorithms for this later, also might make this multithreaded later (Plugin update on my birthday ... Wooo!)
  3. No crash log, it just crashed. Just tried the new version and after some time of editing the display driver stopped responding (scared me for a second) and it crashed again, still no crash log
  4. Tried it and... PDN crashed after a while and the source image was flipping up and down on every edit i made to the code
  5. Cool! I have, in a long time, wanted to make GLSL shaders that could be run in PDN. I might try this later but I'm a bit busy with other things right now. Hope you solve the crashing issue and make it more stable.
  6. What about the gradient effect there's in KrisVDM's plugin pack?
  7. you could try -despeckle or -enhance in IM (You could also take a look in this thread http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=15855) hope it helps
  8. like this CurrentPixel = src.GetBilinearSampleClamped(x, y);
  9. Well, as i said above i can only get the correct results if i process the whole image in one run, i tried quite a few things to get it working but for some reason it just dont want to come with the expected result if i dont run it through the whole image like ErrorDiffusionSimple eds = new ErrorDiffusionSimple(divisor[DitherMethod], maps[DitherMethod]); eds.ProcessDither(SrcClone, dstArgs.Surface, reg, srcArgs.Bounds, BitDepth); which is extremely slow, and this problem only seem to be there with custom UI (only made a fast test from codelab, it ran fine there, and it ran fine before the custom UI) i have been thinking all day without coming closer to a solution, only made changes which change the ouput to even worse when clicking ok and I always forget to make backups
  10. Right click is used to rotate selections, and when pasting something in an image will automatically include it in a selection, i think that is why
  11. Just some extra info, it tried to copy the class into codelab and test with the default values (not anything loaded from anywhere) it worked fine, when i did the same in my solution it had too much contrast edit: Some comparisons my result how it should be more like edit2: Apparently i don't get the bad result if i run through the image in one run, so i dont know whats causing this any ideas?
  12. Uhm, somewhere in November last year i decided to make a major update to Simulate Color Depth after being somewhere with lots of errors and crashes i got away from it and onto something else. A few days ago i decided to take it up again and decided just to write a whole new easier customizable error diffusion dithering class, success in nearly first try, and as planned i began to add XML support for custom dithers. On my way home from school today my computer had a bluescreen while it was sleeping, but luckily i had my project saved so it wasn't a big problem, so i came home turned on my computer, saw the bluescreen, restarted. Then i worked hard to get the XML stuff working but when i finally worked the result from the error diffusion had too much contrast based on how it was before i implented the XML support, that counts both for the same algorithm called from the data from the XML file and with the values i used before coded in directly, heres the class (default algorithm is Floyd-Steinberg, and the result is long away from what it have been, for a good guidance of how it should look like click here) internal class ErrorDiffusionSimple { const int ERROR = -190; int divisor; int[][] multiply; int boffset = ERROR; int foffset = ERROR; internal ErrorDiffusionSimple() { divisor = 16; multiply = new int[2][]; multiply[0] = new int[1] { 7 }; multiply[1] = new int[3] { 3, 5, 1 }; } internal ErrorDiffusionSimple(int divisor, int[][] multiply) { this.divisor = divisor; this.multiply = multiply; } internal ErrorDiffusionSimple(int boffset, int foffset, int divisor, int[][] multiply) { this.boffset = boffset; this.foffset = foffset; this.divisor = divisor; this.multiply = multiply; } internal unsafe void ProcessDither(Surface src, Surface dst, PdnRegion reg, Rectangle rect, int BitDepth) { int sl = multiply[0].Length; int ll = multiply[1].Length; for (int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) { ColorBgra cp = *(src.GetPointAddressUnchecked(x, y)); ColorBgra np = Dithering.GetClosestColor(cp, BitDepth); for (int x2 = x+1; x2 <= x + sl; x2++) { if (reg.IsVisible(x2, y)) if (multiply[0][x2-1-x] != 0) *(src.GetPointAddress(x2, y)) = errorDiffuse(cp, np, *(src.GetPointAddress(x2, y)), multiply[0][x2 - 1 - x]); } for (int y2 = y + 1; y2 < y + multiply.Length; y2++) { for (int x2 = x - (boffset == ERROR ? sl : boffset); x2 <= x + (foffset == ERROR ? sl : foffset); x2++) { if (reg.IsVisible(x2, y2)) if (multiply[y2 - y][x2 + (boffset == ERROR ? sl : boffset) - x] != 0) *(src.GetPointAddress(x2, y2)) = errorDiffuse(cp, np, *(src.GetPointAddress(x2, y2)), multiply[y2 - y][x2 + (boffset == ERROR ? sl : boffset) - x]); } } *(dst.GetPointAddressUnchecked(x, y)) = np; } } } private ColorBgra errorDiffuse(ColorBgra c1, ColorBgra c2, ColorBgra c3, int multiplier) { int b, g, r; b = c1.B - c2.B; g = c1.G - c2.G; r = c1.R - c2.R; return ColorBgra.FromBgr(Clamp(c3.B + ((multiplier * / divisor)), Clamp(c3.G + ((multiplier * g) / divisor)), Clamp(c3.R + ((multiplier * r) / divisor))); } private byte Clamp(int { return Convert.ToByte(b < 0 ? 0 : b > 255 ? 255 : ; } } Im now sure why it have changed contrast wise but it have (before the bluescreen, custom UI and XML stuff it worked fine and looked quite much, only with minor differences, like the picture i linked to above)
  13. I wouldn't do that, if its in an irregular selection (round, shaped) it will do it outside the selection that way read this: http://www.boltbait....lp/tutorial.asp it explains it edit: I guess your trying to avoid going "outside" the image, if so use src.GetBilinearSampleClamped(x, y);
  14. for (int y = rect.Top + 1; y < rect.Bottom - 1; y++) { for (int x = rect.Left + 1; x < rect.Right - 1; x++) { should be for (int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) {
  15. Thanks for the fix working fine now quite nice effect
  16. if you save an image as jpeg (or any other filetype where the that dialog comes up) you can right after saving it unflatten it and then save it as PDN, in that way you can have the jpeg file to share/use somewhere and the PDN with the layers so you can edit the individual layers later, but if you close the image after saving it as jpeg without having a layered copy, you can retrieve the layers. No, it's not only PDN and PSD that supports layers but im not sure how many other filetype plugins there is else that support layers
  17. it crashes PDN here, running windows 7 ultimate 64bit and my crash log if it helps
  18. Hello Greg, this might answer your questions 1. It's not possible to unflatten images, save as .PDN to keep your layers and then save as the format you want it to be 2. i guess this is was you saw it tells you that you will be able to unflatten after the image is saved, but not closed and reopened, so you can work with your layers again but you wont be able to retrieve the layers in a non-layer filetype, you can only get your layers again if you save as PDN or PSD or any other filetype that supports layers
  19. The link there is the old forumer link, this is the link you should use
  20. The difference is that this is acting like photoshops emboss (mainly did it for the challenge ) and instead of being grayscaled this one is more colorful and you can choose height and amount and at last, i wouldn't call it superior
  21. this one doesnt work (the on posted above) Pair<double,double> Amount1=Pair.Create(0.0,0.0); // Position while this works Pair<double, double> Amount1=Pair.Create(0.0,0.0); // Position amazing what 1 space can do
  22. bevel selection can be found in this pack http://forums.getpaint.net/index.php?/topic/8318-
  23. it's a plugin, you can find it here and if you dont know how to install plugins look at this http://www.getpaint.net/doc/latest/InstallPlugins.html
  • Create New...