Difference between revisions of "love.image.newCompressedData"
(Created page) |
|||
Line 1: | Line 1: | ||
{{newin|[[0.9.0]]|090|type=function}} | {{newin|[[0.9.0]]|090|type=function}} | ||
− | Create a new [[ | + | Create a new [[CompressedImageData]] object from a compressed image file. LÖVE supports several compressed texture formats, enumerated in the [[CompressedImageFormat]] page. |
{{newobjectnotice}} | {{newobjectnotice}} | ||
== Function == | == Function == | ||
=== Synopsis === | === Synopsis === | ||
<source lang="lua"> | <source lang="lua"> | ||
− | + | compressedImageData = love.image.newCompressedData( filename ) | |
</source> | </source> | ||
=== Arguments === | === Arguments === | ||
{{param|string|filename|The filename of the compressed image file.}} | {{param|string|filename|The filename of the compressed image file.}} | ||
=== Returns === | === Returns === | ||
− | {{param| | + | {{param|CompressedImageData|compressedImageData|The new CompressedImageData object.}} |
== Function == | == Function == | ||
=== Synopsis === | === Synopsis === | ||
<source lang="lua"> | <source lang="lua"> | ||
− | + | compressedImageData = love.image.newCompressedData( fileData ) | |
</source> | </source> | ||
=== Arguments === | === Arguments === | ||
{{param|FileData|fileData|A FileData containing a compressed image.}} | {{param|FileData|fileData|A FileData containing a compressed image.}} | ||
=== Returns === | === Returns === | ||
− | {{param| | + | {{param|CompressedImageData|compressedImageData|The new CompressedImageData object.}} |
== See Also == | == See Also == | ||
* [[parent::love.image]] | * [[parent::love.image]] | ||
* [[love.image.isCompressed]] | * [[love.image.isCompressed]] | ||
* [[love.graphics.newImage]] | * [[love.graphics.newImage]] | ||
− | * [[Constructs:: | + | * [[Constructs::CompressedImageData]] |
[[Category:Functions]] | [[Category:Functions]] | ||
− | {{#set:Description=Create a new [[ | + | {{#set:Description=Create a new [[CompressedImageData]] object from a compressed image file.}} |
== Other Languages == | == Other Languages == | ||
{{i18n|love.image.newCompressedData}} | {{i18n|love.image.newCompressedData}} |
Latest revision as of 03:34, 3 October 2015
Available since LÖVE 0.9.0 |
This function is not supported in earlier versions. |
Create a new CompressedImageData object from a compressed image file. LÖVE supports several compressed texture formats, enumerated in the CompressedImageFormat page.
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! |
Contents
Function
Synopsis
compressedImageData = love.image.newCompressedData( filename )
Arguments
string filename
- The filename of the compressed image file.
Returns
CompressedImageData compressedImageData
- The new CompressedImageData object.
Function
Synopsis
compressedImageData = love.image.newCompressedData( fileData )
Arguments
FileData fileData
- A FileData containing a compressed image.
Returns
CompressedImageData compressedImageData
- The new CompressedImageData object.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info