Difference between revisions of "ImageData:encode"

(0.8.0)
(Moved old variant down.)
Line 1: Line 1:
 
Encodes the ImageData.
 
Encodes the ImageData.
 +
 
== Function ==
 
== Function ==
{{oldin|[[0.8.0]]|type=variant}}
+
{{newin|[[0.8.0]]|080|type=variant}}
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
data = ImageData:encode( format )
+
ImageData:encode( outFile )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
{{param|ImageFormat|format|The format to encode the image in.}}
+
{{param|string|outFile|Name of a file to write encoded data to. The format will be automatically deduced from the file extension.}}
 
=== Returns ===
 
=== Returns ===
{{param|Data|data|The encoded image data.}}
+
Nothing.
 +
 
 
== Function ==
 
== Function ==
{{newin|[[0.8.0]]|type=variant}}
+
{{newin|[[0.8.0]]|080|type=variant}}
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
ImageData:encode( outFile )
+
ImageData:encode( outFile, format )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
{{param|string|outFile|Name of a file to write encoded data to. The format will be automatically deduced from the file extension.}}
+
{{param|string|outFile|Name of a file to write encoded data to.}}
 +
{{param|ImageFormat|format|The format to encode the image in.}}
 
=== Returns ===
 
=== Returns ===
 
Nothing.
 
Nothing.
 +
 
== Function ==
 
== Function ==
{{newin|[[0.8.0]]|type=variant}}
+
{{oldin|[[0.8.0]]|080|type=variant}}
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
ImageData:encode( outFile, format )
+
data = ImageData:encode( format )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
{{param|string|outFile|Name of a file to write encoded data to.}}
 
 
{{param|ImageFormat|format|The format to encode the image in.}}
 
{{param|ImageFormat|format|The format to encode the image in.}}
 
=== Returns ===
 
=== Returns ===
Nothing.
+
{{param|Data|data|The encoded image data.}}
 +
 
 
== See Also ==
 
== See Also ==
 
* [[parent::ImageData]]
 
* [[parent::ImageData]]

Revision as of 13:07, 4 May 2012

Encodes the ImageData.

Function

Available since LÖVE 0.8.0
This variant is not supported in earlier versions.

Synopsis

ImageData:encode( outFile )

Arguments

string outFile
Name of a file to write encoded data to. The format will be automatically deduced from the file extension.

Returns

Nothing.

Function

Available since LÖVE 0.8.0
This variant is not supported in earlier versions.

Synopsis

ImageData:encode( outFile, format )

Arguments

string outFile
Name of a file to write encoded data to.
ImageFormat format
The format to encode the image in.

Returns

Nothing.

Function

Removed in LÖVE 0.8.0
This variant is not supported in that and later versions.

Synopsis

data = ImageData:encode( format )

Arguments

ImageFormat format
The format to encode the image in.

Returns

Data data
The encoded image data.

See Also


Other Languages