love.graphics.newImage
Creates a new Image from a filepath, FileData, an ImageData, or a CompressedImageData, and optionally generates or specifies mipmaps for the image.
image = love.graphics.newImage( filename, settings )
filename string The filepath to the image file.
settings table A table containing the following fields:
settings.dpiscale (1) number The DPI scale to use when drawing the image and calling getWidth/getHeight.
settings.linear (false) boolean True to treat the image's pixels as linear instead of sRGB, when gamma correct rendering is enabled. Most images are authored as sRGB.
settings.mipmaps (false) boolean If true, mipmaps for the image will be automatically generated (or taken from the images's file if possible, if the image originated from a CompressedImageData).
image Image A new Image object which can be drawn on screen.
image = love.graphics.newImage( fileData, settings )
fileData FileData The FileData containing image file.
settings table A table containing the following fields:
settings.dpiscale (1) number The DPI scale to use when drawing the image and calling getWidth/getHeight.
settings.linear (false) boolean True to treat the image's pixels as linear instead of sRGB, when gamma correct rendering is enabled. Most images are authored as sRGB.
settings.mipmaps (false) boolean If true, mipmaps for the image will be automatically generated (or taken from the images's file if possible, if the image originated from a CompressedImageData).
image Image A new Image object which can be drawn on screen.
image = love.graphics.newImage( imageData, settings )
imageData ImageData The ImageData containing image.
settings table A table containing the following fields:
settings.dpiscale (1) number The DPI scale to use when drawing the image and calling getWidth/getHeight.
settings.linear (false) boolean True to treat the image's pixels as linear instead of sRGB, when gamma correct rendering is enabled. Most images are authored as sRGB.
settings.mipmaps (false) boolean If true, mipmaps for the image will be automatically generated (or taken from the images's file if possible, if the image originated from a CompressedImageData).
image Image A new Image object which can be drawn on screen.
image = love.graphics.newImage( compressedImageData, settings )
compressedImageData CompressedImageData A CompressedImageData object. The Image will use this CompressedImageData to reload itself when love.window.setMode is called.
settings table A table containing the following fields:
settings.dpiscale (1) number The DPI scale to use when drawing the image and calling getWidth/getHeight.
settings.linear (false) boolean True to treat the image's pixels as linear instead of sRGB, when gamma correct rendering is enabled. Most images are authored as sRGB.
settings.mipmaps (false) boolean If true, mipmaps for the image will be automatically generated (or taken from the images's file if possible, if the image originated from a CompressedImageData).
image Image A new Image object which can be drawn on screen.