PDA

View Full Version : Lanczos Resample filter: Artifacts at 110%



tommyhj
05.04.2008, 08:31 PM
Very noticeable artifacts are introduced when resizing images to 105-120% with the Lanczos resampling filter.

Attached file Utah_lake2 is upsampled 110% with lanczos filter.
Utah_lake3 is the original.

(view the image at 100%).

These artifacts are introduced when just viewing an image at above 100% with the resample function turned on. Also when batch resizing, the artifacts are there (ruined a ton of my original images before I discovered it).

None of the other filters makes artifacts like that, so using any other filter is a temporary fix.

Does the Lanczos filter suck so bad, and if so, why is it so widely used? Is it a bug?

Bhikkhu Pesala
05.04.2008, 09:20 PM
I wonder? This is the result of resizing the image 110% in PhotoPlus11 using the Lanczos3 filter. It doesn't look too bad to me. I wouldn't be surprised if there is a simple error in the IrfanView filter dialogue so that another filter is applied when the Lanczos filter selected. I have no idea how we can check that theory though. The second image was done in IV with the Lanczos filter.

tommyhj
05.04.2008, 09:20 PM
Attached is the same file, resized in XnView to 110% with lanczos filter - perfect result!

JPEG Resizer 2.1 (not available anymore, but my favorite batch resizer so far), makes the same kind of box artifacts when upscaling with Lanczos, so it's not an Irfanview bug as such.

Maybe Irfanview needs to update the internal Lanczos filter to the one XnView is using?

Bhikkhu Pesala
05.04.2008, 09:32 PM
I have filed a Bug Report (http://en.irfanview-forum.de/vb/project.php?issueid=56), and will move this thread.

tommyhj
05.04.2008, 09:33 PM
I wonder? This is the result of resizing the image 110% in PhotoPlus11 using the Lanczos3 filter. It doesn't look too bad to me. I wouldn't be surprised if there is a simple error in the IrfanView filter dialogue so that another filter is applied when the Lanczos filter selected. I have no idea how we can check that theory though. The second image was done in IV with the Lanczos filter.

Thanks for the reply :-)

None of the other selectable filters in Irfanview makes the artifacts, but the lanczos filter in JPEG Resizer 2.1 does. So I think it's safe to say that the Lanczos in Irfanview is somehow broken at algorithm-level. Maybe it's an old version that wasn't optimized for upscaling?

At any rate, the lanczos filter needs to be updated - maybe grabbing some source from imagemagick?

j7n
05.04.2008, 10:19 PM
Looks like nobody noticed this problem because of the uselessness of upsampling. But its there.

LanczosResize() in AVISynth also comes out smooth with the same parameters.

Sam_Zen
06.04.2008, 12:59 AM
Not done any test with this, but I think IV should keep up with the latest Lanczos filter algoritm anyway.