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
# <https://www.gnu.org/licenses/>.
#
from PIL.Image import BICUBIC
from PIL.Image import Resampling
from reportlab.lib.utils import ImageReader
@@ -31,7 +31,7 @@ class ThumbnailingImageReader(ImageReader):
height = width * self._image.size[1] / self._image.size[0]
self._image.thumbnail(
size=(int(width * dpi / 72), int(height * dpi / 72)),
resample=BICUBIC
resample=Resampling.BICUBIC
)
self._data = None
return width, height