title: How to get image resource size in bytes with PHP and GD?
body: <p>I'm resizing images with php gd. The result is image resources that i want to upload to Amazon S3. It works great if i store the images on disk first but i would like to upload them directly from memory. That is possible if i just know the bytesize of the image. </p>
  
  <p>Is there some way of getting the size (in bytes) of an gd image resource?</p>