How to get image resource size in bytes with PHP and GD?

后端 未结 5 682
旧时难觅i
旧时难觅i 2020-12-10 06:42

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

5条回答
  •  温柔的废话
    2020-12-10 07:20

    Save the image file in the desired format to a tmp dir, and then use filesize() http://php.net/manual/de/function.filesize.php before uploading it to S3 from disk.

提交回复
热议问题