开发者

Determining dimensions of an uploaded photo using PHP

开发者 https://www.devze.com 2023-02-18 10:34 出处:网络
I was wondering if it is possible to get an uploaded images dimensions using PHP, so that I could set it as a potrait/landscape image, which would help in making 开发者_StackOverflowthumbnails that do

I was wondering if it is possible to get an uploaded images dimensions using PHP, so that I could set it as a potrait/landscape image, which would help in making 开发者_StackOverflowthumbnails that don't look awful. Anyone know a way to do this?

Thanks!


Sure:

list($width, $height) = getimagesize($image_path); 


Sure, use getimagesize() on your uploaded file.


Use: getimagesize() function

0

精彩评论

暂无评论...
验证码 换一张
取 消