1
0
Fork 0
forked from josch/plakativ

add comment for loading error for images larger than 65536 pixel

This commit is contained in:
Johannes Schauer Marin Rodrigues 2022-08-26 08:22:45 +02:00
parent d4ed39b7d2
commit d0e5c1e48d
Signed by untrusted user: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -387,6 +387,10 @@ class Plakativ:
gdl = self.doc[self.pagenr].get_displaylist gdl = self.doc[self.pagenr].get_displaylist
else: else:
gdl = self.doc[self.pagenr].getDisplayList 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 rect = gdl().rect
inpage_width = pt_to_mm(rect.width) inpage_width = pt_to_mm(rect.width)
inpage_height = pt_to_mm(rect.height) inpage_height = pt_to_mm(rect.height)