Copies a rectangular area of an image.
image.copy( x=number, y=number, width=number, height=number, dx=number, dy=number )
Returns: any
Argument |
Description |
x
number,
required
|
The x coordinate of the source rectangle.
|
y
number,
required
|
The y coordinate of the source rectangle.
|
width
number,
required
|
The width of the source rectangle.
|
height
number,
required
|
The height of the source rectangle.
|
dx
number,
optional
|
The x coordinate of the destination rectangle.
|
dy
number,
optional
|
The y coordinate of the destination rectangle.
|
Examples
newImg = imageNew("",200,200,"rgb","red");
copiedImg = newImg.copy(50,50,50,50);
cfimage(action="writeToBrowser", source=copiedImg);
See also