How do I get the picture size with PIL?

前端 未结 7 1639
粉色の甜心
粉色の甜心 2020-11-28 18:15

How do I get a size of a pictures sides with PIL or any other Python library?

7条回答
  •  余生分开走
    2020-11-28 18:42

    Since scipy's imread is deprecated, use imageio.imread.

    1. Install - pip install imageio
    2. Use height, width, channels = imageio.imread(filepath).shape

提交回复
热议问题