how do i force a non originated jpeg file into a jpeg?
<p>i built an upload page that lets me upload images and i came onto this error when uploaded a file with an extension of jpg.</p>

<pre><code>Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: 
gd-jpeg, libjpeg: recoverable error: Premature end of JPEG 
</code></pre>

<p>after playing with it i noticed that not even photoshop can open it. the file is corrupt. I then tried to upload it into facebook and facebook was able to accept it. it is weird how imaagecreatefromjpeg() in php wont accept this jpeg but facebook does. wonder what their using...
but is it possible to force this image as a jpeg?</p>
