Type
Image
Images are created and drawn on screen using functions in love.graphics. Images do currently not exist in memory after they are created as GPU textures, thus methods for reading single pixel colors and similar are not available.

Supported image formats:
  • PNG
  • BMP
  • GIF
  • JPEG
  • LBM
  • PCX
  • PNM
  • TGA
  • XCF
  • XPM
  • XV
  • (And probably not TIFF)
Functions
getWidth( ) Gets the width of an image.
getHeight( ) Gets the height of an image.
setCenter( x, y ) Sets the center of the image.
Examples
Example 1: Loading an Image and displaying it
function load()
    image = love.graphics.newImage("images/love-ball.png")
end

function draw()
    love.graphics.draw(image, 400, 300)
end
Copyright © 2006-2008 LÖVE Development Team.