Image:paste

Copies a rectangle of pixels from one Image to this one.

Image:paste(source, x, y, fromX, fromY, width, height)

Arguments

NameTypeDefaultDescription
sourceImage The Image to copy pixels from.
xnumber0 The x coordinate to paste to (0-indexed).
ynumber0 The y coordinate to paste to (0-indexed).
fromXnumber0 The x coordinate in the source to paste from (0-indexed).
fromYnumber0 The y coordinate in the source to paste from (0-indexed).
widthnumbersource:getWidth() The width of the region to copy.
heightnumbersource:getHeight() The height of the region to copy.

Returns

Nothing

Notes

The two Images must have the same pixel format.

Compressed images cannot be copied.

The rectangle cannot go outside the dimensions of the source or destination textures.

See also