mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 02:16:19 +03:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
de43bc99c8
commit
41b3ac8aed
|
@ -381,7 +381,7 @@ def test_custom_comment():
|
||||||
output_stream.seek(0)
|
output_stream.seek(0)
|
||||||
data = output_stream.read()
|
data = output_stream.read()
|
||||||
# Lazy method to determine if the comment is in the image generated
|
# Lazy method to determine if the comment is in the image generated
|
||||||
assert(bytes(unique_comment, "utf-8") in data)
|
assert bytes(unique_comment, "utf-8") in data
|
||||||
|
|
||||||
|
|
||||||
def test_plt_marker():
|
def test_plt_marker():
|
||||||
|
@ -400,13 +400,13 @@ def test_plt_marker():
|
||||||
break
|
break
|
||||||
jp2_boxid = struct.unpack(">H", box_bytes)[0]
|
jp2_boxid = struct.unpack(">H", box_bytes)[0]
|
||||||
|
|
||||||
if jp2_boxid == 0xff4f:
|
if jp2_boxid == 0xFF4F:
|
||||||
# No length specifier for main header
|
# No length specifier for main header
|
||||||
continue
|
continue
|
||||||
elif jp2_boxid == 0xff58:
|
elif jp2_boxid == 0xFF58:
|
||||||
# This is the PLT box we're looking for
|
# This is the PLT box we're looking for
|
||||||
return
|
return
|
||||||
elif jp2_boxid == 0xff93:
|
elif jp2_boxid == 0xFF93:
|
||||||
break
|
break
|
||||||
# SOD box encountered and no PLT, so it wasn't found
|
# SOD box encountered and no PLT, so it wasn't found
|
||||||
|
|
||||||
|
|
|
@ -353,7 +353,7 @@ def _save(im, fp, filename):
|
||||||
signed,
|
signed,
|
||||||
fd,
|
fd,
|
||||||
comment,
|
comment,
|
||||||
add_plt
|
add_plt,
|
||||||
)
|
)
|
||||||
|
|
||||||
ImageFile._save(im, fp, [("jpeg2k", (0, 0) + im.size, 0, kind)])
|
ImageFile._save(im, fp, [("jpeg2k", (0, 0) + im.size, 0, kind)])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user