Skip to main content

Save image as a PNG file (:save_to_png_file)

Declaration

img:save_to_png_file(path)

Parameters

  • path
    String. Absolute path to save the PNG file

Description

Save the image object to a PNG file. The file extension does not have to be .png

Example

-- Capture full screen and save to file
screen.image():save_to_png_file("/var/mobile/1.png")

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