Page 1 of 1

High-quality arbitrary-angle rotation

Posted: Tue Dec 25, 2007 11:36 pm
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.

Posted: Sat Jan 26, 2008 4:50 am
by XnTriq
This is a very good idea, no doubt.
For resizing photographic images I never use any other programs.

Posted: Sat Jan 26, 2008 10:47 am
by Troken
I agree, the quality of the arbitary rotate could be better. If Lanczos could be an option it would be splendid.

Posted: Mon Sep 01, 2008 2:19 pm
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.

Re: High-quality arbitrary-angle rotation

Posted: Fri Sep 05, 2008 11:34 pm
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) 

Re: High-quality arbitrary-angle rotation

Posted: Mon Sep 08, 2008 7:20 am
by xnview
Use -rotate 1 -rotate_flag smooth

Re: High-quality arbitrary-angle rotation

Posted: Tue Sep 16, 2008 12:35 am
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 ?

Bump!

Posted: Sat Nov 08, 2008 10:48 pm
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 :(

Re: Bump!

Posted: Mon Nov 10, 2008 8:06 am
by Troken
dandv wrote:... and please make "smooth" checked by default in the Rotation dialog box. ...
Good idea! I support this suggestion.