by donatj · 1y ago · 0 comments
JPEG rotation only has to be lossy when the image is not evenly divisible into macro blocks - rather than transcoding just rotate the macro blocks, and where they're placed.
Like, if you had millions of images you needed to rotate on a server in a batch job, then OK.
But if you're just rotating one photo, or even a hundred, that you've just taken, it's plenty fast enough.
You can also have other situations where this is useful like a primarily hardware pipeline that doesn't support rotation, but you can mark the rotation at the end. Although this is probably less of an issue for PNG than formats that typically come out of cameras and scanners.