Skip to main content

Create a copy of an image object (:copy)

Declaration

img_copy = img:copy()

Returns

  • img_copy
    Image object. A copy of the original image

Description

Create a copy from an image object
This call creates a new image object. For efficient frequent usage, please pair with image:destroy

Example

scrn = screen.image()
img2 = scrn:copy()

Note: This example uses a function outside this chapter screen.image