Creates a new ImageData object.
This function can be slow if it is called repeatedly, such as from love.update or love.draw. If you need to use a specific resource often, create it once and store it somewhere it can be reused!
imageData = love.image.newImageData( width, height )
ImageData imageData Available since LÖVE 11.0
This variant is not supported in earlier versions.
imageData = love.image.newImageData( width, height, format, rawdata )
number widthnumber heightPixelFormat format ("rgba8")string or Data rawdata (nil)ImageData imageData Available since LÖVE 0.10.0 and removed in LÖVE 11.0
This variant is not supported in earlier or later versions.
imageData = love.image.newImageData( width, height, rawdata )
number widthnumber heightstring rawdataImageData imageDataimageData = love.image.newImageData( filename )
string filenameImageData imageDataimageData = love.image.newImageData( filedata )
FileData filedataImageData imageData Available since LÖVE 11.0
This variant is not supported in earlier versions.
imageData = love.image.newImageData( encodeddata )
Data encodeddataImageData imageData
© 2006–2020 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.image.newImageData