title: managed to set setAttribute(ExifInterface.TAG_ORIENTATION, ..) but not sure how can I see the change?
body: <p>My android </p>
  
  <p>My app takes a photo in portrait.</p>
  
  <p>In the gallery I see it OK</p>
  
  <p>but when saved to my server i see it in landscape.</p>
  
  <p>(This happens only on Samsun S2)</p>
  
  <p>I have read it might be connected with exif tags.</p>
  
  <p>I have checked my image file and got</p>
  
  <p><code>ORIENTATION_ROTATE_90</code></p>
  
  <p>what does this mean?</p>
  
  <p>I have tried to set it to <code>ORIENTATION_NORAML</code> or <code>ORIENTATION_UNDEFINED</code> but I'm not sure how to see the change?</p>
  
  <p>In the photo gallery i see it in landscape only 
  (whether taken in portrait or landscape)</p>
  
  <p>I managed to set the attributes as I read the new ones correctly.</p>
  
  <p>but how do I see the change? does this should help my original problem?</p>
  
  <pre><code>      ExifInterface exif;
          try {
            exif = new ExifInterface(imageFilename);
            int orientation =
                exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);
            exif.setAttribute(ExifInterface.TAG_ORIENTATION,
                String.valueOf(ExifInterface.ORIENTATION_ROTATE_270));
  //also tried ExifInterface.ORIENTATION_ROTATE_UNDEFINED)
            exif.saveAttributes();
            orientation =
                exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);
            boolean b = orientation == Configuration.ORIENTATION_LANDSCAPE;
  
          } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
          }
  </code></pre>
  
  <p>how can I fix this?</p>
  
  <p>why is changing the exif tag  not enough? and if changing the exif tag does nothing - why do I need to change it in addition to rotation?</p>