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.
High-quality arbitrary-angle rotation
Moderators: XnTriq, helmut, xnview
-
- Moderator & Librarian
- Posts: 6451
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
-
- Posts: 698
- Joined: Thu Feb 09, 2006 10:18 am
- Location: Sweden
-
- Posts: 698
- Joined: Thu Feb 09, 2006 10:18 am
- Location: Sweden
-
- Posts: 291
- Joined: Sun Jun 11, 2006 2:43 pm
Re: High-quality arbitrary-angle rotation
stephan_g wrote (almost 1 year ago):
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 
- The "smooth" thingie does not work at all in NCONVERT:

- "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 ???
Actually it's a nearest-neighbor pick, no interpolation at all.Currently XnView supports two quality modes of rotation by arbitrary (custom) angles:
1. Crappy - nearest-neighbor interpolation.
Troken wrote: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?
I highly support this.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
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


- The "smooth" thingie does not work at all in NCONVERT:

- "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.
-
- Author of XnView
- Posts: 45495
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
-
- Posts: 291
- Joined: Sun Jun 11, 2006 2:43 pm
Re: High-quality arbitrary-angle rotation
COOL ... it helps, thanksxnview wrote:Use -rotate 1 -rotate_flag smooth


There is indeed no WinZIP under my rock.
-
- Posts: 45
- Joined: Sat Nov 08, 2008 10:46 pm
- Location: Digital Nomad
Bump!
+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 
