{{newin|[[0.10.0]]|100|type=function|text=It has been renamed from [[Canvas:getImageData]]}}
Generates [[ImageData]] from the contents of the Canvas.

{{newobjectnotice (日本語)}}
== 関数 ==
=== 概要 ===
<source lang="lua">
data = Canvas:newImageData( )
</source>
=== 引数 ===
なし。
=== 返値 ===
{{param (日本語)|ImageData|data|The new ImageData made from the Canvas' contents.}}

== 関数 ==
{{newin (日本語)|[[11.0 (日本語)|11.0]]|110|type=異形}}
=== 概要 ===
<source lang="lua">
data = Canvas:newImageData( slice, mipmap, x, y, width, height )
</source>
=== 引数 ===
{{param (日本語)|number|slice|The cubemap face index, array index, or depth layer for [[TextureType|cubemap, array, or volume]] type Canvases, respectively. This argument is ignored for regular 2D canvases.}}
{{param (日本語)|number|mipmap (1)|The mipmap index to use, for Canvases with [[CanvasMipmapMode|mipmaps]].}}
{{param (日本語)|number|x|The x-axis of the top-left corner (in pixels) of the area within the Canvas to capture.}}
{{param (日本語)|number|y|The y-axis of the top-left corner (in pixels) of the area within the Canvas to capture.}}
{{param (日本語)|number|width|The width in pixels of the area within the Canvas to capture.}}
{{param (日本語)|number|height|The height in pixels of the area within the Canvas to capture.}}
=== 返値 ===
{{param (日本語)|ImageData|data|The new ImageData made from the Canvas' contents.}}

== 関数 ==
{{oldin (日本語)|[[11.0 (日本語)|11.0]]|110|type=異形}}
=== 概要 ===
<source lang="lua">
data = Canvas:newImageData( x, y, width, height )
</source>
=== 引数 ===
{{param (日本語)|number|x|The x-axis of the top-left corner (in pixels) of the area within the Canvas to capture.}}
{{param (日本語)|number|y|The y-axis of the top-left corner (in pixels) of the area within the Canvas to capture.}}
{{param (日本語)|number|width|The width in pixels of the area within the Canvas to capture.}}
{{param (日本語)|number|height|The height in pixels of the area within the Canvas to capture.}}
=== 返値 ===
{{param (日本語)|ImageData|data|The new ImageData made from the Canvas' contents.}}

== 関連 ==
* [[parent::Canvas (日本語)]]
* [[love.graphics.captureScreenshot (日本語)]]
* [[Constructs::ImageData (日本語)]]
[[Category:Functions (日本語)]]
{{#set:Description=Generates [[ImageData]] from the contents of the Canvas.}}
== そのほかの言語 ==
{{i18n (日本語)|Canvas:newImageData}}