Background Fill
AI-generatedSummary
Replace transparency in an image with a solid background color.
Inputs
- binaryPropertyName (required) — Name of the binary property that contains the image with transparency.
- hex (required) — Background color. Accepts #RRGGBB or RRGGBB.
- outputBinaryPropertyName — Binary property to write the result to.
- format — Image format for the output. Options include PNG, JPEG, and WEBP.
- forceInputSize — Whether to use the input image dimensions.
Output shape
a list of items containing the modified binary image
The output binary property will be named according to the 'outputBinaryPropertyName'. If not specified, it defaults to 'output'. Each item will retain a binary data format based on the selected output format.
Examples
Example 1: Fill a transparent PNG with a red background and output as JPEG.
Set 'binaryPropertyName' to 'image', 'hex' to '#FF0000', 'format' to 'jpeg', and 'outputBinaryPropertyName' to 'filledImage'.