set_output_stream method

set_output_stream

Redirects the image data to a custom writable stream instead of the default file output. The library will write the image bytes to this stream during conversion.

def set_output_stream(self, stream):
    ...
Parameter Type Description
stream io.RawIOBase A writable stream where the image data will be written.
Raises Description
ValueError When stream is None.

See Also