Skip to main content

Create an image from a file (image.load_file)

Declaration​

img = image.load_file(path)

Parameters​

  • path
    String. Absolute path to an image file

Returns​

  • img
    Image object or nil. Returns newly created image object, or nil if file does not exist

Description​

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

Example​

Save the file image to Photos