Image:paste
EditCopies a rectangle of pixels from one Image to this one.
Image:paste(source, x, y, fromX, fromY, width, height)
Arguments
Name | Type | Default | Description |
source | Image | The Image to copy pixels from. | |
x | number | 0 | The x coordinate to paste to (0-indexed). |
y | number | 0 | The y coordinate to paste to (0-indexed). |
fromX | number | 0 | The x coordinate in the source to paste from (0-indexed). |
fromY | number | 0 | The y coordinate in the source to paste from (0-indexed). |
width | number | source:getWidth() | The width of the region to copy. |
height | number | source: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
Image:getPixel
Image:setPixel
Pass:copy
Image