-
Posts
15,654 -
Joined
-
Last visited
-
Days Won
390
Everything posted by BoltBait
-
Try... Edit > Paste to a new layer.
-
Thanks! That's about the best way to adjust the amount of the effect. I'm glad you figured it out. Don't make me hurt you. I don't think you have any idea how complicated this effect is... to give you an idea, most of my plugins are in the 50 line range. This one is over 600 lines. :shock: By using the "Use alternate lighting direction" check box and swapping the Highlight and Shadow colors, you do have 4 different lighting directions. More than that would make me tear out all of my hair. Sorry, if 4 isn't enough, try what Oma suggests (rotating the layer, do the effect, rotate back, etc.)
-
Possible UI improvements for Paint.net
BoltBait replied to lostcowbot's topic in Paint.NET Discussion and Questions
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... -
Possible UI improvements for Paint.net
BoltBait replied to lostcowbot's topic in Paint.NET Discussion and Questions
I've always been partial to this sort of thing: -
Can I call an Effect from within Codelab? How?
BoltBait replied to Ego Eram Reputo's topic in Plugin Developer's Central
Ugh! Just what I need... more features when I haven't even debugged the current features yet! :evil: -
Adding Effects and Plugins
BoltBait replied to Bipolar_Dsitrotion's topic in Paint.NET Discussion and Questions
It is just an example. -
Adding Effects and Plugins
BoltBait replied to Bipolar_Dsitrotion's topic in Paint.NET Discussion and Questions
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 -
Can I call an Effect from within Codelab? How?
BoltBait replied to Ego Eram Reputo's topic in Plugin Developer's Central
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. -
Plugins return distorted images after updating to PdN 3.36
BoltBait replied to Tanel's topic in Plugin Developer's Central
Can we start a list of plugins that are not working? If known, can we also list the authors of those plugins? -
Red Eye Quick Fix plugin (beta) - updated to V1.1 2008/08/27
BoltBait replied to Tanel's topic in Plugin Developer's Central
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. -
Sounds like you need to update your drop-shadow plugin... viewtopic.php?f=16&t=22881
-
Local Contrast Enhancement v1.2 (2008-12-24)
BoltBait replied to Tanel's topic in Plugins - Publishing ONLY!
My fault. Sorry. viewtopic.php?f=27&t=26245 -
Plugins return distorted images after updating to PdN 3.36
BoltBait replied to Tanel's topic in Plugin Developer's Central
Heh, no wonder then - all my plugin designs are learnt from your examples! :wink: Well, that's what you get for listening to me... -
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.
-
Please read the rules: viewtopic.php?f=20&t=3446 See #6.
-
viewtopic.php?f=10&t=23939
-
Can I call an Effect from within Codelab? How?
BoltBait replied to Ego Eram Reputo's topic in Plugin Developer's Central
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 -
Plugins return distorted images after updating to PdN 3.36
BoltBait replied to Tanel's topic in Plugin Developer's Central
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. -
BoltBait's Plugin Pack for v3.5.11 - Updated January 31, 2015
BoltBait replied to BoltBait's topic in Plugin Packs
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! -
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.
-
Feather broken after update to PDN 3.36
BoltBait replied to Ash's topic in Troubleshooting & Bug Reports
More info here: viewtopic.php?f=10&t=23939 Yes, screenshots would be great!