High-quality arbitrary-angle rotation

Ideas for improvements and requests for new features in XnView Classic

Moderators: XnTriq, helmut, xnview

stephan_g
Posts: 11
Joined: Thu May 31, 2007 10:22 pm

High-quality arbitrary-angle rotation

Post by stephan_g »

Currently XnView supports two quality modes of rotation by arbitrary (custom) angles:
1. Crappy - nearest-neighbor interpolation.
2. OK - with "smoothing" checkbox enabled, does bilinear interpolation or somesuch.

What about a really high-quality option that uses e.g. the excellent Lanczos algorithm already employed for resizing? The "Smoothing" checkbox may need to mutate into a 3-state quality (vs. speed) slider, but other than that the necessary code should basically already be there.
User avatar
XnTriq
Moderator & Librarian
Posts: 6451
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Post by XnTriq »

This is a very good idea, no doubt.
For resizing photographic images I never use any other programs.
User avatar
Troken
Posts: 698
Joined: Thu Feb 09, 2006 10:18 am
Location: Sweden

Post by Troken »

I agree, the quality of the arbitary rotate could be better. If Lanczos could be an option it would be splendid.
User avatar
Troken
Posts: 698
Joined: Thu Feb 09, 2006 10:18 am
Location: Sweden

Post by Troken »

Any news on this matter? I stongly belive this should be a feature soon. Rotation quality should be much better, since XnView otherwise is such a competent piece of software.
User avatar
DOS386
Posts: 291
Joined: Sun Jun 11, 2006 2:43 pm

Re: High-quality arbitrary-angle rotation

Post by DOS386 »

stephan_g wrote (almost 1 year ago):
Currently XnView supports two quality modes of rotation by arbitrary (custom) angles:
1. Crappy - nearest-neighbor interpolation.
Actually it's a nearest-neighbor pick, no interpolation at all.
2. OK - with "smoothing" checkbox enabled, does bilinear interpolation or somesuch.
What about a really high-quality option that uses e.g. the excellent Lanczos algorithm already employed for resizing?
Troken wrote:
Any news on this matter? I stongly belive this should be a feature soon. Rotation quality should be much better, since XnView otherwise is such a competent piece
I highly support this.

Also I did test ( download results - 150 KiB ) :

- Bilinear zoom is only marginally worse than Lanczos (at least in this test)
- Rotate "smooth" is very ugly compared to Bilinear zoom, and I have no idea why :(
- Zoom bilinear vs zoom Lanczos results in a diagonal drift :-( ... seems to be a bug :bug:
- The "smooth" thingie does not work at all in NCONVERT:

Image

- "rotate_flag smooth" is "recognized" but ignored ... ROT0.PNG and ROT1.PNG are identical and both use NN pick :-(

- "rotate_flag smiley" complains about bad resize flag :-(

- Still visible OS/2-bug, DOS/32A junk not visible because I had patched it off :-(

Thus the IMHO only possible solution:

- Make all sampling algos available for rotate also (GFL + NC + XN)
- Delete the "rotate_flag smooth" completely
- Rename "rtype" into "samp" and use it for both resize and rotate
- Update the help: quick=NN ???

Code: Select all

  -rtype            : Type of resampling

Code: Select all

  -samp             : Sampling algorithm for resize and rotate
              quick (nearest neighbor pick)
              linear (bi-linear)
              hermite  
              gaussian
              bell     
              bspline  
              mitchell 
              lanczos (Lanczos 3) 
There is indeed no WinZIP under my rock.
User avatar
xnview
Author of XnView
Posts: 45495
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: High-quality arbitrary-angle rotation

Post by xnview »

Use -rotate 1 -rotate_flag smooth
Pierre.
User avatar
DOS386
Posts: 291
Joined: Sun Jun 11, 2006 2:43 pm

Re: High-quality arbitrary-angle rotation

Post by DOS386 »

xnview wrote:Use -rotate 1 -rotate_flag smooth
COOL ... it helps, thanks :-) so my "does not work at all in NCONVERT" was wrong, OTOH most of the points of my post and this thread are still valid, however :shock: , most notably the syntax inconsistence and availability of Lanczos sampling algo for rotating. Also, I have some further ideas about possible improvements of NCONVERT syntax - should I post them ?
There is indeed no WinZIP under my rock.
dandv
Posts: 45
Joined: Sat Nov 08, 2008 10:46 pm
Location: Digital Nomad

Bump!

Post by dandv »

+1 for high-quality rotation, and please make "smooth" checked by default in the Rotation dialog box. The first time I used Rotation in XnView, I thought "OK, this is probably be as good as in Irfan", and after saving the image, I noticed the jigsaw effect :(
User avatar
Troken
Posts: 698
Joined: Thu Feb 09, 2006 10:18 am
Location: Sweden

Re: Bump!

Post by Troken »

dandv wrote:... and please make "smooth" checked by default in the Rotation dialog box. ...
Good idea! I support this suggestion.