title: How can I save an image using System.Drawing.Imaging without auto rotating it?
body: <p>When I resize my image and save it using the &quot;System.Drawing.Imaging&quot; save function, it adds the rotation embedded from the EXIF data and rotates my good original picture 180 degrees. I tried saving it in a different format to remove the EXIF data but it still includes the EXIF rotation for the new picture. Any ideas on how I can save the picture in the orientation I can see in the thumbnails .</p>
  <pre class="lang-vb prettyprint-override"><code>Private Sub ClearEXIF() 
      Dim Pname As String = Nothing
  
      For Each Fil In Directory.GetFiles(DlDir)
          OK2Go = False
          If Fil.Contains(&quot;jpg&quot;) Then OK2Go = True
          If Fil.Contains(&quot;jpeg&quot;) Then OK2Go = True
  
          If OK2Go Then
              Dim bmp As Bitmap = Image.FromFile(Fil)
  
              Pname = GetLastName(Fil) 'this function gets the name of the jpg without the path info
              temp1 = Split(Pname, &quot;.&quot;)
  
              bmp.Save(&quot;C:\Temp\Flat\&quot; &amp; temp1(0) &amp; &quot;+&quot; &amp; temp1(1) &amp; &quot;.png&quot;, ImageFormat.png)
              bmp.Dispose()
          End If
  
      Next
      MsgBox(&quot;Done&quot;)
  End Sub
  </code></pre>