Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I would like the height*width of a remote image. Could that be done with Curl, and if so how?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
431 views
Welcome To Ask or Share your Answers For Others

1 Answer

getimagesize() is the function you want.

It should be able to download a remote image and analyze it.

Edit: As a more direct answer to your question, Curl cannot analyze an image directly, but it can certainly fetch it for you, in which case you can then use the GD library to analyze it. getimagesize() manages to do the fetching as well though, so you can leave Curl out of the equation.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...