ImageIO.read( ) always rotates my uploaded picture
I want to create a web application that allow users to upload their image to the server. When they click send, their image will be uploaded to the server (multipart). Before saving, I want to make some operation with the image, so I decided to use .. ImageIO.read(InputStream) to get BufferedImage object here is the code: public static BufferedImage getBufferedImageFromMultipartFile(MultipartFile file) throws APIException { BufferedImage bi = null; try { bi = ImageIO.read(file.getInputStream()); } catch (IOException e) { throw new APIException(ErrorCode.SERVER_ERROR, e); } return bi; } The