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
  1. -- Example: Loading an Image and displaying it 
  2.  
  3. function load() 
  4.     image = love.graphics.newImage("images/love-ball.png"
  5. end 
  6.  
  7. function draw() 
  8.     love.graphics.draw(image, 400300
  9. end 
Copyright © 2006-2008 LÖVE Development Team.