PHP: Getting image file size from resource (before uploading)?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/4023441/how-to-get-image-resource-size-in-bytes-with-php-and-gd">How to get image resource size in bytes with PHP and GD?</a>  </p>
</blockquote>



<pre><code>$resource = imagecreatefromstring(stream_get_contents($fhandle));
</code></pre>

<p>I will save this image on my server with createjpeg() but I want to check the file size before saving it.</p>

<p>How can this be done?</p>
