Jump to content

Recolor tool logic


gpmarotte

Recommended Posts

Hi,

 

I've been using the recolor tool extensively in Paint.Net v3, but now in v4 its logic seems to have changed, let me explain what I used to do:

 

- I have many images (PNGs) drawn in black, with antialiased borders over a transparent background. If I wanted to make a colorized version of one of them, I'll pick the recolor tool and select black as the color to replace, and then the new color I wanted (e.g. Red). If I set the tolerance to 0 and disabled anti-alias, it will replace all the black pixels with red, regardless of their alpha value (but maintaining it). That was very useful because now I have a picture colored in red, included the anti-aliased pixels which keep their aplha value.

 

- I cannot do this any more in v4, even though I tried several combinatios of settings: if there are pixels with alpha values, they don't get colored unless I increase the tolerance, and when they do, the replacement color is not the one I originally selected but a modified version of it (e.g. a darker red, but still with the alpha value).

 

I'm not sure if this behaviour is by design, or if there's a bug on the recolor logic. Anyway, let me know if you need further explanations or some sample images to test.

 

Regards,

Guillermo

  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...

Hi again, sorry for the late answer

 

Here's a sample png. You can see three black (0,0,0) rectangles, each with a different alpha. I then used recolor selecting a pure red color (255,0,0). You'll notice that on each rectangle this red color is slightly changed (on the middel rect the red is (206,0,0)). I want to replace black with red, maintaining the RGB values and only affecting the alpha value, but I can't find a combination of settings on the recolor option that allows that (as it worked on v3)

 

Regards,

Guillermo

post-136375-0-01720500-1402959689.png

Link to comment
Share on other sites

In comparing 3.5 and 4.0's behavior, it's not clear to me which is more desirable. 4.0 seems to have some weirdness with how it does the alpha channel, but 3.5's behavior isn't exactly very good either. I'll see if there's something I can do to quickly improve this, but we're really really really close to 4.0's final release and any changes need to be bullet proof (which is unlikely). There is ambiguity in trying to implement what you're asking for if you think about trying to answer the question, "well how should it work if you're drawing with a non-opaque color?" (e.g. not red but red w/ a non-255 alpha value). I could easily fix this particular case while breaking 20 others ... This is particularly vexing because, to be quite honest, the Recolor tool was never designed to work with non-opaque alpha. What it was doing for you in 3.5 is really just an accident of the implementation. Unfortunately that doesn't help you.

 

My guess is that, for what you're trying to do, you'd be better off using the regular Paintbrush in combination with the right blending mode. Look in the toolbar for "Normal" with the little science beeker icon next to it, click on it, and you'll see a list of blend modes you can draw with (same as the layer blending modes).

 

You can do this in 3.5 as well, but you'll have to create a new layer to do the red drawing. 4.0 just lets you skip creating a new layer.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Hi again,

 

Yes don't worry about this, probably it's easier to create a simple plugin like "Solid Color Replacemente" or similar.

 

Thanks,

Guillermo

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