4

I have image as binary string. (submitted via POST from C# app as byte array)

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

getimagesize function takes filename as parametar. Is there alternative that can read image from binary string and return image size?

Emir
  • 1,586
  • 2
  • 16
  • 32

2 Answers2

4

You can use imagesx and imagesy on gd resources.

deceze
  • 471,072
  • 76
  • 664
  • 811
0

Try imagesx(); and imagesy();

Alex Ackerman
  • 1,271
  • 12
  • 14