Announcement

Collapse
No announcement yet.

win7_x64 - Resize Filter: Lanczos produces wrong interpolation values

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

    win7_x64 - Resize Filter: Lanczos produces wrong interpolation values

    Hi,

    1. Take a 24bit white or grey image (e.g. 960x540 )
    2 do a resizing via Ctrl+R to anything bigger than the original size ( e.g. 1920x1080)
    3. choose the Lanczos filter
    4. execute resize operation
    5. take a look at the histogram --> new white values 253 or 254 are introduced


    any other resizing filter doesn't do that. It doesn't probably effect the image quality
    in daily resizing tasks, but in my case it introduces some annoying artifacts.
    Hope this can be fixed sooner or later.
    Tested in Irfanview versions:
    4.25
    4.27

    System setup:
    win 7 x64 english
    Quadcore intel xeon @ 2.67 GHz
    12GB ram

    #2
    I have no idea why you think this is a bug. The Lanczos3 filter is no doubt doing what it was designed to do.

    The attachment shows a detail from a 50 pixel black square that was resampled using the Lanczos3 filter. As you can see, there are grey pixels around the edge. This is a result of image smoothing.

    If you don't want this kind of smoothing, use a different filter.
    Attached Files
    Last edited by Bhikkhu Pesala; 01.11.2010, 10:49 AM.
    Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

    Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

    Comment


      #3
      hi,

      Originally posted by Bhikkhu Pesala View Post
      I have no idea why you think this is a bug. The Lanczos3 filter is no doubt doing what it was designed to do.

      The attachment shows a detail from a 50 pixel black square that was resampled using the Lanczos3 filter. As you can see, there are grey pixels around the edge. This is a result of image smoothing.
      Thats right, its clear that you get interpolated colours at black borders or edges, because of the neighbourhood

      But the difference in my case is, that there is no border at all.
      Its just a plain white picture (RGB255,255,255)) and i'm still wondering where the new color values come from. Take a look at the histogram of a resized white image.

      These colours have never existed anywhere in the picture. And there are no chances to generate any new colours in that case, as far is i understand sampling. Correct me if i'm wrong.

      regards.

      p.s.: its clear that this is a special case, but still a bug i think
      Last edited by smash_dot; 01.11.2010, 11:12 AM.

      Comment


        #4
        Strictly speaking, its only a bug if it was not designed to do that. It may be a compromise to suit photographic images. You should use another filter if you want to optmise sharpness and not smoothness, or just enlarge the canvas. See the RIOT plugin for some more resampling filters.

        Have a look at this earlier thread.
        Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

        Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

        Comment


          #5
          Hi Bhikkhu,

          Originally posted by Bhikkhu Pesala View Post
          Strictly speaking, its only a bug if it was not designed to do that. It may be a compromise to suit photographic images. or just enlarge the canvas. See the RIOT plugin for some more resampling filters.

          Have a look at this earlier thread.
          After reading the above discussion, there seems to be a design decision concerning color mapping and quantization when saving images. But in my case i'm working always on non compressed 24bit images.

          So there is still one open issue in my opinion: Why does not this happen with any other resizing filter? It doesn't matter which one i use (Hermite, B-Spline etc) all produce a 100% white except lanczos. Could be a rounding /clipping problem maybe?

          You should use another filter if you want to optmise sharpness and not smoothness,
          Actually, thats why i am using lanczos filter. As far as i know lanczos is especially good for upsampling tasks and not destroying/blurring image details compared to simple bi-linear filter for example.

          And as i mentioned in my first post, it is probably not that relevant for daily work with photographic images, but still it seems to be a bug, because other resizing filter do not introduce new color values in homogeneous regions

          regards.
          jc.

          Comment


            #6
            ok i implented the lanczos3 filter myself...the results in IV are correct. the weights for new pixels are just calculated that way, that you don't get 100% white. sorry for the confusion
            regards.
            Last edited by smash_dot; 02.11.2010, 12:45 PM.

            Comment

            Working...
            X