layout-parser icon indicating copy to clipboard operation
layout-parser copied to clipboard

getsize() depricated in Pillow>=10.0.1

Open vera-bernhard opened this issue 1 year ago • 1 comments

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.

vera-bernhard avatar Mar 07 '24 14:03 vera-bernhard

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.

Pancham1603 avatar Jul 29 '24 04:07 Pancham1603