daft.functions.image_attribute#
image_attribute #
image_attribute(image: Expression, name: Literal['width', 'height', 'channel', 'mode'] | ImageProperty) -> Expression
Get a property of the image, such as 'width', 'height', 'channel', or 'mode'.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
image | Image Expression | to retrieve the property from. | required |
name | Literal['width', 'height', 'channel', 'mode'] | ImageProperty | The name of the property to retrieve. | required |
Returns:
| Name | Type | Description |
|---|---|---|
Expression | Expression | An Expression representing the requested property. |
Source code in daft/functions/image.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | |