我需要使用 imageio 获取图像的宽度和高度,将图像加载到 imageio 中imread
,如何获取图像的高度和宽度,或者换句话说,图像的分辨率?在文档中,它提到它将返回 numpy 数组
例子:
>>> from imageio import imread
>>> image_date = imread('c:/myImage.png')
当我打印出来时,我相信它会返回一个颜色数组列表
>>> print image_date
[[[ 18 23 16]
[ 31 32 24]
[ 34 29 23]
...,
[ 97 73 49]
[ 95 73 50]
[ 94 72 49]]
[[ 23 24 18]
[ 30 30 22]
[ 36 29 21]
...,
[ 98 74 50]
[ 95 73 50]
[ 95 73 50]]
[[ 32 27 21]
[ 34 29 23]
[ 37 28 21]
...,
[ 94 72 48]
[ 97 72 50]
[ 97 72 50]]
...,
[[ 43 35 24]
[ 46 36 26]
[ 48 36 24]
...,
[ 47 31 18]
[ 47 31 18]
[ 47 30 20]]
[[ 59 56 47]
[ 59 55 46]
[ 59 50 41]
...,
[ 49 33 20]
[ 48 32 19]
[ 48 32 19]]
[[114 115 107]
[104 104 96]
[100 93 85]
...,
[ 48 32 19]
[ 48 32 19]
[ 47 31 18]]]
任何的想法?提前致谢。