ImageData

Raw (decoded) image data.

You can't draw ImageData directly to screen. See Image for that.

Constructors

Canvas:newImageData Generates ImageData from the contents of the Canvas. 0.10.0
love.graphics.newScreenshot Creates a screenshot and returns the ImageData.
love.image.newImageData Creates a new ImageData object.

Functions

Data:getPointer Gets a pointer to the Data.
Data:getSize Gets the Data's size in bytes.
Data:getString Gets the full Data as a string. 0.9.0
ImageData:encode Encodes ImageData.
ImageData:getDimensions Gets the width and height of the ImageData in pixels. 0.9.0
ImageData:getHeight Gets the height of the ImageData in pixels.
ImageData:getPixel Gets the color of a pixel.
ImageData:getString Gets the full ImageData as a string. 0.9.0
ImageData:getWidth Gets the width of the ImageData in pixels.
ImageData:mapPixel Transform an image by applying a function to every pixel.
ImageData:paste Paste into ImageData from another source ImageData.
ImageData:setPixel Sets the color of a pixel.
Object:type Gets the type of the object as a string.
Object:typeOf Checks whether an object is of a certain type.

Enums

ImageFormat Encoded image formats.

Supertypes

See Also


ImageData:getString

ImageData:getString Removed in LÖVE 0.9.0 It has been moved to

2017-03-21 15:44:51
ImageData:setPixel

ImageData:setPixel Sets the color of a pixel at a specific position in the image. Valid x and y values start at 0 and go up to image width and height minus 1. Function

2017-03-21 15:44:55
ImageData:getPixel

ImageData:getPixel Gets the color of a pixel at a specific position in the image. Valid x and y values start at 0 and go up to image width and height minus 1. Non-integer values are

2017-03-21 15:44:50
ImageData:getHeight

ImageData:getHeight Gets the height of the ImageData in pixels. Function

2017-03-21 15:44:50
ImageData:encode

ImageData:encode Encodes the ImageData and optionally writes it to the save directory. Function Available since LÖVE 0.10.0

2017-03-21 15:44:48
ImageData:paste

ImageData:paste Paste into ImageData from another source ImageData. Function Synopsis

2017-03-21 15:44:54
ImageData:mapPixel

ImageData:mapPixel Transform an image by applying a function to every pixel. This function is a higher order function. It takes another function as a parameter, and calls it once for

2017-03-21 15:44:53
ImageData:getWidth

ImageData:getWidth Gets the width of the ImageData in pixels. Function

2017-03-21 15:44:52
ImageData:getDimensions

ImageData:getDimensions Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets the width and height of the

2017-03-21 15:44:49