Jump to content

BoltBait

Administrator
  • Posts

    15,648
  • Joined

  • Last visited

  • Days Won

    390

Everything posted by BoltBait

  1. You might want to download fresh copies of all the plugins you use on a regular basis. Many plugins (including mine) have had a refresh lately.
  2. Try reducing the transparency/alpha of the primary color before using the clone tool. Set it somewhere around 50% or less. Bottom right corner of this window:
  3. I believe it is called the "eat less and exercise" plugin. Takes a while to work, however.
  4. To answer the OP's question: The best plugin ever is CodeLab. That Tom Jackson is brilliant. QAPC
  5. You need to review the section on text: http://boltbait.com/pdn/CodeLab/help/tutorial4.asp Specifically the first part... #region UICode #endregion void Render(Surface dst, Surface src, Rectangle rect) { Rectangle selection = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); dst.CopySurface(src,rect.Location,rect); // rest of code goes here }
  6. To install plugins, carefully follow the steps shown on this page: https://boltbait.com/pdn/InstallingEffects.php
  7. BAD idea. Please review the forum rules: This is not a built-in effect of Paint.NET. You need to download a plugin for this function.
  8. A forum that allows such large signatures? Remind me to never go there.
  9. Please understand how it looks like spam. You make your first and only post on a messageboard with links to your business. Normally, we just ban the accounts outright. However, your post was reasonable, so a mod edited the link out of your post. Had you been a straight up spammer, you never would have seen the edit as they never return. Since you're back, we will try to help you. Now, first, I recommend reading the site rules: Now, reread rule #23. We will be glad to help you learn Paint.NET and give opinions. We will NOT do your work for you.
  10. I think the spam got edited out of this one. I wouldn't worry about it.
  11. Exactly this ^^^ CodeLab uses the "Save as" filename as the C# namespace for the effect. If you're not careful, you could create a conflict. The next version of CodeLab will use a different method of selecting a namespace name.
  12. Have you considered taking a class about graphic editing at your local community college or learning exchange?
  13. The eraser is circular in shape and you can change its size on the tool bar when using it.
  14. I believe I could do this inside of CodeLab... if CodeLab was 2 DLL's--one loaded by Paint.NET at default security and the other loaded by the first dll to build a dll. Of course, launching the second dll would give a security prompt by the OS. But, that would be ok because it would only happen when actually building a dll. It's just complicated and I've not bothered making that change yet.
  15. Yup. That's it. Bummer. I run Paint.NET in administrator mode for CodeLab. (If you don't run admin mode, CodeLab can't save to DLL.)
  16. Thanks. Technically, this isn't "white balance". It is more like "gray balance". You can select a pixel that is supposed to be anywhere from white to black and the picture will be adjusted so that this pixel is gray balanced (that is: R, G, and B will be all the same value). I wrote the algorithm to try and minimize the adjustment made to the pixel.
  17. When I drag a graphic file from an explorer window over Paint.NET I just get a (/) cursor. It won't let me drop the picture onto the canvas. I know on XP this works fine. I did it a ton on my old PC that I was using over the weekend. Any reason why it wouldn't function on my "work" PC? Do you need any additional information from me?
  18. Have you tried making Paint.NET the default jpg editor during the install process? You do this during the "custom" install.
  19. No. Paint.NET is not spyware. But, installing it is an IQ test.
  20. I think you're out of luck on this one. Sorry. My advice: never work with originals.
  21. It has always bothered me that you use "lhs" and "rhs" instead of "top" and "bottom".
  22. OK, how about this one: BBWhiteBalance.zip Use the eye dropper tool to set your primary color before running the effect. Or, you can use the cross hairs to select a white pixel. The effect shows up under the Effects > Photo > White Balance... menu. Here's the CodeLab script: // Title: BoltBait's White Balance v3.5 // Author: BoltBait // Submenu: Photo // Name: White Balance // URL: http://www.BoltBait.com/pdn #region UICode ColorBgra Amount1 = ColorBgra.FromBgr(0,0,0); // Select color of pixel that represents white bool Amount2 = false; // [0,1] Use manual selection instead Pair<double, double> Amount3 = Pair.Create( 0.0 , 0.0 ); // Manual white position selection bool Amount4 = false; // [0,1] Show guide lines #endregion private byte Clamp2Byte(int iValue) { if (iValue > 255) return 255; if (iValue < 0) return 0; return (byte)iValue; } private UnaryPixelOps.Invert invertOp = new UnaryPixelOps.Invert(); // Here is the main render loop function unsafe void Render(Surface dst, Surface src, Rectangle rect) { Rectangle selection = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); int RedAdjust = 0; int BlueAdjust = 0; int GreenAdjust = 0; int column; int row; // find manual selected pixel int width = selection.Right - selection.Left; int height = selection.Bottom - selection.Top; double px = (Amount3.First + 1) / 2; double py = (Amount3.Second + 1) / 2; column = (int)Math.Truncate(px * (width-1)); row = (int)Math.Truncate(py * (height-1)); // default to primary color for adjustment ColorBgra SourceColor = Amount1; // if selected, use the manual selected pixel instead if (Amount2) { SourceColor = src[column,row]; } // Calculate the amount of Red, Green, and Blue to adjust each pixel // We'll assume Blue is in the center BlueAdjust = 0; RedAdjust = SourceColor.B - SourceColor.R; GreenAdjust = SourceColor.B - SourceColor.G; // Now, check to see if Red is in the center if (((SourceColor.R <= SourceColor. && (SourceColor.R >= SourceColor.G)) || ((SourceColor.R >= SourceColor. && (SourceColor.R <= SourceColor.G))) { RedAdjust = 0; BlueAdjust = SourceColor.R - SourceColor.B; GreenAdjust = SourceColor.R - SourceColor.G; } // Or, is it Green that's in the center else if (((SourceColor.G <= SourceColor.R) && (SourceColor.G >= SourceColor.) || ((SourceColor.G >= SourceColor.R) && (SourceColor.G <= SourceColor.)) { GreenAdjust = 0; RedAdjust = SourceColor.G - SourceColor.R; BlueAdjust = SourceColor.G - SourceColor.B; } // Apply the ajustment to each pixel for (int y = rect.Top; y < rect.Bottom; y++) { ColorBgra* srcPtr = src.GetPointAddressUnchecked(rect.Left, y); ColorBgra* dstPtr = dst.GetPointAddressUnchecked(rect.Left, y); for (int x = rect.Left; x < rect.Right; x++) { ColorBgra CurrentPixel = *srcPtr; if (Amount4 && Amount2) { if (x == column || y == row) { if (x == column && y == row) { CurrentPixel = ColorBgra.FromBgra( Clamp2Byte(CurrentPixel.B + BlueAdjust), Clamp2Byte(CurrentPixel.G + GreenAdjust), Clamp2Byte(CurrentPixel.R + RedAdjust), CurrentPixel.A); } else { CurrentPixel = invertOp.Apply(CurrentPixel); } } else { CurrentPixel = ColorBgra.FromBgra( Clamp2Byte(CurrentPixel.B + BlueAdjust), Clamp2Byte(CurrentPixel.G + GreenAdjust), Clamp2Byte(CurrentPixel.R + RedAdjust), CurrentPixel.A); } } else { CurrentPixel = ColorBgra.FromBgra( Clamp2Byte(CurrentPixel.B + BlueAdjust), Clamp2Byte(CurrentPixel.G + GreenAdjust), Clamp2Byte(CurrentPixel.R + RedAdjust), CurrentPixel.A); } *dstPtr = CurrentPixel; srcPtr++; dstPtr++; } } } I wrote this myself, so I can not vouch for the algorithm.
×
×
  • Create New...