Jump to content

Temperature / Tint Adjustment

Recommended Posts

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:






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

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;




Download as part of my plugin pack, here: http://forums.getpaint.net/index.php?/topic/32048-v





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


  • Upvote 9

Click to play:
Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game

Link to post
Share on other sites

This is a great Plugin @BoltBait and thank you :pizza:.  Perfect for getting a very subtle change in color on photos and will have many other uses as well.










  • Upvote 4


How I made Jennifer & Halle in Paint.net

My Gallery | My Deviant Art

"Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon.

Link to post
Share on other sites
17 hours ago, BoltBait said:

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".



Thanks for the info BoltBait. I downloaded CodeLab v1.8 and made my own v3.5.11 compatible dll with my own icon. I did it in Linux under wine. It was touch and go for a while, but I managed to make a working version.


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...