Jump to content

BoltBait

Administrator
  • Posts

    15,728
  • Joined

  • Last visited

  • Days Won

    405

Everything posted by BoltBait

  1. You're welcome. It is part of a tutorial of CodeLab tricks that I never finished. Those are very handy. I'll tell you why. 1) You no longer need to run Paint.NET as an administrator in order to build dll files in CodeLab. This allows you to drag-and-drop files onto Paint.NET in order to open them--something you can't do in Admin mode. 2) It is actually a quick way to install your plugin dll file. The batch file will obtain admin rights if it doesn't have them before attempting to install the dll file.
  2. How about like this: #region UICode byte Amount1 = 0; // [255] Help #endregion int PreviousHelpButton = -1; void Render(Surface dst, Surface src, Rectangle rect) { if (PreviousHelpButton== -1) { PreviousHelpButton = Amount1; } if (PreviousHelpButton != Amount1) { PreviousHelpButton = Amount1; System.Windows.MessageBox.Show("This is the help text"); } ColorBgra CurrentPixel; for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; for (int x = rect.Left; x < rect.Right; x++) { CurrentPixel = src[x,y]; // TODO: Add pixel processing code here // Access RGBA values this way, for example: // CurrentPixel.R = (byte)PrimaryColor.R; // CurrentPixel.G = (byte)PrimaryColor.G; // CurrentPixel.B = (byte)PrimaryColor.B; // CurrentPixel.A = (byte)PrimaryColor.A; dst[x,y] = CurrentPixel; } } } NOTE: Don't use this code. There is published improved code here.
  3. That's a darn good idea. I'll make that change for the next release. Meh. I don't know about this one. Maybe. I'll think about it. I should make a comment for the version number too.
  4. Try installing one of these palette files: http://forums.getpaint.net/index.php?/topic/2947-color-palettes-go-here/
  5. Something is preventing paint.net from accessing the registry. This key shouldn't be protected. Usually, malware makes your registry read-only in order to prevent you from removing the malware. Maybe your virus software is doing the same thing. What you need to do is run regedit and right-click on computer\hkey_current_user\software\paint.net key and choose Permissions... then click "Advanced" button to see why you can't modify that key.
  6. I think you need to scan your system for viruses and malware.
  7. Try this plugin on the file: http://forums.getpaint.net/index.php?showtopic=31715
  8. http://forums.getpaint.net/index.php?/topic/880-codelab-for-advanced-users-v25-released-march-14-2015/?p=413407 http://forums.getpaint.net/index.php?/topic/880-codelab-for-advanced-users-v25-released-march-14-2015/?p=421942
  9. The big benefit is that shapes can be adjusted (rotated, resized, reshaped, recolored, etc.) after being drawn and before being applied to the drawing.
  10. No need to understand code in order to copy-and-paste that block of code into CodeLab.
  11. Haha! Thanks! Here's something to try: After running the plugin with both check boxes checked, you should get something that looks like colored chalk on an old blackboard. Then run this CodeLab script: // Name: HSV Invert // Submenu: Color // Author: BoltBait // URL: http://www.BoltBait.com // Keywords: hsv|invert|color // Title: BoltBait's HSV Quick Invert - v1.0 // Desc: Quickly invert H, S, or V in the HSV color space. #region UICode byte Amount1 = 0; // HSV Editing|Invert V|Invert S|Invert H|Maximize S|Maximize V #endregion void Render(Surface dst, Surface src, Rectangle rect) { for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; for (int x = rect.Left; x < rect.Right; x++) { ColorBgra CurrentPixel = src[x,y]; HsvColor hsv = HsvColor.FromColor(CurrentPixel.ToColor()); int H = hsv.Hue; int S = hsv.Saturation; int V = hsv.Value; byte A = CurrentPixel.A; switch (Amount1) { case 0: V = 100-V; break; case 1: S = 100-S; break; case 2: H += 180; if (H>360) H -= 360; break; case 3: S = 100; break; case 4: V = 100; break; } CurrentPixel = ColorBgra.FromColor(new HsvColor(H,S,V).ToColor()); CurrentPixel.A = A; dst[x,y] = CurrentPixel; } } }
  12. Paint.net does not use color profiles when viewing/editing images. Perhaps your other program is using a color profile to adjust the colors when viewing the image. Color profiles are typically used to make an image look the same on your monitor as it would look printed on paper.
  13. After drawing your gradient, use Effects > Distort > Frosted Glass instead of Gaussian Blur. Increase the minimum scatter radius a little bit and adjust the maximum scatter radius to taste.
  14. Once you draw a circle, you can always move it before committing it to the canvas by grabbing the handle.
  15. Pin your taskbar so it is always visible, or move it to the right. Once I got used to the new location, I actually like it better... now that it is just like MS Word, Excel, etc. BTW, you can use the keyboard short cuts Ctrl--, Ctrl-+, and Ctrl-0.
  16. Please read the forum rules. Specifically #8. http://forums.getpaint.net/index.php?/topic/2932-read-first-the-rules-yes-you-read-this-2010-3-15/
  17. I'm trying to use my psychic powers to read your mind, but nothing seems to be coming through. Could you post the EXACT text of the error message so that maybe we can help you? A screenshot of the error would be helpful too.
  18. No need for a plugin. After selecting the line tool, look at the tool bar to adjust the line endings.
  19. Yeah, I have an idea... Upgrade to paint.net 4.0+ If you can't do that, try changing the line: double Amount7 = 0.15; // [0,1] Gray Upper Limit (S×V) to double Amount7 = 0.0; // [0,1] Gray Upper Limit (S×V) This is due to a bug in CodeLab or Paint.NET 3.5x (not sure which).
  20. You could use: return ColorBgra.FromBgra(0,0,0,0);Same thing.
×
×
  • Create New...