
It saved me a ton of time processing those photographs as the sliders were remembered between each run.
Hopefully you'll find this useful too.
To install, download this file to your C:/Program Files/Paint.NET/Effects folder and unzip it.
Download here
Tested with Paint.NET version 3.36 and above.
Here's the CodeLab source:
// Author: BoltBait
// Submenu: Photo
// Name: Combined Adjustments
// URL: http://www.BoltBait.com/pdn
// Title: BoltBait's Photo Adjustments v1.1
#region UICode
double Amount1 = 0.2; // [0,1] Noise Reduction
int Amount2 = -10; // [-100,100] Brightness
int Amount3 = 10; // [-100,100] Contrast
int Amount4 = 1; // [-10,10] Yellow Blue
int Amount5 = 5; // [-100,100] Saturation
int Amount6 = 30; // [0,100] Final Multiply Adjustment
#endregion
// Setup for using the various blend ops
private UserBlendOps.MultiplyBlendOp multiplyOp = new UserBlendOps.MultiplyBlendOp();
private UnaryPixelOps.HueSaturationLightness saturationOp;
// Rick, stop moving stuff around!
private byte Clamp2Byte(int iValue)
{
if (iValue<0) return 0;
if (iValue>255) return 255;
return (byte)iValue;
}
unsafe void Render(Surface dst, Surface src, Rectangle rect)
{
Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt();
saturationOp = new UnaryPixelOps.HueSaturationLightness(0, 100+Amount5, 0);
// Setup for calling the Noise Reduction function
ReduceNoiseEffect noiseEffect = new ReduceNoiseEffect();
PropertyCollection nProps = noiseEffect.CreatePropertyCollection();
PropertyBasedEffectConfigToken nParameters = new PropertyBasedEffectConfigToken(nProps);
nParameters.SetPropertyValue(ReduceNoiseEffect.PropertyNames.Radius, 10);
nParameters.SetPropertyValue(ReduceNoiseEffect.PropertyNames.Strength, Amount1);
noiseEffect.SetRenderInfo(nParameters, new RenderArgs(dst), new RenderArgs(src));
// Call the Reduce Noise function
noiseEffect.Render(new Rectangle[1] {rect},0,1);
// Setup for calling the Brightness and Contrast function
BrightnessAndContrastAdjustment bacAdjustment = new BrightnessAndContrastAdjustment();
PropertyCollection cProps = bacAdjustment.CreatePropertyCollection();
PropertyBasedEffectConfigToken cParameters = new PropertyBasedEffectConfigToken(cProps);
cParameters.SetPropertyValue(BrightnessAndContrastAdjustment.PropertyNames.Brightness, Amount2);
cParameters.SetPropertyValue(BrightnessAndContrastAdjustment.PropertyNames.Contrast, Amount3);
bacAdjustment.SetRenderInfo(cParameters, new RenderArgs(dst), new RenderArgs(dst));
// Call the Brightness and Contrast function
bacAdjustment.Render(new Rectangle[1] {rect},0,1);
// Now in the main render loop, the dst canvas has a fixed up version of the src canvas
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++)
{
// Boost the saturation
*dstPtr = saturationOp.Apply(*dstPtr);
// Yellow-Blue adjustment
ColorBgra SourcePixel = *dstPtr;
SourcePixel.R = Clamp2Byte(SourcePixel.R - Amount4/2);
SourcePixel.G = Clamp2Byte(SourcePixel.G - Amount4/2);
SourcePixel.B = Clamp2Byte(SourcePixel.B + Amount4);
*dstPtr = SourcePixel;
// Finally, add a little "punch" to the overall picture
ColorBgra DestPixel = *dstPtr;
DestPixel.A = (byte)(int)(Amount6 * 255.0 / 100.0);
*dstPtr = multiplyOp.Apply(*dstPtr, DestPixel);
srcPtr++;
dstPtr++;
}
}
} This is now included in my plugin pack.



























