Creates a new [[ImageData]] object.
{{newobjectnotice}}
== Function ==
=== Synopsis ===
<source lang="lua">
imageData = love.image.newImageData( width, height )
</source>
=== Arguments ===
{{param|number|width|The width of the ImageData.}}
{{param|number|height|The height of the ImageData.}}
=== Returns ===
{{param|ImageData|imageData|The new blank ImageData object. Each pixel's color values, (including the alpha values!) will be set to zero.}}

== Function ==
{{newin|[[11.0]]|110|type=variant}}
=== Synopsis ===
<source lang="lua">
imageData = love.image.newImageData( width, height, format, data )
</source>
=== Arguments ===
{{param|number|width|The width of the ImageData.}}
{{param|number|height|The height of the ImageData.}}
{{param|PixelFormat|format ("rgba8")|The pixel format of the ImageData.}}
{{param|string|data (nil)|Optional raw byte data to load into the ImageData, in the format specified by ''format''.}}
=== Returns ===
{{param|ImageData|imageData|The new ImageData object.}}

== Function ==
{{newinoldin|[[0.10.0]]|100|[[11.0]]|110|type=variant}}
=== Synopsis ===
<source lang="lua">
imageData = love.image.newImageData( width, height, data )
</source>
=== Arguments ===
{{param|number|width|The width of the ImageData.}}
{{param|number|height|The height of the ImageData.}}
{{param|string|data|The data to load into the ImageData (RGBA bytes, left to right and top to bottom).}}
=== Returns ===
{{param|ImageData|imageData|The new ImageData object.}}

== Function ==
=== Synopsis ===
<source lang="lua">
imageData = love.image.newImageData( filename )
</source>
=== Arguments ===
{{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( filedata )
</source>
=== Arguments ===
{{param|FileData|filedata|The encoded file data to decode into image data.}}
=== Returns ===
{{param|ImageData|imageData|The new ImageData object.}}

== Function ==
{{newin|[[11.0]]|110|type=variant}}
=== Synopsis ===
<source lang="lua">
imageData = love.image.newImageData( data )
</source>
=== Arguments ===
{{param|ByteData|data|The encoded byte data to load into the ImageData.}}

=== Returns ===
{{param|ImageData|imageData|The new ImageData object.}}
== See Also ==
* [[parent::love.image]]
* [[Constructs::ImageData]]
[[Category:Functions]]
{{#set:Description=Creates a new ImageData object.}}
{{#set:Since=000}}
== Other Languages ==
{{i18n|love.image.newImageData}}