Announcement

Collapse
No announcement yet.

Replace color - Tolerance value?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Replace color - Tolerance value?

    I've been using irfanview for several years. Very good software.

    One thing I use often is "Image>Replace Color". I know how to set my replace and new colors. One value that has puzzled me is the tolerance value. Colors have a Red, Blue and Green value. Am I assuming correctly that the tolerance value is "applied" to ALL the original red, green and blue values?

    If I have an image with black text and a mostly white background (255, 255, 255) but there are some very light gray blocks of colors scattered throughout (for example: 253, 253, 253), would a tolerance of 3 change the gray blocks to white? In other words, how should I correlate the 1-128 tolerance value to the 255, 255, 255 values? Since the black text has some shades of gray at the edges of the text, I do not want to set the tolerance too high or else the text becomes too blocky.

    The grays might not be too visible, but I know they are there and they occasionally cause problems when I use an image in another programs.

    Thanks - David

    #2
    It appears to be straightforward maximum deviation of any of the color components. I tried it on a set of primary color gradients, and a tolerance of 64 to white replaced one quarter of the image, regardless of how many components were different, and the same tolerance to grey replaced one half on either side.

    In a full featured photo editor you could select all white color with magic wand or color select tools and then contract the selection to exclude areas bordering on darker sections, feather the selection and fill it with white. Or try Surface/Bilateral Blur filter with a small tolerance but large radius.

    A difference between 250 and 255 is small enough not to visibly affect antialiasing of text.

    Comment


      #3
      Is it possible to set the image to two colors or greyscale?
      Win 10/64 Home 22H2 IrfanView 4.66/64
      Hate has caused a lot of problems in this world, but it has not solved one yet. (Maya Angelou)

      Comment

      Working...
      X