mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Only specify image size once
This commit is contained in:
parent
a0ab9f488f
commit
9c41bf4641
|
@ -1064,8 +1064,9 @@ class TestImageBytes:
|
|||
|
||||
@pytest.mark.parametrize(("mode", "pixelsize"), image_modes)
|
||||
def test_getdata_putdata(self, mode: str, pixelsize: int) -> None:
|
||||
start_bytes = bytes(range(2 * 2 * pixelsize))
|
||||
im = Image.frombytes(mode, (2, 2), start_bytes)
|
||||
im = Image.new(mode, (2, 2))
|
||||
source_bytes = bytes(range(im.width * im.height * pixelsize))
|
||||
im.frombytes(source_bytes)
|
||||
|
||||
reloaded = Image.new(mode, im.size)
|
||||
reloaded.putdata(im.getdata())
|
||||
|
|
Loading…
Reference in New Issue
Block a user