xmario

How to make the colors more intense

Recommended Posts

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 xmario
  • Like 1
  • Upvote 2

Share this post


Link to post
Share on other sites

You can also try increasing the saturation with Adjustments -> Hue/Saturation.

Perhaps you're right. For most images this option can be used, but unfortunately not always for photos.

48091.jpg

Share this post


Link to post
Share on other sites

<3 @xmario!

 

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

 

17novem180.png 17novem181.png

*before                                                                                                      *after

 

  • Like 1

Share this post


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

Share this post


Link to post
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).

Share this post


Link to post
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

Share this post


Link to post
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?

Share this post


Link to post
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

Share this post


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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now