Jump to content

BoltBait

Administrator
  • Posts

    15,728
  • Joined

  • Last visited

  • Days Won

    405

Everything posted by BoltBait

  1. If the tools menu looked like this: I would never open the tools docker window. I almost always have it closed anyway and just use the keyboard shortcuts. Of course, there's a few I don't know...
  2. Ugh! Just what I need... more features when I haven't even debugged the current features yet! :evil:
  3. I recommend reading this page: http://boltbait.googlepages.com/install And, if that doesn't work for you, post your problems here: viewtopic.php?f=16&t=2023
  4. So when's it coming? :wink: Well, everything's ready on my end. However, Curtis was working on the text editor itself and and added some pretty cool features, however it is in a pretty bad shape right now. I have some bugs to track down in that space before I can release CodeLab v1.3.
  5. Can we start a list of plugins that are not working? If known, can we also list the authors of those plugins?
  6. Wow! I'm impressed. It is fast, MUCH better than the built-in effect, and easier to use. I tried it on a bunch of my own pictures (I never use red-eye flash) and it worked perfectly. I rarely had to change it from the default setting. It just did the job.
  7. Sounds like you need to update your drop-shadow plugin... viewtopic.php?f=16&t=22881
  8. Heh, no wonder then - all my plugin designs are learnt from your examples! :wink: Well, that's what you get for listening to me...
  9. Object > Feather uses transparency to determine where to feather. Selection > Feather uses the "marching ants" selection to determine where to feather. Both are useful in different situations.
  10. Please read the rules: viewtopic.php?f=20&t=3446 See #6.
  11. I'm writing a page to describe how to write complex effects with CodeLab ("complex" meaning effects that call other effects). Here's the script I plan on using: #region UICode int Amount1=10; // [0,100] Blur Amount #endregion // Setup for using a specific blend op private UserBlendOps.DarkenBlendOp darkenOp = new UserBlendOps.DarkenBlendOp(); unsafe void Render(Surface dst, Surface src, Rectangle rect) { // Setup for calling the Gaussian Blur effect GaussianBlurEffect blurEffect = new GaussianBlurEffect(); PaintDotNet.PropertySystem.PropertyCollection blurProps; // Call the Gaussian Blur function blurProps = blurEffect.CreatePropertyCollection(); PropertyBasedEffectConfigToken BlurParameters = new PropertyBasedEffectConfigToken(blurProps); BlurParameters.SetPropertyValue(GaussianBlurEffect.PropertyNames.Radius, Amount1); blurEffect.SetRenderInfo(BlurParameters, new RenderArgs(dst), new RenderArgs(src)); blurEffect.Render(new Rectangle[1] {rect},0,1); // Now in the main render loop, the dst canvas has a blurred version of the src canvas for (int y = rect.Top; y { ColorBgra* srcPtr = src.GetPointAddressUnchecked(rect.Left, y); ColorBgra* dstPtr = dst.GetPointAddressUnchecked(rect.Left, y); for (int x = rect.Left; x { ColorBgra CurrentPixel = *srcPtr; // TODO: Add additional pixel processing code here CurrentPixel = darkenOp.Apply(*dstPtr, CurrentPixel); *dstPtr = CurrentPixel; srcPtr++; dstPtr++; } } } Perhaps, you can get something out of the sample code without all of my flowery speech... I think you're really going to like the next version of CodeLab
  12. Fixed: using System; using System.Drawing; using PaintDotNet; using PaintDotNet.Effects; using PaintDotNet.PropertySystem; using System.Collections.Generic; namespace Sharpen_ { public class EffectPlugin : PaintDotNet.Effects.Effect { public static string StaticName { get { return "Sharpen+"; } } public static Bitmap StaticImage { get { return new Bitmap(typeof(EffectPlugin), "EffectPluginIcon.png"); } } public static string StaticSubMenuName { get { return SubmenuNames.Photo; } } public EffectPlugin() : base(StaticName, StaticImage, StaticSubMenuName, EffectFlags.Configurable) { this.blurEffect = new GaussianBlurEffect(); this.blurProps = this.blurEffect.CreatePropertyCollection(); } public override EffectConfigDialog CreateConfigDialog() { return new EffectPluginConfigDialog(); } private GaussianBlurEffect blurEffect; private PropertyCollection blurProps; public override unsafe void Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, int startIndex, int length) { EffectPluginConfigToken token = (EffectPluginConfigToken)parameters; PdnRegion selectionRegion = EnvironmentParameters.GetSelection(srcArgs.Bounds); Rectangle selection = EnvironmentParameters.GetSelection(srcArgs.Bounds).GetBoundsInt(); int rad = token.Radius; int amt = token.Amount; this.blurEffect.Render(rois, startIndex, length); for (int i = startIndex; i { Rectangle roi = rois[i]; for (int y = roi.Top; y { ColorBgra* srcPtr = srcArgs.Surface.GetPointAddressUnchecked(roi.Left, y); ColorBgra* dstPtr = dstArgs.Surface.GetPointAddressUnchecked(roi.Left, y); ColorBgra CurrentPixel; ColorBgra OrigPixel; byte r, g, b, ro, go, bo, ao, ry, by, gy; for (int x = roi.Left; x { CurrentPixel = dstArgs.Surface[x, y]; r = CurrentPixel.R; g = CurrentPixel.G; b = CurrentPixel.B; vf = (float)CurrentPixel.GetIntensityByte(); if (selectionRegion.IsVisible(x, y)) { OrigPixel = srcArgs.Surface[x, y]; ro = OrigPixel.R; go = OrigPixel.G; bo = OrigPixel.B; ao = OrigPixel.A; // ..... // pixel level calculations here // ..... OrigPixel = ColorBgra.FromBgra(by, gy, ry, ao); *dstPtr = OrigPixel; ++srcPtr; ++dstPtr; } } } } } } } The problem is in the unsafe pointers template. The bug is in these two lines: ColorBgra* srcPtr = srcArgs.Surface.GetPointAddress(roi.X, roi.Y); ColorBgra* dstPtr = dstArgs.Surface.GetPointAddress(roi.X, roi.Y); They should read: ColorBgra* srcPtr = srcArgs.Surface.GetPointAddressUnchecked(roi.Left, y); ColorBgra* dstPtr = dstArgs.Surface.GetPointAddressUnchecked(roi.Left, y); You see where those new values come from? See, roi.Left is the definition of x from the next line, y is from the previous line. Also, you'll want to use GetPointAddressUnchecked for full speed benefit. I fell victim to this error as well. I rebuilt all of my plugins last night. BTW, the reason for this is simple. Prior to 3.36, Paint.NET always called your render loop with ROI's of 1px tall. Now, it calls it with ROI's of 2px tall. So, the error in the template was always getting the address of the first line of the ROI for processing. With the change I show, you now get the address of the proper line to work on.
  13. Major update to the plugin pack today. I rewrote most stuff, added some stuff, and fixed my Rainbow Palette file. Enjoy. 8) P.S. I know the effects are good, give me some feedback on the new Palette file!
  14. It really depends. They are both different effects. Personally, I use both depending on the situation.
  15. Yes. There is a programming issue with the plugin that surfaced with the new way plugins are rendered with Paint.NET 3.36. I have a fix and will update the first post in this thread with the fix right now.
  16. More info here: viewtopic.php?f=10&t=23939 Yes, screenshots would be great!
  17. Rick, I'm always glad to see bug fixes... especially when they hit you personally. Thanks!
  18. BoltBait's Selection Tools What are selection tools? How are they different from other effects? Good questions! I have grouped this set of effects under the Effects > Selection menu because of how they work. Most effects don't really care about the shape of the selection, they just do their effect. These tools, on the other hand, apply their effect based on the shape of the "marching ants" selection. The Idea The very first effect I ever wanted to write was a feather effect that would feather along the selection. I couldn't really figure out a good way to do it so I wrote another feather effect that used transparency to determine the edges of objects. While good, it was never really the effect I wanted to write--it was just a "hack". Well, I finally figured out a good way to do it! The Effects Feather Selection To use: Create an irregular selection and run Effects > Selection > Feather Selection. It feathers the selection along the trail of marching ants. As you can guess, this will be REALLY useful for making photochops! And, I think, MUCH less confusing to use compared to my current feather plugin. Outline Selection To use: Create an irregular selection and run Effects > Selection > Outline Selection. It outlines the selection along the trail of marching ants using the selected color. Bevel Selection To use: Create an irregular selection and run Effects > Selection > Bevel Selection. It creates a 3D... like... um... "puddle" (I guess)... out of the selection along the trail of marching ants. You'll just have to play with this one to see what I mean. It makes some great looking text! I can only take partial credit for this one. While I did have the idea and wrote the first version, it was sooooo slow that it really wasn't usable. Ed Harvey took me to school and taught me ways to increase the speed of the effect... and fixed some bugs along the way.* To give you an idea, his version was over 1000 times faster than mine. :shock: Inner Shadow Selection To use, select the area where you want to render the shadow. Looks great with text or other irregular selections. The Effect DLL All 4 of these effects are grouped together in SelectionTools.dll which you can find in my plugin pack. Download it here and install it in the normal way... BoltBait's Plugin Pack If you need help installing plugins, I recommend reading this page: How to install Paint.NET plugins. And, if that doesn't work, post your troubles here: http://forums.getpaint.net/index.php?/topic/1708- Enjoy. *Some of the bug fixes in Paint.NET 3.36 were a result of the development of this effect. Thanks, Rick!
  19. It's ok. If TheWildOne wants to name their gallery "Help/advice" that's fine by me.
  20. Try using the Windows > Reset Windows Locations menu within Paint.NET.
×
×
  • Create New...