ImageCopy()
Copies a rectangular area of an image.
Requires Extension: Image Extension for Jakarta EE (Lucee 7+)
ImageCopy( image=any, x=number, y=number, width=number, height=number, dx=number, dy=number );
Returns: any
| Argument | Description | Default |
|---|---|---|
|
image
any,
required
|
edit
The image on which this operation is performed. Alias: name |
|
|
x
number,
required
|
edit
The x coordinate of the source rectangle. |
|
|
y
number,
required
|
edit
The y coordinate of the source rectangle. |
|
|
width
number,
required
|
edit
The width of the source rectangle. |
|
|
height
number,
required
|
edit
The height of the source rectangle. |
|
|
dx
number,
optional
|
edit
The x coordinate of the destination rectangle. |
-999 |
|
dy
number,
optional
|
edit
The y coordinate of the destination rectangle. |
-999 |
Examples
edit newImg = imageNew("",200,200,"rgb","red");
copiedImg = newImg.copy(50,50,50,50);
cfimage(action="writeToBrowser", source=copiedImg);
See also
- Image manipulation
- image.copy()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)