Lutro - Documentation

love.image

Provides an interface to decode encoded image data.

ImageData (type)

Raw (decoded) image data.

love.image.newImageData

To create an empty ImageData:

imageData = love.image.newImageData(width, height)

To an ImageData from an image file:

imageData = love.image.newImageData(filename)

ImageData:getWidth

Returns the width of the ImageData.

ImageData:getHeight

Returns the height of the ImageData.

ImageData:getPixel

Returns the color of a pixel in the ImageData.

r, g, b, a = imageData:getPixel(x, y)

ImageData:setPixel

Sets the color of a pixel in the ImageData.

imageData:setPixel(x, y, r, g, b, a)

ImageData:getDimensions

Returns the width and height of the ImageData.

width, height = imageData:getDimensions()