daft.Expression.image.decode#
- Expression.image.decode(on_error: Literal['raise', 'null'] = 'raise', mode: Optional[Union[str, ImageMode]] = None) Expression [source]#
Decodes the binary data in this column into images.
This can only be applied to binary columns that contain encoded images (e.g. PNG, JPEG, etc.)
- Parameters:
on_error – Whether to raise when encountering an error, or log a warning and return a null
mode – What mode to convert the images into before storing it in the column. This may prevent errors relating to unsupported types.
- Returns:
An Image expression represnting an image column.
- Return type:
Expression