daft.functions.encode_image#
encode_image #
encode_image(image: Expression, image_format: str | ImageFormat) -> Expression
Encode an image column as the provided image file format, returning a binary column of encoded bytes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
image | Image Expression | The image to encode. | required |
image_format | str | ImageFormat | The image file format into which the images will be encoded. | required |
Returns:
| Name | Type | Description |
|---|---|---|
Expression | Binary Expression | An expression representing a binary column of encoded image bytes. |
Source code in daft/functions/image.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |