0

I am trying to insert image in mysql database using JavaFX. When I retrieve and display the image using ImageView, some images are correctly oriented while some are rotated ( particularly the images those are taken by camera of mobile). I need help to know how to get the current orientation of an image and how to fix that if it is not in correct orientation or rotated.

  • 1
    Does this answer your question? [How to rotate JPEG images based on the orientation metadata?](https://stackoverflow.com/questions/5905868/how-to-rotate-jpeg-images-based-on-the-orientation-metadata) – Giovanni Contreras Apr 22 '22 at 17:06
  • 1
    you can get that info metadata from image file – Giovanni Contreras Apr 22 '22 at 17:08
  • 1
    Once you have determined the orientation from the meta data (using the info on the provided link), you could either modify the original image to reorient it or rotate the image view node (rotation of the node is demonstrated in the [ImageView javadoc](https://openjfx.io/javadoc/17/javafx.graphics/javafx/scene/image/ImageView.html)). – jewelsea Apr 22 '22 at 18:46
  • 1
    Note: getting the orientation and changing the orientation are separate questions. When you ask multiple questions is a single question it is often less likely you will get a useful response. – jewelsea Apr 22 '22 at 19:44

0 Answers0