Radobot

Members
  • Content count

    12
  • Joined

  • Last visited

Community Reputation

0

About Radobot

  • Birthday July 6

Profile Information

  • Gender
    Male
  1. Yes, help. You're saying what could be improved. I don't know if I will add something to it. I don't know what I could add/improve and be able to add/improve it. If you have any ideas? I'll then tell you if I could add it.
  2. Thank you for helping my with this plugin ! When I program applications/plugins I usually name thing by my names because they came from my crazy ideas and I then know what they mean, so often the names aren't the best and can confuse others. Again thanks . (And by the way I thought you forgot on this plugin, I forgot too .)
  3. New version 1.3 is available! Now it has light direction option! (well, only left, right, top and bottom, but still better than nothing)
  4. Added image(s). (I'm scared when are you talking about locking. )
  5. I would really like to know what BoltBait thinks about it.
  6. After I saw BoltBait's Steganography plugin (link) I thought that It's a pity that it can hide and reveal only 1 and 3 bit images. So I tried to write my own with more options.In zip file are 2 dlls: - Hide image.dll - to hide image - Reveal hidden image.dll - to reveal hidden image How to use: - both plugins: - - Red/Green/Blue/Alpha bits - number of bits to use to hide / reveal image. - Reveal hidden image: - - Hidden image file name - name of image file to hide. Both are in Effects > Steganography submenu. Example image (with hidden image): And how it was hidden: And how to reveal it: Feel free to ask for anything (source code...). Icons are Copyright © Yusuke Kamiyamane. All rights reserved. Steganography.zip
  7. Sorry for not responding. I don't know how to make that lighting angle (I know how to do it mathematically, but I don't know how to write it in code). Moar updates? Tell me what do you want (except that lighting angle ). Edit: I made new version 1.2 with shadows option!
  8. I made new version 1.1 with angle adjustment (as you wished ) and fixed images. Now I am thinking about shadows. P.S. thanks for .
  9. I made my version of 3D Heightmap plugin. New version 1.3 has now light angle option and updated names of settings. How plugin works: Imagine that you are looking at uneven surface - heightmap (image in PDN). Lightness of each pixel represents it's height. You can choose from where is light coming and you can adjust the angle of light. Plugin generates how will heightmap look with your settings. It generates lightness of each pixel by calculating at which angle it is from next pixel and generating lightness of pixel form angle. How to use it: Light direction - Direction from which is light coming. Brightness - Angle from which is light coming. Contrast - Strength of light. Shadows - Turns on/off shadows. Replace Alpha - If you have image with transparent parts, this changes them all to one value. Replace Alpha with - Value, to which change all Alpha in image. Plugin is in Stylize submenu. Images before: Images after: Just ask if you want something (previous versions, code, ...) . Heightmap v1.3.zip
  10. Thank you very much for cleaning my code and making it even shorter ! I originally copied this code to CodeLab form my Visual Basic application and then optimized for C#, so there's capital "B" because Visual Studio is changing it itself. I put it to Render submenu because I didn't know where to put it (but now it's in Stylize submenu). So I renamed it to "Heightmap", add icon and it works fine! P.S. I will add it to Plugins - Publishing Only section, so you can then add it to the list . And I added finished version (I don't know why, maybe to show you finished product). Heightmap.zip
  11. I think it can have something to do with Visual Studio 2010 which I have installed. List of errors: Error at line 25: Identifier expected (CS1001) Error at line 70: Identifier expected (CS1001) Error at line 70: } expected (CS1513) Error at line 72: Expected class, delegate, enum, interface, or struct (CS1518) Error at line 80: Expected class, delegate, enum, interface, or struct (CS1518) Error at line 88: Expected class, delegate, enum, interface, or struct (CS1518) Error at line 101: Expected class, delegate, enum, interface, or struct (CS1518) Error at line 103: Expected class, delegate, enum, interface, or struct (CS1518) Error at line 105: Expected class, delegate, enum, interface, or struct (CS1518) Error at line 106: Expected class, delegate, enum, interface, or struct (CS1518) Error at line 107: Expected class, delegate, enum, interface, or struct (CS1518) Error at line 109: Expected class, delegate, enum, interface, or struct (CS1518) Error at line 112: Expected class, delegate, enum, interface, or struct (CS1518) Error at line 124: Expected class, delegate, enum, interface, or struct (CS1518) Error at line 137: Expected class, delegate, enum, interface, or struct (CS1518) Error at line 139: Type or namespace definition, or end-of-file expected (CS1022) Error at line 137: The namespace '<global namespace>' already contains a definition for '?' (CS0101)
  12. I was searching for this problem but I didn't found anything like this. I was trying to create my own plugin - 3D Heightmap. I never programmed in C# but I can program well in Visual Basic (they're similar). Therefore I downloaded BoltBait's CodeLab. I have CodeLab v1.6 (but I'm not sure if this is latest version) and i'm using PDN v3.5.8. Code was at first bigger (it had more options) but I made it shorter because it's easier to find a problem in smaller code. Problem is, that when I open this code in CodeLab and press Build it works fine (even on lasso select!), but when I press Save as Dll then it shows me lot of errors. How plugin works: Imagine that you are looking at uneven surface - heightmap (image in PDN). Lightness of each pixel represents it's height (red, green and blue channels are separated). Light is coming from right at 45° angle. Plugin generates how will heightmap look if you will look at it like this. It generates lightness of each pixel by calculating at which angle it is from next (right) pixel and generating lightness of pixel form angle. Code: // Name: 3D heightmap // Author: Radobot // Submenu: Render // URL: http://www.getpaint.net/redirect/plugins.html // Title: 3D Heightmap #region UICode int Amount1 = 10; // [1,127] Multiplyer (1,127,dft=10) bool Amount2 = true; // [0,1] Replace Alpha (checked) int Amount3 = 255; // [0,255] Replace Alpha with (0,255,dft=255) #endregion void Render(Surface dst, Surface src, Rectangle rect) { int differenceR; // Define some variables int differenceG; // Integer is fine because I need to store in variables numbers from -255 to +255 int differenceB; int finalR; int finalG; int finalB; ColorBgra CurrentPixel; ColorBgra NextPixel; // CurrentPixel's right neighbor (one pixel to right from CurrentPixel) for(int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) { CurrentPixel = src[x,y]; if (x == rect.Right - 1) // If we are at rightmost pixel = (If I can use "x + 1") { NextPixel = src[x,y]; // We are at rightmost pixel - "x + 1" doesn't exist -> we will simulate that "x + 1 = x" -> NextPixel = CurrentPixel } else { NextPixel = src[x + 1,y]; // We aren't at rightmost pixel - I can use "x + 1" } differenceR = NextPixel.R - CurrentPixel.R; // Count difference NextPixel - CurrentPixel differenceG = NextPixel.G - CurrentPixel.G; differenceB = NextPixel.B - CurrentPixel.B; finalR = (differenceR * Amount1) + 128; // Count wich color will final pixel have finalG = (differenceG * Amount1) + 128; finalB = (differenceB * Amount1) + 128; if (finalR < 0) {finalR = 0;}; // If color < 0 then set color to 0 if (finalR > 255) {finalR = 255;}; // If color > 255 then set color to 255 if (finalG < 0) {finalG = 0;}; if (finalG > 255) {finalG = 255;}; if (finalB < 0) {finalB = 0;}; if (finalB > 255) {finalB = 255;}; CurrentPixel.R = (Byte)finalR; // Set final color CurrentPixel.G = (Byte)finalG; CurrentPixel.B = (Byte)finalB; if (Amount2 == true) // If checkbox "Replace Alpha" is checked { CurrentPixel.A = (byte)Amount3; // Replace Alpha with entered value } dst[x,y] = CurrentPixel; // Apply color } } } Image before effect Image after effect And another strange thing is that CodeLab slows down whole PDN. Sorry for my bad english.