Due to a request here: http://forums.getpaint.net/index.php?/topic/111023-need-color-temperature-control-equivalent-to-windows-live-photo-gallery/
I created a Temperature / Tint Adjustment plugin. It is found under the Adjustment menu.
User Interface:
Algorithm:
This is where I found the algorithm that I used:
http://www.tannerhelland.com/5675/simple-algorithms-adjusting-image-temperature-tint/
Here you can visualize the sliders overlaid on the standard color wheel:
CodeLab Script:
// Name: Temperature/Tint
// Submenu: Adjustment
// Author: BoltBait
// Title: BoltBait's Temperature/Tint v1.3
// Version: 1.3
// Desc: Adjust the Temperature or Tint of a photograph
// Keywords: Temperature|Tint
// URL: http://BoltBait.com/pdn
#region UICode
IntSliderControl Amount1 = 0; // [-20,20] Temperature
IntSliderControl Amount2 = 0; // [-20,20] Tint
CheckboxControl Amount3 = false; // [0,1] Preview original image
#endregion
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)
{
for (int y = rect.Top; y < rect.Bottom; y++)
{
if (IsCancelRequested) return;
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 (!Amount3)
{
CurrentPixel.R = Clamp2Byte(CurrentPixel.R + Amount1); // Temperature
CurrentPixel.B = Clamp2Byte(CurrentPixel.B - Amount1); // Temperature
CurrentPixel.G = Clamp2Byte(CurrentPixel.G + Amount2); // Tint
}
*dstPtr = CurrentPixel;
srcPtr++;
dstPtr++;
}
}
}
Download:
Download as part of my plugin pack, here: https://forums.getpaint.net/BoltBaitPluginPack
Support:
This plugin is for paint.net 4.0.6+
If you are running Paint.NET 3.5.11, you can build your own copy using the CodeLab source above. You'll need to update the UICode region by replacing "IntSliderControl" with "int" and "CheckboxControl" with "bool". Or, if CodeLab scares you, download the 3.5.11 version here: http://forums.getpaint.net/index.php?/topic/111031-temperature-tint-adjustment/&do=findComment&comment=527785