If you want to rotate a jpeg yourself (which is easily done with "magic in.jpg rotate 90 out.jpg" and, of course, other software) but lossless, there's https://jpegclub.org/jpegtran/ which accomplishes it.
When generating rotated thumbnails (without caring for "lossless") the best strategy in my experience is to first rotate the large original image and then generate the thumbnail afterwards, because image resizing will most often hide any rotation artifacts anyways.
esperent•1h ago
tinco•1h ago
dividuum•1h ago
perching_aix•25m ago
Doohickey-d•1h ago
I could also imagine that the earliest digital cameras wouldn't have had the processing power, or RAM to store the entire image in memory after reading it from the sensor, in order to do such a rotation. Hence EXIF rotation as a cheap alternative.
esperent•27m ago
https://www.betterjpeg.com/lossless-rotation.htm
perching_aix•3m ago
They offer three "solutions" to the issue of partial blocks:
- cut them off and stop worrying about it
- show whatever the original JPEG encoder put there and stop worrying about it
- replace whatever the original JPEG encoder put there and stop worrying about it
I cannot imagine anyone honestly considering these and then shipping them. It's fine if the user manually consents, but automated, this is pretty objectionable. Extending the image in arbitrary ways or cutting off of it is really not what I'd expect from a codec to do when I ask it to perform a lossless transformation, particularly specific ones, like flip and rotate.
blululu•32m ago