PHP Get image size when image is stored as byte array

I have an image as a binary string. (sent via POST from a C # application as an array of bytes)

I can read it using the imagecreatefromstring function. How to get image size (width and height)?

The getimagesize function accepts the file name as parametar. Is there an alternative that can read an image from a binary string and return the image size?

+4
source share
2 answers

You can use imagesx and imagesy on gd resources.

+4
source

Try imagesx(); and imagesy();

0
source

All Articles