init.lua 656 B

12345678910111213141516
  1. return {
  2. summary = 'An object that stores pixel data for Textures.',
  3. description = [[
  4. An Image stores raw 2D pixel info for `Texture`s. It has a width, height, and format. The
  5. Image can be initialized with the contents of an image file or it can be created with
  6. uninitialized contents. The supported image formats are `png`, `jpg`, `hdr`, `dds`, `ktx`, and
  7. `astc`.
  8. Usually you can just use Textures, but Image can be useful if you want to manipulate
  9. individual pixels, load Textures in a background thread, or use the FFI to efficiently access
  10. the raw image data.
  11. ]],
  12. constructors = {
  13. 'lovr.data.newImage'
  14. }
  15. }