title: GD (PHP) failing with bad JPEG image resize (Laravel Intervention\Image), no error in error.log
body: <p>I'm running Apache/PHP 5.6 on both a Windows and Ubuntu dev box.  Using Laravel 5.1 and Intervention/Image with the GD driver, I'm trying to resize some pretty large images (15-25MB) the problem is the resize is failing with the error <code>Unable to read image from file (/tmp/phpxxxxxx)</code>, but only on large images.  Anything in the 5-10MB range has no problem resizing...</p>
  
  <p>I'm assuming it has something to do with the process running out of memory (as smaller files have no issue), however the problem is I'm not actually getting any error messages at all in error.log...</p>
  
  <p>I've increased <code>memory_limit</code> in my php.ini to 2000M for testing, but the resize still fails.</p>
  
  <p>The code in the controller to resize the image is...</p>
  
  <pre><code>$img = Img::make($file-&gt;getRealPath());
  </code></pre>
  
  <p>The details of the error reported through Laravel are below...</p>
  
  <pre><code>NotReadableException in Decoder.php line 46:
  Unable to read image from file (C:\Apache24\htdocs\tmp\php361F.tmp).
  in Decoder.php line 46
  at Decoder-&gt;initFromPath('C:\Apache24\htdocs\tmp\php361F.tmp') in AbstractDecoder.php line 293
  at AbstractDecoder-&gt;init('C:\Apache24\htdocs\tmp\php361F.tmp') in AbstractDriver.php line 64
  at AbstractDriver-&gt;init('C:\Apache24\htdocs\tmp\php361F.tmp') in ImageManager.php line 50
  at ImageManager-&gt;make('C:\Apache24\htdocs\tmp\php361F.tmp') in Facade.php line 216
  at Facade::__callStatic('make', array('C:\Apache24\htdocs\tmp\php361F.tmp')) in SubmitPhotoController.php line 97
  at Image::make('C:\Apache24\htdocs\tmp\php361F.tmp') in SubmitPhotoController.php line 97
  at SubmitPhotoController-&gt;store()
  </code></pre>
  
  <p>How would I go about further troubleshooting to find out why this is failing? </p>
  
  <p>NOTES:</p>
  
  <ol>
  <li>I've decreased <code>memory_limit</code> just to make sure a low value would show an error when resizing and it does, so I don't think it's a PHP memory issue.</li>
  <li>I DO see the file showing up in C:\Apache24\htdocs\tmp before quickly going away.</li>
  </ol>
  
  <p>EDIT: </p>
  
  <pre><code>upload_max_filesize = 2000M
  post_max_size = 2000M
  </code></pre>
  
  <p>EDIT 2:
  After doing some testing, the images that were failing were those that were created by the panorama feature on my cell phone.  Even smaller file sized images ended up failing.</p>