Fix further Pillow compatibility issues

This commit is contained in:
Raphael Michel
2022-04-05 09:57:11 +02:00
parent 4ab298dd10
commit d0474afdfe
2 changed files with 3 additions and 3 deletions

View File

@@ -19,7 +19,7 @@
# You should have received a copy of the GNU Affero General Public License along with this program. If not, see # You should have received a copy of the GNU Affero General Public License along with this program. If not, see
# <https://www.gnu.org/licenses/>. # <https://www.gnu.org/licenses/>.
# #
from PIL.Image import BICUBIC from PIL.Image import Resampling
from reportlab.lib.utils import ImageReader from reportlab.lib.utils import ImageReader
@@ -31,7 +31,7 @@ class ThumbnailingImageReader(ImageReader):
height = width * self._image.size[1] / self._image.size[0] height = width * self._image.size[1] / self._image.size[0]
self._image.thumbnail( self._image.thumbnail(
size=(int(width * dpi / 72), int(height * dpi / 72)), size=(int(width * dpi / 72), int(height * dpi / 72)),
resample=BICUBIC resample=Resampling.BICUBIC
) )
self._data = None self._data = None
return width, height return width, height

View File

@@ -205,7 +205,7 @@ setup(
'packaging', 'packaging',
'paypalrestsdk==1.13.*', 'paypalrestsdk==1.13.*',
'phonenumberslite==8.12.*', 'phonenumberslite==8.12.*',
'Pillow==9.*', 'Pillow==9.1.*',
'protobuf==3.19.*', 'protobuf==3.19.*',
'psycopg2-binary', 'psycopg2-binary',
'pycountry', 'pycountry',