We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8064e04 commit 5af987bCopy full SHA for 5af987b
Tests/test_file_png.py
@@ -625,6 +625,15 @@ def test_textual_chunks_after_idat(self):
625
with Image.open("Tests/images/hopper_idat_after_image_end.png") as im:
626
assert im.text == {"TXT": "VALUE", "ZIP": "VALUE"}
627
628
+ def test_specify_bits(self, tmp_path):
629
+ im = hopper("P")
630
+
631
+ out = str(tmp_path / "temp.png")
632
+ im.save(out, bits=7)
633
634
+ with Image.open(out) as reloaded:
635
+ assert len(reloaded.png.im_palette[1]) == 384
636
637
def test_exif(self):
638
# With an EXIF chunk
639
with Image.open("Tests/images/exif.png") as im:
0 commit comments