Lucee Function Reference

imagecopy()

Creates a new image by copying a rectangular area from the source image. If destination coordinates are provided, the copied area is also drawn at the new location in the resulting image.

Example

imagecopy(any image,number x,number y,number width,number height,[number dx,[number dy]]):any

Category

image

Arguments

The arguments for this function are set. You can not use other arguments except the following ones.
Name Type Required Default Value Description
image any  Yes   The source image object, binary object, base64 string, or file path from which to copy.  
x number  Yes   The x coordinate of the top-left corner of the area to copy from the source image.  
y number  Yes   The y coordinate of the top-left corner of the area to copy from the source image.  
width number  Yes   The width of the rectangular area to copy. Must be positive and not exceed image boundaries.  
height number  Yes   The height of the rectangular area to copy. Must be positive and not exceed image boundaries.  
dx number  No -999 The x coordinate where the copied area should be drawn in the new image. If omitted, only crops the area.  
dy number  No -999 The y coordinate where the copied area should be drawn in the new image. If omitted, only crops the area.