Opus does a lossless jpeg rotation when possible and falls back to a lossy rotation otherwise.
I would instead fall back into a rotation by changing the exif orientation instead of falling back into a lossy rotation.
I mean however Opus do a lossless jpeg rotation whenever possible
Not all software respects EXIF rotation, and JPEGs from most normal sources (cameras etc.) can be rotated losslessly. I think it might cause problems to fall back on changing the EXIF field instead of rotating the real image data, at least as the default.
We could probably provide a way to query if a particular JPEG can be rotated losslessly, so you could have a script which does that or EXIF rotation depending on the answer, if that would help?
I think it would need a way to ask Opus if the file can be rotated losslessly first, which is what I was proposing.
Although the same logic could go in the script itself, perhaps. Iād need to look up exactly what it needs to do. Would prefer to add a way to ask Opus, since then it can be changed if the rules change (although they are unlikely to change).
A think a better option would be to have a config that blocks lossy operations altogether as that's a fundamental mismatch that's bound to bind many unsuspecting users, not sure why potential EXIF incompatibility is better than a hidden quality loss
I've found a NOLOSSLESS flag, is there a AlwaysLOSSLESS alternative? That would be easier to use than querying