From c9787e3e769841dfc0536541da07ccdf8954dd27 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Tue, 27 Feb 2024 11:28:08 -0800 Subject: [PATCH] LOAD_TRUNCATED_IMAGES = True --- kindlecomicconverter/comic2ebook.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kindlecomicconverter/comic2ebook.py b/kindlecomicconverter/comic2ebook.py index 6598d713..afb5afb8 100755 --- a/kindlecomicconverter/comic2ebook.py +++ b/kindlecomicconverter/comic2ebook.py @@ -21,7 +21,6 @@ import os import pathlib import re -import subprocess import sys from argparse import ArgumentParser from time import strftime, gmtime @@ -36,7 +35,7 @@ from uuid import uuid4 from natsort import os_sorted from slugify import slugify as slugify_ext -from PIL import Image +from PIL import Image, ImageFile from subprocess import STDOUT, PIPE from psutil import virtual_memory, disk_usage from html import escape as hescape @@ -51,6 +50,8 @@ from . import kindle from . import __version__ +ImageFile.LOAD_TRUNCATED_IMAGES = True + def main(argv=None): global options