Jump to content

How to make the colors more intense


xmario

Recommended Posts

This tutorial is available as a PDF. Click here to view or download it

 

A simple way to make the colors more intense in the photo

This is a easy way to make more saturated dead colors in a photo or in a picture.

48036e.jpg

48037e.jpg

So, we'll take a picture, to make the colors more saturated. For example, like this photo.

48038.jpg

1. Open the photo in paint.net.

2. Duplicate the layer with the photo.

3. Apply to the top layer “Adjustments” - “Black and white”.

4. Apply to the top layer “Adjustments” - “Invert Colors”.

5. Set the blending mode of the top layer - "Reflect"

For dark images in the places where they were especially dark, can appear overexposed white areas. This is easy to fix. Apply to the top layer “Adjustments” - “Curves”. Slightly move the top point down until the white illuminated areas will not be wasted.

48039e.jpg

flag.gif Description of this tutorial in Russian

One more example:

48040e.jpg

Edited by Woodsy
added PDF
  • Like 1
  • Upvote 2
Link to comment
Share on other sites

  • 2 months later...
  • 6 years later...

<3 @xmario!

 

You are Super MARIO! Thank you very much for your effort. :cake: :coffee:

 

17novem180.png 17novem181.png

*before                                                                                                      *after

 

  • Like 1

Live as if you were to die tomorrow. Learn as if you were to live forever.

Gandhi

 

mae3426x.png

Link to comment
Share on other sites

  • 1 month later...

I'd really like to make a simple plugin of this with Codelab, but I don't know the codes for "Black and White" and "Curves"

Big McThankies From McSpankies!

sakana sig resized.png

Link to comment
Share on other sites

2 hours ago, Sakana Oji said:

I'd really like to make a simple plugin of this with Codelab, but I don't know the codes for "Black and White" and "Curves"

 

There is no need to apply the Curves effect. Try applying the Brightness / Contrast effect by setting one of the options to -1. In this case, creating an effect in CodeLab should not be difficult.

 

Run CodeLab -> File -> New.

Select the options as shown below and click Generate.

Intensity-template.png

 

Now you have this code:

Spoiler

// Name:
// Submenu:
// Author:
// Title:
// Version:
// Desc:
// Keywords:
// URL:
// Help:
#region UICode
IntSliderControl Amount1=10; // [-100,100] Brightness
IntSliderControl Amount2=10; // [-100,100] Contrast
#endregion

// Setup for calling the Brightness and Contrast Adjustment function
BrightnessAndContrastAdjustment bacAdjustment = new BrightnessAndContrastAdjustment();
PropertyCollection bacProps;

// Setup for using pixel op
private UnaryPixelOps.Desaturate desaturateOp = new UnaryPixelOps.Desaturate();
private UnaryPixelOps.Invert invertOp = new UnaryPixelOps.Invert();

// Setup for using Reflect blend op
private BinaryPixelOp reflectOp = LayerBlendModeUtil.CreateCompositionOp(LayerBlendMode.Reflect);

protected override void OnDispose(bool disposing)
{
    if (disposing)
    {
        // Release any surfaces or effects you've created.
        if (bacAdjustment != null) bacAdjustment.Dispose();
        bacAdjustment = null;
    }

    base.OnDispose(disposing);
}

void PreRender(Surface dst, Surface src)
{
    bacProps = bacAdjustment.CreatePropertyCollection();
    PropertyBasedEffectConfigToken bacParameters = new PropertyBasedEffectConfigToken(bacProps);
    bacParameters.SetPropertyValue(BrightnessAndContrastAdjustment.PropertyNames.Brightness, Amount1);
    bacParameters.SetPropertyValue(BrightnessAndContrastAdjustment.PropertyNames.Contrast, Amount2);
    bacAdjustment.SetRenderInfo(bacParameters, new RenderArgs(dst), new RenderArgs(src));
}

// Here is the main render loop function
void Render(Surface dst, Surface src, Rectangle rect)
{
    // Call the Brightness and Contrast Adjustment function
    bacAdjustment.Render(new Rectangle[1] {rect},0,1);

    // Now in the main render loop, the dst canvas has an adjusted version of the src canvas
    for (int y = rect.Top; y < rect.Bottom; y++)
    {
        if (IsCancelRequested) return;
        for (int x = rect.Left; x < rect.Right; x++)
        {
            ColorBgra CurrentPixel = dst[x,y];

            // TODO: Add additional pixel processing code here
            CurrentPixel = desaturateOp.Apply(CurrentPixel);

            CurrentPixel = reflectOp.Apply(src[x,y], CurrentPixel);

            CurrentPixel = invertOp.Apply(CurrentPixel);

            dst[x,y] = CurrentPixel;
        }
    }
}

 

 

Move line "CurrentPixel = reflectOp.Apply(src[x,y], CurrentPixel);" under line "CurrentPixel = invertOp.Apply(CurrentPixel);"

Replace Amount1 and Amount2 with 0 and -1 respectively in these lines:

bacParameters.SetPropertyValue(BrightnessAndContrastAdjustment.PropertyNames.Brightness, 0);
bacParameters.SetPropertyValue(BrightnessAndContrastAdjustment.PropertyNames.Contrast, -1);

 

You can now remove the Amount1 and Amount2 controls - you will no longer need them.

Fill in the commented lines at the top of the codes, for example:

Spoiler

// Name: Colors Intensity
// Submenu: Color
// Author:
// Title: Colors Intensity
// Version: 1.0
// Desc: Give the picture an intense colors
// Keywords: intensity|color
// URL: http://www.getpaint.net/redirect/plugins.html

 

and save your effect.

 

I hope it's not difficult.

  • Like 1
Link to comment
Share on other sites

2 hours ago, toe_head2001 said:

We can't help you fix the issue by just seeing the Error message. Please post the code you're using in CodeLab. You must have gone wrong somewhere...

 

Please publish your code (while in the CodeLab text editor, do Ctrl+A then Ctrl+C and paste your code into the message here).

Link to comment
Share on other sites

15 minutes ago, ReMake said:

 

Please publish your code (while in the CodeLab text editor, do Ctrl+A then Ctrl+C and paste your code into the message here).

Here you go:

// Name: Color Intensifier
// Submenu: Color
// Author: Sakana Oji
// Title: Color Intensifier
// Version: 1.0
// Desc: Intensifies the colors of the picture
// Keywords: intensity|color
// URL: http://www.getpaint.net/redirect/plugins.html
// Help:
#region UICode
#endregion

// Setup for calling the Brightness and Contrast Adjustment function
BrightnessAndContrastAdjustment bacAdjustment = new BrightnessAndContrastAdjustment();
PropertyCollection bacProps;

// Setup for using pixel op
private UnaryPixelOps.Desaturate desaturateOp = new UnaryPixelOps.Desaturate();
private UnaryPixelOps.Invert invertOp = new UnaryPixelOps.Invert();

// Setup for using Reflect blend op
private BinaryPixelOp reflectOp = LayerBlendModeUtil.CreateCompositionOp(LayerBlendMode.Reflect);

protected override void OnDispose(bool disposing)
{
    // Release any surfaces or effects you've created.
    if (bacAdjustment != null) bacAdjustment.Dispose();
    bacAdjustment = null;
    base.OnDispose(disposing);
}

void PreRender(Surface dst, Surface src)
{
    bacProps = bacAdjustment.CreatePropertyCollection();
    PropertyBasedEffectConfigToken bacParameters = new PropertyBasedEffectConfigToken(bacProps);
    bacParameters.SetPropertyValue(BrightnessAndContrastAdjustment.PropertyNames.Brightness, 0);
    bacParameters.SetPropertyValue(BrightnessAndContrastAdjustment.PropertyNames.Contrast, -1);
    bacAdjustment.SetRenderInfo(bacParameters, new RenderArgs(dst), new RenderArgs(src));
}

// Here is the main render loop function
void Render(Surface dst, Surface src, Rectangle rect)
{
    // Call the Brightness and Contrast Adjustment function
    bacAdjustment.Render(new Rectangle[1] {rect},0,1);

    // Now in the main render loop, the dst canvas has an adjusted version of the src canvas
    for (int y = rect.Top; y < rect.Bottom; y++)
    {
        if (IsCancelRequested) return;
        for (int x = rect.Left; x < rect.Right; x++)
        {
            ColorBgra CurrentPixel = dst[x,y];

            // TODO: Add additional pixel processing code here
            CurrentPixel = desaturateOp.Apply(CurrentPixel);

            CurrentPixel = invertOp.Apply(CurrentPixel);

            CurrentPixel = reflectOp.Apply(src[x,y], CurrentPixel);

            dst[x,y] = CurrentPixel;
        }
    }
}

 

I don't know how to do that "codie-thingy" by the way

Big McThankies From McSpankies!

sakana sig resized.png

Link to comment
Share on other sites

1 minute ago, Sakana Oji said:

Here you go:

 

And where are you seeing the Error message? In CodeLab's Error List pane? In a MessageBox?

Can you also post a screenshot of that?

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

Never mind, fixed it. Turns out I have an older version of Paint.net so the "Exception" error was fixed and I was able to build it. Thanks past self!

  • Upvote 1

Big McThankies From McSpankies!

sakana sig resized.png

Link to comment
Share on other sites

I'll publish it tomorrow, it's getting late now - about 8.30. I'll have a coffee and then I'm off to bed. Goodnight everybody!

Big McThankies From McSpankies!

sakana sig resized.png

Link to comment
Share on other sites

Okay, I'm back online. I'm still at Harley so Bitdefender is preventing me from getting a Dropbox account, so it might be a while...

Big McThankies From McSpankies!

sakana sig resized.png

Link to comment
Share on other sites

  • 3 months later...

Thanks for the tutorial. But it would be great if you share some video tutorial. It will help us to understand the processes very easily.

Link to comment
Share on other sites

8 hours ago, Robert Smith said:

Thanks for the tutorial. But it would be great if you share some video tutorial. It will help us to understand the processes very easily.

If you hover your mouse over @xmario's avatar you'll see that he hasn't logged in for over two years. It appears that he might be among the disappearing members 

Link to comment
Share on other sites

@Robert Smith, if you looks to paint.net documentation, this tutorial should not cause you any problems. This is a very,very simple tutorial - just a few clicks.

 

Open your image (Ctrl+O).

Duplicate Layer (Ctrl+Shift+D), desaturate (Ctrl+Shift+G), and invert it (Ctrl+Shift+I).

Click F4 and select Reflect Blending Mode for this layer.

Run Brightness / Contrast adjustment (Ctrl+Shift+T), set one of the controls (Brightness or Contrast) to -1 and merge layers (Ctrl+M).

That's all. Hope this was helpful.

  • Like 2
Link to comment
Share on other sites

  • 1 year later...

Holy mashed potato! This was AMAZING!! I had a totally washed out pic that I was going to have to travel 2 hours to retake, but this made the pic look beautiful! Thank you so much!!

Link to comment
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.

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