Open jforjava1981 opened 7 years ago
Thanks for putting it on the list!
Might happen some day. :-)
See this Stack Overflow question for background.
Best regards,
Harald K
I propose that if automatic rotation is implemented, it should be a feature which is deactivated as default. For simple image reading automatic rotation is not a problem. But on more complex scenarios, when metadata is handled explicitly, this at least affects width and height, which then differ from the read image. At least in my case I want to read the image as stored and handle such things myself where needed.
And to promote it: For 3.3 I've added some utility methods in the contrib-module, which already help with image orientation. :-)
BufferedImage com.twelvemonkeys.contrib.tiff.TIFFUtilities.applyOrientation(BufferedImage input, int orientation)
@Schmidor Good point promoting the utility method! 😀
Of course, should this be implemented, we also need to take orientation into account for the getWidth()/getHeight()
methods, the meta data etc. It's a lot of work, and not always straight forward... See the issues and pros/cons from the SO question above.
However, if we disable it by default, it's not that useful... It must work using just ImageIO.read(...)
, which is what 90% of the library's users ever does. Maybe a way to disable it would be better.
Anyway, I'm not starting implementing this feature tomorrow... ;-)
Harald K
Hi, are there still plans to implement this? It would be nice if it's handled automatically including the correct (rotated) width and height
@asc75 It's on the "nice to have" list, but not part of any planned milestone or anything.
Hi, this feature is still wanted ;)
Would be useful
Would love to see this feature implemented as most of phone and digi cams use exif to indicate rotation and not all browsers support image-rotation css property to read exif and rotate it accordingly. It becomes a pain for a website like I am working on where users upload photos using digicams and photos and we have to take extra unnecessary steps to honour the exif while showing it.
I see a todo as well in JPEG reader. Hope it gets removed soon :)