3 ms·
I never understood why the EXIF rotation tag was invented. It's caused so much pain and wrongly rotated images. Why can't whatever software writing those tags j
by 0x0 13y ago
I never understood why the EXIF rotation tag was invented. It's caused so much pain and wrongly rotated images. Why can't whatever software writing those tags just rotate the JPEG blocks instead? "jpegtran" can losslessly rotate and flip JPEG images fine.
- davej 13y agoMy understanding is that you can't perform lossless rotation on a jpeg unless it's dimensions are a multiple of 8. I'm not 100% sure about this so I'm happy to be corrected.
- 0x0 13y agoThat's true, but how many cameras produce photos with dimensions that are non-multiples of 8?
- harshreality 13y agoThere are no cropped images on the internet?
- Tloewald 13y agoOnce an image is cropped it's not going to be losslessly saved. You can crop images in some cameras, but I suspect they maintain multiples of 8.
- valisystem 13y agoEXIF rotation tags exists because it was way more simple for camera manufacturer than actually move the pixels around depending on orientation sensor on camera. That said, what I don't understand myself is software devs that thinks it's ok to rotate the pixels and saving the image with EXIF tags without updating the rotation one.
- benjamincburns 13y ago> what I don't understand myself is software devs that thinks it's ok to ... Most people, including software developers, think of JPEG as just a bunch of pixels. I think if you were to do a random survey of software developers, most wouldn't know that the rotation field exists, and an appalling percentage wouldn't even know that EXIF exists. Now that I think about it, I wonder what percentage would know that JPEG is a compressed format, let alone the fact that it's lossy...
- pwg 13y ago> Why can't whatever software writing those tags just rotate the JPEG blocks instead? Because that would make the camera cpu subsystem $0.50 more expensive.
- smackfu 13y agoThe theory is that the rotation info is metadata, taken from a separate sensor on the camera, so it should go in the metadata format which is EXIF, just like the timestamp/ISO/focal length.