mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-04-23 10:41:58 +03:00
minor fixes, linting corrections
This commit is contained in:
parent
a57ebeaaf4
commit
23fb57dd26
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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"),
|
||||
|
|
Loading…
Reference in New Issue
Block a user