3 ms·
Images can be rotated with metadata? Is that finally an explanation for why I’ll sometimes rotate an image on my computer, upload it, and find the uploaded copy
by lelandfe 2y ago
Images can be rotated with metadata? Is that finally an explanation for why I’ll sometimes rotate an image on my computer, upload it, and find the uploaded copy in the original rotation?
- jefftk 2y agoFor JPEG this is the EXIF Orientation flag: https://jdhao.github.io/2019/07/31/image_rotation_exif_info/ https://jdhao.github.io/2019/07/31/image_rotation_exif_info/ It allows the camera to write almost its output without considering how you're holding the camera, and then write just three bits to indicate how it should be displayed. (It should be two bits, since the third logical bit is for mirroring, except the specific flag values they chose for the non-mirrored rotations were 0x0, 0x2, 0x5, and 0x7.)
- dunham 2y agoYeah and web browsers ignore it for compatibility with web browsers that ignored it. I believe rotation is lossy if you don't do it in metadata and the file is using subsampling. Edit: some sites will rotate the file on upload, especially for scaled, non-original versions, to avoid this issue. I've done this at work in the past.