How to save an image

I want to create an image from an array of pixels, like this:

png.from_array([[(0,0,0)]], 'RGB').save('img.png')

but I get this error:

raise ProtocolError("width and height must be greater than zero") png.ProtocolError: ProtocolError: width and height must be greater than zero

Can anybody help me understand why?



Read more here: https://stackoverflow.com/questions/67386703/how-to-save-an-image

Content Attribution

This content was originally published by colgate10 at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: