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 up
This also works:
$img = imagecreatetruecolor(100,100); // ... processing ob_start(); // start the buffer imagejpeg($img); // output image to buffer $size = ob_get_length(); // get size of buffer (in bytes) ob_end_clean(); // trash the buffer
And now $size will have your size in bytes.
$size