Jump to content

Bug in Paintbrush tool

Recommended Posts

How to reproduce:

- Start from a new image

- Set primary color to red: 153, green: 179, blue: 204

- Use Paint Bucket to fill entire image with this color

- Choose Paintbrush tool, set Brush width to 200, Fill to solid color, antialiasing enabled, normal blending

- Draw a bit

- Choose Magic Wand, set selection mode to replace, flood mode to contiguous, Tolerance to zero

- Click anywhere in the image where you did not draw

Expected outcome: everyting is selected

Actual outcome: everything is selected, except some pixels left at the edges of the brush circles

PDN version: 3.5.5 running on Windows 7 64 bit

I expect there is a rounding error in the normal blending of the atialiased pixels.

Either the antialiased pixels do not have the same color (they are expected to have a different alpha, but the same RGB), or the alphablend has a rounding problem. Blending a color with itself should yield the same color.

I often use this technique to remove noise in what should be solid color regions. Looks like that's not a good idea...

Link to comment
Share on other sites

This repros for me. However while testing this out I noticed that works on most most colors except for:

  • Black (0, 0, 0)
  • White (255, 255, 255)
  • Red (255, 0, 0)
  • Green (0, 255, 0)
  • Blue (0, 0, 255)
  • Yellow (255, 255, 0)
  • Cyan (0, 255, 255)
  • Magenta (255, 0, 255)

It seems that if all the sliders are set to 0 or 255 then the rounding error or whatever is causing this problem doesn't seem to take place.

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.

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