image.paste()

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).

image.paste( image2=any, x=number, y=number )

Returns: Image

Argument Description
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");
	firstImage.paste(secondImage,75,39);
	thirdimage = imageNew("",50,50,"rgb","blue");
	firstImage.paste(thirdimage,20,39);
	cfimage(action="writeToBrowser", source=firstImage);

See also