title: Out Of Memory exception on System.Drawing.Image.FromFile()
body: <p>I have an image uploader and cropper which creates thumbnails and I occasionally get an Out Of Memory exception on the following line:</p>
  
  <pre><code>Dim bm As Bitmap = System.Drawing.Image.FromFile(imageFile)
  </code></pre>
  
  <p>The occurance of the error is tiny and very rare, but I always like to know what might be causing it. The imageFile variable is just a Server.MapPath to the path of the image.</p>
  
  <p>I was curious if anyone had experience this issue previously and if they had any ideas what might be causing it? Is it the size of the image perhaps?</p>
  
  <p>I can post the code if necessary and any supporting information I have, but would love to hear people's opinions on this one.</p>