From d0e5c1e48d582f88ad24baad6c836b7efe9fa5e7 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Fri, 26 Aug 2022 08:22:45 +0200 Subject: [PATCH] add comment for loading error for images larger than 65536 pixel --- plakativ.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plakativ.py b/plakativ.py index 7007a58..81e7add 100755 --- a/plakativ.py +++ b/plakativ.py @@ -387,6 +387,10 @@ class Plakativ: gdl = self.doc[self.pagenr].get_displaylist else: gdl = self.doc[self.pagenr].getDisplayList + # this may fail with "RuntimeError: image is too wide" + # from pdf_load_image_imp() in pdf-image.c from mupdf for sizes larger + # than 1<<16 pixels: + # https://bugs.ghostscript.com/show_bug.cgi?id=703839 rect = gdl().rect inpage_width = pt_to_mm(rect.width) inpage_height = pt_to_mm(rect.height)