get_pil_image
function. It then saves this image in memory in PNG format and
retrieves its binary content. Depending on the use_b64
flag, this binary content is
either returned directly or as a base64-encoded string.use_b64
is False, or a base64-encoded string
if use_b64
is True.
Parameters:
Name | Description |
---|---|
image_file | Type: str | ForwardRef(‘Image.Image’) |
use_b64=True |
Type | Description |
---|---|
bytes | bytes: The image data in raw bytes if use_b64 is False, or a base64-encoded string if use_b64 is True. |