Good morning all.
I hope this is not a spurious question but I'm highly amateurish when it comes to taking / editing pictures... and I was curious about peoples' opinions regarding the various algorithms available when resizing/resampling.
My current task is a simple reduction of a 600 width photo down to 534. I have chosen to "Keep Ratio" and "Resample".
I know it's something of a subjective topic but I personally found Lanczos to deliver the best image reduction. I judged this mainly on the fact that the other algorithms seemed to lose sharpness, and Lanczos seemed to be closest to the original image's appearance.
I did do a bit of research before I posted here... and I generally saw bilinear and bicubic bandied around as well-known / recognised algorithms. Bilinear could be considered better for enlarging, because of its smoothing effect. Bicubic could be considered better for reduction, because of its sharpening effect.
I looked for Bicubic as an option in XnView and couldn't find it but then found a post stating that Mitchell was Bicubic. However, as already stated, Lanczos still seemed to provide greater levels of sharpening (on reduction) than Mitchell.
Am I doing something wrong?
What do people think?
Additionally, it also occurred to me that the 'performance' of an algorithm might be related to how large a resizing is being undertaken I.e. if you're dropping resolution by 2000px, perhaps one algorithm is 'better' than another?
Finally, it would be very interesting & instructive to hear opinion on the 9 algorithms available in XnView and when you use one, as compared to another.
Many thanks for any replies.
Gary
resizing algorithms
Moderators: XnTriq, helmut, xnview
-
- Posts: 133
- Joined: Fri Apr 10, 2009 9:55 pm
Re: resizing algorithms
I think most of the resizing algorithms are written specifically for enlarging.
-
- XnThusiast
- Posts: 2010
- Joined: Wed Mar 17, 2004 8:33 pm
- Location: Sarasota Florida
Re: resizing algorithms
Lanczos does a very credible job, both for upsizing and downsizing. There may be small advantages to another algorithm on individual images, but the effort to test every single image is too large.
John
-
- Moderator & Librarian
- Posts: 6387
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: resizing algorithms
- Image enlarger/Magnification filter
- Better Interpolation algorithm for resizing
- Reduce an image with text makes text blur
- Resizing image results in larger file
- Fascinating new image rescaling technology NEW
- FAQ: How to resize images with text (screenshots)
- FAQ: How to prepare an image for the internet
- Resampling - which algorithm is best?
- Image Resize
- Resizing a picture
- what is the best filter to resize an image
- Info about Resampling algorithms
- resample dialog (advanced options, batch convert)
- best scale/resize method?
- how to resize without resampling
- Will be possible to choose a better resize algorith in Full?
- Change of DPI (Set DPI vs. Resize)
- Resize Image: Resampling methods
- Question about resizing in XnView
- Gamma Correct Resizing
- Corrupt jpegs, thumbnail extracted...
- How to batch convert 1024x768 jpeg to 1440x900
- méthodes de redimensionnement
- Resize bug in most image processing programs?
- Legal to implement patented algorithms in XnView?
-
- Posts: 5
- Joined: Wed Jul 08, 2009 10:26 am
Re: resizing algorithms
Thanks for all for responses + in particular XnTriq.
Your topic summary is excellent.
It's kinda reassuring that the general consensus appears to be Lanczos (as my testing indicated).
The odd comment regarding Mitchell performing better, in terms of retaining superior levels of sharpness (in comparison to Lanczos), left me puzzled though. It was visibly inferior in my downsizing testing (image, no writing). Having said this, most suggestions regarding resampling recommend Lanczos + sharpening (I.e. you will need sharpening to compensate for the anti-aliasing, which I simply didn't feel was necessary, in this instance).
Also, condensing the reading matter (for others looking for similar explanations), I should mention that some think Hanning is good for resizing images with text (http://newsgroup.xnview.com/viewtopic.p ... ing#p26846), although this independent test http://www.lassekolb.info/gim36_downsampling.htm, again, reckoned Lanczos was best (note: none were regarded as decent / satisfactory)! Please also note Hanning was NOT included in that test.
Therefore, I've done some testing of my own, downsizing a text-laden image. The image was a Vista 32bit Home Premium 'printscreen' job (i.e. a clipboard snapshot of whatever is on my desktop). There's loads of text, as my browser - FF 3.6.8 - is maximised with all the xnview topics I'm reading! The resolution is 1280x1042x24 (as reported by XnView). I reduced the image size to 75% of original (using v1.97.6) I.e. 960x768. My subjective conclusions are (based on quality + blur vs sharpness of the text) that:
- Lanczos provided the sharpest, most vividly coloured text ... and was noticeably sharper than the runners up.
- Bilinear, Mitchell, Hanning & Hermite were all very close together... in fact, too close to really decide whether one had an edge. However, text in the original image that was black, seemed more grey with these algorithms, whereas Lanczos seemed to be closer to the original font colour (although by no means perfect).
Comments:
- Although Lanczos was sharpest, I almost felt that some of the text lines were very slightly on the harsh side.
- The remaining 4 algorithms (I had tested all 9) were either simply poor quality, text-wise, or too blurred for my liking.
- Please note that I compared the resized images without saving, so that they weren't subject to any levels of compression. Naturally, all were viewed 1:1 zoom.
- I've only tested downsizing, so other algorithms might work better if one was upsizing.
When reading through my test & results, I just wondered whether I wasn't being ambitious enough (I hadn't dropped the resolution by much), so, as an additional comparison, I also tried reducing down to 50% of original size (I.e. down to 640x512). At this level, text was pretty damn small and anti-aliasing was king... but out of above top 5, now Bilinear seemed tolerably legible (it was the least blurred, although there was some inconsistency in the definition of the text). However, Lanczos had a good uniformity of colour-quality to the text, even if blurred. So, to compensate for the AA, I applied Sharpening +10 to each of the images. I'm inclined to think Bilinear made the text most easy (or least difficult ) to read, just due to being more 'liney' (very slightly sharper or perhaps less blurred) than the rest... but there really wasn't much in it... and I still think, in terms of image quality, Lanczos is difficult to beat (the colours seem a little more vivid).
Therefore, I know this is terribly subjective but for downsizing (with or without text), I'd dare to suggest Lanczos is an overall winner.
Any thoughts?
Gary
Your topic summary is excellent.
It's kinda reassuring that the general consensus appears to be Lanczos (as my testing indicated).
The odd comment regarding Mitchell performing better, in terms of retaining superior levels of sharpness (in comparison to Lanczos), left me puzzled though. It was visibly inferior in my downsizing testing (image, no writing). Having said this, most suggestions regarding resampling recommend Lanczos + sharpening (I.e. you will need sharpening to compensate for the anti-aliasing, which I simply didn't feel was necessary, in this instance).
Also, condensing the reading matter (for others looking for similar explanations), I should mention that some think Hanning is good for resizing images with text (http://newsgroup.xnview.com/viewtopic.p ... ing#p26846), although this independent test http://www.lassekolb.info/gim36_downsampling.htm, again, reckoned Lanczos was best (note: none were regarded as decent / satisfactory)! Please also note Hanning was NOT included in that test.
Therefore, I've done some testing of my own, downsizing a text-laden image. The image was a Vista 32bit Home Premium 'printscreen' job (i.e. a clipboard snapshot of whatever is on my desktop). There's loads of text, as my browser - FF 3.6.8 - is maximised with all the xnview topics I'm reading! The resolution is 1280x1042x24 (as reported by XnView). I reduced the image size to 75% of original (using v1.97.6) I.e. 960x768. My subjective conclusions are (based on quality + blur vs sharpness of the text) that:
- Lanczos provided the sharpest, most vividly coloured text ... and was noticeably sharper than the runners up.
- Bilinear, Mitchell, Hanning & Hermite were all very close together... in fact, too close to really decide whether one had an edge. However, text in the original image that was black, seemed more grey with these algorithms, whereas Lanczos seemed to be closer to the original font colour (although by no means perfect).
Comments:
- Although Lanczos was sharpest, I almost felt that some of the text lines were very slightly on the harsh side.
- The remaining 4 algorithms (I had tested all 9) were either simply poor quality, text-wise, or too blurred for my liking.
- Please note that I compared the resized images without saving, so that they weren't subject to any levels of compression. Naturally, all were viewed 1:1 zoom.
- I've only tested downsizing, so other algorithms might work better if one was upsizing.
When reading through my test & results, I just wondered whether I wasn't being ambitious enough (I hadn't dropped the resolution by much), so, as an additional comparison, I also tried reducing down to 50% of original size (I.e. down to 640x512). At this level, text was pretty damn small and anti-aliasing was king... but out of above top 5, now Bilinear seemed tolerably legible (it was the least blurred, although there was some inconsistency in the definition of the text). However, Lanczos had a good uniformity of colour-quality to the text, even if blurred. So, to compensate for the AA, I applied Sharpening +10 to each of the images. I'm inclined to think Bilinear made the text most easy (or least difficult ) to read, just due to being more 'liney' (very slightly sharper or perhaps less blurred) than the rest... but there really wasn't much in it... and I still think, in terms of image quality, Lanczos is difficult to beat (the colours seem a little more vivid).
Therefore, I know this is terribly subjective but for downsizing (with or without text), I'd dare to suggest Lanczos is an overall winner.
Any thoughts?
Gary
-
- Moderator & Librarian
- Posts: 6387
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: resizing algorithms
I'm glad you brought this subject up, Gary. Maybe we'll get Pierre to implement Lanczos-8 (Sinc-256).
- XnView Forum
- Cambridge in Colour: Digital Photography Tutorials
- America's Wonderlands » Digital Photography Tips
- Digital Light & Color » Articles
- Jonathan Sachs: Image Resampling
- About.com » Graphics Software
- Use Better Interpolation When Resampling in Photoshop CS & Photoshop Elements 3
Try Bicubic Smoother and Bicubic Sharper
- Use Better Interpolation When Resampling in Photoshop CS & Photoshop Elements 3
- PhotoshopSupport.com » Photoshop Tutorials by Jennifer Apple
- Controlled Vocabulary
- Coding Horror
- University of Wisconsin Computer Graphics and Vision Lab » Courses
- Helmut Dersch
- Jim Watters
- Vitaly Bursuk
- ImageMagick » Usage
- Bart van der Wolf
(Downsizing methods + PhotoAcute; How to downsample...) - Dylan Beattie
- AspJpeg
- User Manual: Image Manipulation » Resizing Algorithms
- BioniX Desktop Wallpaper Changer
- CodeProject
- Libor Tinka: Image Resizing – outperform GDI+
This article discusses a little weakness in GDI+ filters and shows a class for top-quality image resizing.
- Libor Tinka: Image Resizing – outperform GDI+
- Liquid Rescale GIMP plugin
- Photo.net: Digital Darkroom Forum
- Imaging Techniques » Resizing/Sharpening » Stair Interpolation and down-sampling
- Topaz Labs Forum
- InterpolateTHIS.com
- Different Interpolation Methods Compared: CLOSE-UP
- fxguide – vfx blog
-
- XnThusiast
- Posts: 2010
- Joined: Wed Mar 17, 2004 8:33 pm
- Location: Sarasota Florida
Re: resizing algorithms
2 XnTriq
Thank you once again for being our link-meister. Man, there is some good stuff in that post!
Thank you once again for being our link-meister. Man, there is some good stuff in that post!
John
-
- Posts: 1
- Joined: Tue Apr 28, 2015 6:50 pm
Re: resizing algorithms
Excellent summary thread, thank you @gazzawazza. If you're still hanging around these parts: are you sharpening at the beginning or the end of the processing chain? (before or after reducing)
-
- Posts: 5
- Joined: Wed Jul 08, 2009 10:26 am
Re: resizing algorithms
hi Maphewmaphew wrote:Excellent summary thread, thank you @gazzawazza. If you're still hanging around these parts: are you sharpening at the beginning or the end of the processing chain? (before or after reducing)
I'm kinda around, meaning I was notified someone had posted to this thread, so came to see what had been said
Glad you felt I have contributed - twas a long time ago!
I'm still using xnview and just rescale with lanczos. I personally sharpen at the end and am very careful with it, as it's something of an art
I don't think it occurred to me to sharpen before rescaling - just thinking logically, since over-sharpening can leave artefacts, maybe it's better to not add 'extra' to an image, which could then be amplified with the rescaling?
My gut instinct is to sharpen on the end-image but I've no proof for that assertion. I guess I am just looking to tweak the image, as lanczos can blur out a bit.
You have any suggestions or experience on this?
Regards,
Gary
-
- Moderator & Librarian
- Posts: 6387
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: resizing algorithms
XnTriq ([url=http://newsgroup.xnview.com/viewtopic.php?p=109743#p109743]bicubic resize ?[/url]) wrote:
Algorithms currently available in XnView v1.9 (Image » Resize):
- Nearest Neighbour
- Bilinear
- Hermite (Cubic Hermite spline?)
- Gaussian
- Bell
- Bspline
- Mitchell
- Lanczos (3-lobe)
- Hanning
foxyshadis ([url=http://newsgroup.xnview.com/viewtopic.php?t=3496]Info about Resampling algorithms[/url]) wrote:Mitchell is bicubic.
Agreed that some of the resizers aren't very useful. Could be worse, could be the full list of imagemagick resizers. :p Gauss, bell, and bspline are almost indistiguishable, and often only useful as specialized effects, not generic outputs; in general they're too close to bilinear to even matter. There are a wide range of bsplines but this one doesn't retain much sharpness. Hermite is practically indistiguishable from Mitchell - in fact it's one of the degenerate cases of the Mitchell/Netravali filter, iirc. Those who actually care about these others would probably also care enough to want their tunable parameters as well, or more advanced non-separable resize kernels.
So point, bilinear, bicubic, and lanczos would seem to be enough for anyone using batch resize. If you wanted to emulate photoshop, you could have a bicubic smoother (lower "c") like photoshop, to fill that halfway point in.
[...]
Point, box, and nearest neighbor are (usually) synonyms for the same thing, [...]Nicky Page ([url=http://nickyguides.digital-digest.com/bilinear-vs-bicubic.htm]Bicubic Resizing vs Bilinear[/url]) wrote:Everyone uses Bicubic resizing religiously when they make DivX movies or any time they resize pictures in photo editing software. I have suggested that it is best to use Bilinear to shrink images and Bicubic to enlarge them. In fact I believe it is a rule that shouldn't be broken. But then again there is mixed opinion even among experts on this matter. Digital photo experts JASC (makers of Paint Shop Pro) comment: "Use the Bilinear Resampling method for shrinking these images and Bicubic for enlarging them". Whereas the help file of Adobe Photoshop just mentions that Bicubic is more exact method for resizing. In actual fact Bicubic is more precise, but only when it comes to enlarging. When it comes to shrinking its exactness can actually produces pixelation, because to shrink an image pixels must be discarded anyway.
The following shows examples demonstrating this effect. There are reasons you may prefer Bicubic shrinking methods though. Namely, if sharpness is absolutely vital and pixelation problems are less important.
- XnView Forum
- Jason Summers
- PhotoNaturalist
- Manabu Satoh
- FrameShots
- LEADTOOLS