Hi,
The following pull request adds buffer protocol support to writePixels.
https://docs.python.org/3/c-api/buffer.html
This allows objects that expose the buffer protocol to be passed directly to writePixels without needing to copy the image data to a str or bytes object.
For example, numpy arrays can be passed directly to writePixels:
Hi, The following pull request adds buffer protocol support to writePixels. https://docs.python.org/3/c-api/buffer.html This allows objects that expose the buffer protocol to be passed directly to writePixels without needing to copy the image data to a str or bytes object.
For example, numpy arrays can be passed directly to writePixels: