Creates an image.
Requires Extension: Image extension
ImageNew( source=any, width=string, height=string, imageType=string, canvasColor=string );
Argument |
Description |
source
any,
optional
|
The source image path, URL, a variable that is read into the new image, or a Java buffered image.
|
width
string,
optional
|
The width of the new image. Valid when the height is specified and the source is not.
|
height
string,
optional
|
The height of the new image. Valid when the width is specified and the source is not.
|
imageType
string,
optional
|
The type of the image to create (Valid only when width and height are specified):
Alias:
type
|
canvasColor
string,
optional
|
Color of the image canvas (The default value is "black"):
- Hexadecimal value of RGB color. For example, specify the color white as ##FFFFFF or FFFFFF.
- String value of color (for example, "black", "red", "green").
- List of three numbers for (R,G,B) values. Each value must be in the range 0-255.
|
Examples
img = imageNew("",100,100,"rgb","yellow");
dump(img);
dump(ImageInfo(img));
See also