title: How to retrieve the exif orientation value in flutter
body: <p>I am developing an app using Flutter and I want to retrieve the exif orientation value of an image that I selected using the image_picker plugin. </p>
  
  <p>When I run the code below and select an image that I have rotated beforehand, I get null for the orientation value and an empty Map for the exif data.</p>
  
  <pre><code>File file = await ImagePicker.pickImage(
    source: ImageSource.gallery,
  );
  img.Image decodedImage = img.decodeImage(file.readAsBytesSync());
  print("decodedImage.exif.orientation ${decodedImage.exif.orientation}"); // null
  print("decodedImage.exif.data ${decodedImage.exif.data}"); // {}
  </code></pre>
  
  <p>I send the image that I used with this code to my mac book through google drive to see the orientation value and this is what I got:</p>
  
  <p><a href="https://i.stack.imgur.com/We1GF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/We1GF.png" alt="enter image description here"></a></p>
  
  <p>I am using the newest available version of the image_picker plugin. How can I retrieve the exif orientation value of an image in Flutter?</p>