Layout-Parser / layout-parser

A Unified Toolkit for Deep Learning Based Document Image Analysis
https://layout-parser.github.io/
Apache License 2.0
4.82k stars 464 forks source link

getsize() depricated in Pillow>=10.0.1 #208

Open vera-bernhard opened 7 months ago

vera-bernhard commented 7 months ago

getsize() is deprecated and replaced with getbbox() in Pillow>=10.0.1

I replaced it in visualization.py such that it works with both newer and older Pillow versions.

There are other instances that also need to be adapted, but I have refrained from adapting them everywhere due to a lack of testing possibilities.

Pancham1603 commented 2 months ago

getbbox() doesn't return the width and height, it gives the coordinates. Will have to use left right top bottom values to get the width and height.