ImagePaste()

Takes two images and an (x,y) coordinate and draws the second image over the first image with the upper-left corner at coordinate (x,y).

Requires Extension: Image extension

ImagePaste( image1=any, image2=any, x=number, y=number );

Returns: void

Argument Description
image1
any, required

The bottom image.

image2
any, required

The image that is pasted on top of image1.

x
number, optional

The x coordinate where the upper-left corner of image2 is pasted.

y
number, optional

The y coordinate where the upper-left corner of image2 is pasted.

Examples

firstImage = imageNew("",200,200,"rgb","red");
secondImage = imageNew("",200,200,"rgb","yellow");
imagepaste(firstImage,secondImage,75,75);
//Member function
//firstImage.paste(secondImage,10,10);
cfimage(action="writeToBrowser", source=firstImage);

See also