This seems to be still a bit of wild jungle out there. Here is my observations of lossless rotations:
- there is 3 different tags that might specify lossless rotation, 1. "orientation", 2. "rotation", 3. "cameraorientation"
- orientation is typically part of EXIF data and typically is modifiable (although I run into couple of cases where exiftool was unable to modify it. The "JPEG lossless rotation" if I have not understood incorrectly is simply modifying value in EXIF orientation field and pic viewers then rotate the pic if orientation is anything else than 0 degrees (90, 180, or 270 degrees)
- rotation is less commonly used for still images but HEIC images (iphones) is the large exception. For videos (MP4) rotation seems to be widely used and viewers in general use rotation field to decide how to display the video. Rotation for still images is NOT modifiable in any easy way.
- some digicams save direction to both orientation and cameraorientation. Some save only to cameraorientation which can cause issues when rendering image.
HEIC:
- my phone (S21FE) when taking portrait pic saves value to BOTH orientation and rotation fields. I would assume that maybe same is for iphone HEICs but hopefully somebody here can confirm?
- problems start to arise because only orientation seems to be modifiable but some apps use rotation when rendering and some use orientation. These programs seem to use rotation: XNView MP, MS Photos, Affinity Photo. These programs seem to use orientation: majority of android gallery apps
AVIF:
- currently majority of viewers ignore orientation tag but Samsung Gallery is exception that respects it
JXL:
- MS Photos respect orientation tag, XNView MP ignores it
DNG:
- don't remember anymore which programs use which tag but I assume that probably orientation? Anyway I got this solved by bat file which modifies both in rare situations where I need to rotate a file.
So how this situation should be dealt with? Maybe first read some standards how they specify lossless rotations. Also problem is that no cameras save yet AVIF or JXL pics so there is not yet a large need (except among us who wants to do archiving projects a bit early)
- "enable reading and modifying orientation/rotation for modern file formats"
When this setting is enabled you can
1. apply lossless rotation in addition to JPEG at least to 1. HEIC, 2. AVIF, 3. JXL, 4. maybe others? (dng, webp)
2. when HEIC is rendered renderer reads orientation tag instead of rotation tag
3. when AVIF, JXL, others are rendered orientation tag is read and respected
Lossless rotation is important when you archive large amount of pics but don't have time to search through them for wrong rotations and maybe notice wrong rotation years after and want to rotate without re-encoding (if you pushed hard in first encoding then re-encoding just for 90 deg rotation might be the one step that brings visible artifacts)
Here is what ChatGPT answered about the subject.

- Screenshot 2025-05-29 134913.png (104.62 KiB) Viewed 109 times
xnview wrote: Tue Nov 10, 2020 8:59 pm
Pierre check this out if you have any insights