Difference between revisions of "love.graphics.getImageFormats"
(Created page) |
m |
||
Line 32: | Line 32: | ||
* [[love.image.newCompressedData]] | * [[love.image.newCompressedData]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | {{#set:Sub-Category= | + | {{#set:Sub-Category=SystemInfo}} |
{{#set:Description=Gets the [[PixelFormat|pixel formats]] usable for [[Image]]s, and whether each is supported.}} | {{#set:Description=Gets the [[PixelFormat|pixel formats]] usable for [[Image]]s, and whether each is supported.}} | ||
== Other Languages == | == Other Languages == | ||
{{i18n|love.graphics.getImageFormats}} | {{i18n|love.graphics.getImageFormats}} |
Revision as of 01:57, 17 July 2017
Available since LÖVE 0.11.0 |
This function is not supported in earlier versions. |
Gets the raw and compressed pixel formats usable for Images, and whether each is supported.
Contents
Function
Synopsis
formats = love.graphics.getCompressedImageFormats( )
Arguments
None.
Returns
table formats
- A table containing PixelFormats as keys, and a boolean indicating whether the format is supported as values. Not all systems support all formats.
Examples
Display a list of the raw and compressed pixel formats usable with Images on the screen
formats = love.graphics.getImageFormats()
function love.draw()
local y = 0
for formatname, formatsupported in pairs(formats) do
local str = string.format("Supports format '%s': %s", formatname, tostring(formatsupported))
love.graphics.print(str, 10, y)
y = y + 20
end
end
See Also
- love.graphics
- PixelFormat
- love.graphics.newImage
- love.image.newImageData
- love.image.newCompressedData
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