Images appear as black squares - need help

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
mman2112
Prole
Posts: 5
Joined: Fri Jun 08, 2012 7:33 pm

Images appear as black squares - need help

Post by mman2112 »

I'm just starting with Love2d and I'm trying to debug my 'hello world' program. the program is supposed to display the string "Hello world" and display an image, however the image only appears as a black box. I'm going to include a link to where you can download the .love, if anyone can help it would be greatly appreciated.

.love file download (1Kb)
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Images appear as black squares - need help

Post by kikito »

In LÖVE images are "tinted" by the current color. If the current color is red, the whites in an image look "redish". If the current color is black, images are completely black.

Try setting the color to white before drawing the images.

Code: Select all

love.graphics.setColor(255, 255, 255)
-- and now draw your images
When I write def I mean function.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests