Add test_image_writer, accept PIL images, improve ImageWriter perf in main process

This commit is contained in:
Simon Alibert
2024-11-02 20:00:07 +01:00
parent 375abd3020
commit 6b2ec1ed77
4 changed files with 426 additions and 16 deletions

View File

@@ -59,7 +59,7 @@ def img_array_factory():
def img_factory(img_array_factory):
def _create_img(width=100, height=100) -> PIL.Image.Image:
img_array = img_array_factory(width=width, height=height)
return PIL.Image.Image.fromarray(img_array)
return PIL.Image.fromarray(img_array)
return _create_img