Fast way to get image dimensions (not filesize)

前端 未结 8 1703
独厮守ぢ
独厮守ぢ 2021-01-29 23:03

I\'m looking for a fast way to get the height and width of an image in pixels. It should handle at least JPG, PNG and TIFF, but the more the better. I emphasize

8条回答
  •  春和景丽
    2021-01-29 23:25

    I not sure you have php installed, but this PHP function is pretty handy

     php -r "print_r(getimagesize('http://www.google.com/images/logos/ps_logo2.png'));"
    

提交回复
热议问题