Results 1 to 3 of 3

Thread: Replace color - Tolerance value?

  1. #1
    IV Newbie
    Join Date
    Aug 2012
    Posts
    8
    Version
    IrfanView 4.51
    OS
    64-bit Win 7 Home Premium SP1
    CPU Cores
    4

    Default 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. #2
    Power User j7n's Avatar
    Join Date
    Jun 2006
    Location
    Cyberspace
    Posts
    542
    Version
    IrfanView 4.51
    OS
    32-bit Win Server 2003 SP1
    CPU Cores
    1

    Default

    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.

  3. #3
    Multiple User Kuki Dent's Avatar
    Join Date
    Jun 2010
    Location
    Germany, Lower Saxony
    Posts
    215
    Version
    IrfanView 4.51
    OS
    64-bit Win 10
    CPU Cores
    4

    Default

    Is it possible to set the image to two colors or greyscale?
    When the power of love overcomes the love of power, the world will know peace - Jimi Hendrix

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •