ImageNew()
Creates an image.
Requires Extension: Image Extension for Jakarta EE (Lucee 7+)
ImageNew( source=any, width=string, height=string, imageType=string, canvasColor=string );
Returns: any
| Argument | Description |
|---|---|
|
source
any,
optional
|
edit
The source image path, URL, a variable that is read into the new image, or a Java buffered image. |
|
width
string,
optional
|
edit
The width of the new image. Valid when the height is specified and the source is not. |
|
height
string,
optional
|
edit
The height of the new image. Valid when the width is specified and the source is not. |
|
imageType
string,
optional
|
edit
The type of the image to create (Valid only when width and height are specified):
Alias: type |
|
canvasColor
string,
optional
|
edit
Color of the image canvas (The default value is "black"):
|
Examples
edit img = imageNew("",100,100,"rgb","yellow");
dump(img);
dump(ImageInfo(img));
See also
- Image manipulation
- Image
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)