ImageSetBackgroundColor()
Sets the background color for the image.
The background color is used for clearing a region.
Setting the background color only affects the subsequent ImageClearRect() calls
Requires Extension: Image Extension for Jakarta EE (Lucee 7+)
ImageSetBackgroundColor( image=any, color=string );
Returns: void
| Argument | Description |
|---|---|
|
image
any,
required
|
edit
The image on which this operation is performed. Alias: name |
|
color
string,
required
|
edit
Background color (The default value is "black"):
Alias: colour |
Examples
editimg=imageNew("",200,200,"RGB","26de81");
imageSetBackGroundColor(img,"fed330");
imageClearRect(img,20,20,100,100);
cfimage(action="writeToBrowser",source=img);
See also
- Image manipulation
- ImageClearRect()
- image.setBackgroundColor()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)