ejeschke / ginga

The Ginga astronomical FITS file viewer
BSD 3-Clause "New" or "Revised" License
120 stars 77 forks source link

Pillow v10.0 has deprecated many text size methods, including ImageDraw.textsize #1057

Closed StuartLittlefair closed 11 months ago

StuartLittlefair commented 11 months ago

See https://pillow.readthedocs.io/en/stable/deprecations.html#font-size-and-offset-methods

This means that the following lines need changing to use an alternative method

https://github.com/ejeschke/ginga/blob/804ca99f8bde9f3bc75220b26b3020e9367bc5f9/ginga/pilw/PilHelp.py#L39

https://github.com/ejeschke/ginga/blob/804ca99f8bde9f3bc75220b26b3020e9367bc5f9/ginga/pilw/PilHelp.py#L134

ejeschke commented 11 months ago

@StuartLittlefair , thanks for the heads up. Did you see any clear workaround for the change? PR welcome!

ejeschke commented 11 months ago

Thanks for the pointers, @StuartLittlefair. First stab at fix in #1058

ejeschke commented 11 months ago

@StuartLittlefair, merged fix. Please reopen if you find a problem with it. Worked well with the versions of PIL I tried, including 10.0

StuartLittlefair commented 11 months ago

Thanks @ejeschke !