Skip to content
Discussion options

You must be logged in to vote

Just use a BytesIO or similar with Image.save to keep the image in-memory and then pass the bytes to Rust as a #[pyfunction] input to load however you like on the Rust side. This isn't any different to how you might share an in-memory image with other Python libraries.

https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.Image.save

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by baseplate-admin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants