minor fixes, linting corrections

This commit is contained in:
olokelo 2024-03-02 10:37:55 +01:00
parent a57ebeaaf4
commit 23fb57dd26
4 changed files with 10 additions and 10 deletions

View File

@ -21,7 +21,10 @@ except ImportError:
# cjxl flower.jpg flower.jxl --lossless_jpeg=0 -q 75 -e 8
# python -c "from PIL import Image; im=Image.open('Tests/images/flower2.webp'); f=open('/tmp/xmp.xml', 'wb'); f.write(im.info['xmp']); f.close()"
# >>> from PIL import Image
# >>> with Image.open('Tests/images/flower2.webp') as im:
# >>> with open('/tmp/xmp.xml', 'wb') as f:
# >>> f.write(im.info['xmp'])
# cjxl flower2.jpg flower2.jxl --lossless_jpeg=0 -q 75 -e 8 -x xmp=/tmp/xmp.xml

View File

@ -11,7 +11,8 @@ test_file = "Tests/images/hopper.jxl"
@skip_unless_feature("jxl")
class TestJxlLeaks(PillowLeakTestCase):
# TODO: lower the limit, I'm not sure what is correct limit since I have libjxl debug system-wide
# TODO: lower the limit, I'm not sure what is correct limit
# since I have libjxl debug system-wide
mem_limit = 16 * 1024 # kb
iterations = 100

View File

@ -67,13 +67,8 @@ class JxlImageFile(ImageFile.ImageFile):
xmp = self._decoder.get_xmp()
if icc:
self.info["icc_profile"] = icc
import traceback
try:
if exif:
self.info["exif"] = self._fix_exif(exif)
except:
traceback.print_exc()
if exif:
self.info["exif"] = self._fix_exif(exif)
if xmp:
self.info["xmp"] = xmp

View File

@ -270,7 +270,8 @@ def pilinfo(out=None, supported_formats=True):
("transp_webp", "WEBP Transparency"),
("webp_mux", "WEBPMUX"),
("webp_anim", "WEBP Animation"),
("jxl", "JPEG XL")("jpg", "JPEG"),
("jxl", "JPEG XL"),
("jpg", "JPEG"),
("jpg_2000", "OPENJPEG (JPEG2000)"),
("zlib", "ZLIB (PNG/ZIP)"),
("libtiff", "LIBTIFF"),