Difference between revisions of "love.image.newImageData"

m
(redundancy and incorrect summary)
Line 1: Line 1:
Create a new blank ImageData.
+
Create a new ImageData object.
 
== Function ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===
Line 17: Line 17:
 
=== Arguments ===
 
=== Arguments ===
 
{{param|string|filename|The filename of the image file.}}
 
{{param|string|filename|The filename of the image file.}}
=== Returns ===
 
{{param|ImageData|imageData|The new ImageData object.}}
 
== Function ==
 
=== Synopsis ===
 
<source lang="lua">
 
imageData = love.image.newImageData( file )
 
</source>
 
=== Arguments ===
 
{{param|File|file|A File to load the image data from.}}
 
 
=== Returns ===
 
=== Returns ===
 
{{param|ImageData|imageData|The new ImageData object.}}
 
{{param|ImageData|imageData|The new ImageData object.}}

Revision as of 06:22, 25 December 2010

Create a new ImageData object.

Function

Synopsis

imageData = love.image.newImageData( x, y )

Arguments

number x
The width of the ImageData.
number y
The height of the ImageData.

Returns

ImageData imageData
The new ImageData object.

Function

Synopsis

imageData = love.image.newImageData( filename )

Arguments

string filename
The filename of the image file.

Returns

ImageData imageData
The new ImageData object.

Function

Synopsis

imageData = love.image.newImageData( data )

Arguments

Data data
The encoded data to decode into image data.

Returns

ImageData imageData
The new ImageData object.

See Also

Other Languages