I have some server code that is generating thumbnails when an image is uploaded. The issue is that when the image was taken and the camera/device was rotated, the thumbnail
This can be done surprisingly easily by using the image part of JavaXT core library :
// Browsers today can't handle images with Exif Orientation tag
Image image = new Image(uploadedFilename);
// Auto-rotate based on Exif Orientation tag, and remove all Exif tags
image.rotate();
image.saveAs(permanentFilename);
That's it!
I have tried Apache Commons Imaging, but that was a mess. JavaXT is way more elegant.