title: Images shown rotated in Codename One
body: <p>I'm developing a Codename One app for iOS. </p>
  
  <p>I gave the user the option to take pictures or to load them from the gallery of the device. After that, the app shows pictures in labels (encapsulated in a BoxLayout). 
  When I take pictures in portrait mode, everything perfectly works, but when I take pictures in landscape mode, that picture is shown rotated (a 90° rotation).</p>
  
  <p>Here is the code:</p>
  
  <pre><code>String filePath = Capture.capturePhoto();
  if (filePath != null) {
      try { 
          Image img = Image.createImage(filePath);
          if (img != null){
              setImageToContainer(img);
          }  
      } 
      catch (IOException err) {
          ToastBar.showErrorMessage("Problemi con le immagini: " + err.getMessage());
          completeImageName = null;
          fileImageName = null;
      }   
  }
  
  private void setImageToContainer(Image img){
      Label imgLbl = new Label();
      Style s = UIManager.getInstance().getComponentStyle("Button");
      FontImage p = FontImage.createMaterial(FontImage.MATERIAL_PORTRAIT, s);
      EncodedImage placeholder = EncodedImage.createFromImage(p.scaled(p.getWidth() * 3, p.getHeight() * 4), false);
      imgLbl.setIcon(placeholder);
      list.add(imgLbl);
      //Scalo l'immagine
      if(img.getWidth() &gt; imgLbl.getParent().getWidth()) 
          img = img.scaledWidth(imgLbl.getParent().getWidth());
      if(img.getHeight()&gt; imgLbl.getParent().getHeight()) 
          img = img.scaledHeight(imgLbl.getParent().getHeight());
      imgLbl.setIcon(img);
      list.repaint();
  }
  </code></pre>
  
  <p>Reading <a href="https://stackoverflow.com/a/51490256/4948006">that answer</a>, I understood <em>Image.createImage(filePathToImage)</em> method takes in account EXIF data, in order to properly rotate the image.</p>
  
  <p>How can I solve my problem? Is there a way to get EXIF data?</p>