Package: impressive Version: 0.13.1-1 Followup-For: Bug #1047864 Checking the online documentation of Pillow (the fork of PIL that Debian ships), the ANTIALIAS method has been renamed as LANCZOS:
https://pillow.readthedocs.io/en/stable/releasenotes/2.7.0.html Antialias renamed to Lanczos A new LANCZOS constant was added instead of ANTIALIAS. When ANTIALIAS was initially added, it was the only high-quality filter based on convolutions. It’s name was supposed to reflect this. Starting from Pillow 2.7.0 all resize method are based on convolutions. All of them are antialias from now on. And the real name of the ANTIALIAS filter is Lanczos filter. The ANTIALIAS constant is left for backward compatibility and is an alias for LANCZOS. This relates to a very old version (2.7.0 is from 2015)... I don't know the actual details as to when and why this backward compatibility alias was dropped, but it just is not provided anymore. I prepared the patch I'm attaching to this mail and tested it (it works correctly); I'm rebuilding and uploading a NMU for 7 days. -- System Information: Debian Release: trixie/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 6.1.0-1-amd64 (SMP w/8 CPU threads; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages impressive depends on: ii mupdf-tools 1.22.2+ds1-1 ii poppler-utils 22.12.0-2+b1 ii python3 3.11.4-5+b1 ii python3-pil 10.0.0-1 ii python3-pygame 2.5.0-2 Versions of packages impressive recommends: ii ffmpeg 7:6.0-5 ii mplayer 2:1.5+svn38423-2+b1 ii perl 5.36.0-7 ii xdg-utils 1.1.3-4.1 Versions of packages impressive suggests: ii ghostscript 10.01.2~dfsg-1 pn latex-beamer <none> pn pdftk <none> -- no debconf information
diff --git a/impressive.py b/impressive.py index 993dcee..9eb564c 100644 --- a/impressive.py +++ b/impressive.py @@ -2076,7 +2076,7 @@ class WipeClouds(Wipe): img = ImageOps.equalize(ImageOps.autocontrast(img)) for i in range(self.blur): img = img.filter(ImageFilter.BLUR) - img = img.crop((border, border, img.size[0] - 2 * border, img.size[1] - 2 * border)).resize((self.rx, self.ry), Image.ANTIALIAS) + img = img.crop((border, border, img.size[0] - 2 * border, img.size[1] - 2 * border)).resize((self.rx, self.ry), Image.LANCZOS) return img2str(img) class WipeBrightness1(Wipe): """wipe based on the current slide's brightness""" @@ -3505,16 +3505,16 @@ def RenderPDF(page, MayAdjustResolution, ZoomMode): # downsample a supersampled image if Supersample and not(ZoomMode): img = img.resize((int(float(out[0]) / Supersample + 0.5), - int(float(out[1]) / Supersample + 0.5)), Image.ANTIALIAS) + int(float(out[1]) / Supersample + 0.5)), Image.LANCZOS) parscale = False # don't scale again # perform PAR scaling (required for pdftoppm which doesn't support different # dpi for horizontal and vertical) if parscale: if PAR > 1.0: - img = img.resize((int(img.size[0] / PAR + 0.5), img.size[1]), Image.ANTIALIAS) + img = img.resize((int(img.size[0] / PAR + 0.5), img.size[1]), Image.LANCZOS) else: - img = img.resize((img.size[0], int(img.size[1] * PAR + 0.5)), Image.ANTIALIAS) + img = img.resize((img.size[0], int(img.size[1] * PAR + 0.5)), Image.LANCZOS) # crop the overscan (if present) if Overscan: @@ -3567,7 +3567,7 @@ def LoadImage(page, zoom=False, img=None): if newsize > img.size: filter = Image.BICUBIC else: - filter = Image.ANTIALIAS + filter = Image.LANCZOS return img.resize(newsize, filter) @@ -3703,7 +3703,7 @@ def PageImage(page, ZoomMode=False, RenderMode=False): sy = OverviewCellY - 2 * OverviewBorder if HighQualityOverview: t0 = time.time() - img.thumbnail((sx, sy), Image.ANTIALIAS) + img.thumbnail((sx, sy), Image.LANCZOS) if (time.time() - t0) > 0.5: print("Note: Your system seems to be quite slow; falling back to a faster,", file=sys.stderr) print(" but slightly lower-quality overview page rendering mode", file=sys.stderr) @@ -6409,7 +6409,7 @@ def main(): if (dummy.size[0] > maxsize[0]) or (dummy.size[1] > maxsize[1]): size = ZoomToFit(dummy.size, maxsize, force_int=True) if min(size) > 0: - dummy.thumbnail(size, Image.ANTIALIAS) + dummy.thumbnail(size, Image.LANCZOS) else: dummy = None if dummy: