But, as I have said, e.g. IrfanView nevertheless seems to produce
image degradation if performing lossless rotation (which saves
automatically the rotated image). So its seems that it's so called
lossless ratation is not really lossless, but generates a slight
image degradation.
You should note what "lossless JPEG rotation" really means:
It means that it is
reversible , i.e. if you reverse the rotation
with same algorithm then you get exactly the same image as
the original.
Lossless JPEG rotation does
not mean that the losslessly rotated
(compressed) JPEG file decompresses to exactly the same image
as if you decompress the original and then rotate the bitmap.
The slight differences are due to the JPEG processing steps,
namely roundup errors in the IDCT and color conversion, and
different parameters and/or algorithms in the internal color
upsampling.
Note that most digital cameras (including Sony) produce 2x1
horizontal only subsampled JPEG files, which turn to 1x2
when losslessly rotated by 90 or 270 degrees.
Most decoders use different algorithms for 2x1 and 1x2 upsampling
(including those based on the free IJG library), since 2x1 is much
more common, while 1x2 was virtually non-existent before
introducing the lossless rotation algorithm.
Thus you may get noticeably different results when comparing
the resulting bitmaps.
But the data itself is still
lossless , in the sense that you get
exactly the original when reversing the rotation.
BTW, my modified IJG library for Jpegcrop uses more advanced
upsampling techniques with special adaption to all currently used
subsampling parameters (1x1, 1x2, 2x1, 2x2), thus leaving less
differences for display.
For more information and applications regarding EXIF orientation
processing and lossless rotation, see
http://jpegclub.org/exif_orientation.html
http://jpegclub.org/losslessapps.html
Regards
Guido