Loading an image

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
williammah
Prole
Posts: 3
Joined: Wed Sep 07, 2011 10:55 am

Loading an image

Post by williammah »

Hey guys!

I'm super green here, so can you guys teach me how to load an image from my hard disk?

thanks!
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Loading an image

Post by Robin »

love.graphics.newImage ^-^

Ask away if you need more help.
Help us help you: attach a .love.
williammah
Prole
Posts: 3
Joined: Wed Sep 07, 2011 10:55 am

Re: Loading an image

Post by williammah »

Robin wrote:love.graphics.newImage ^-^

Ask away if you need more help.

so basically i put in that command followed by the directory?

btw, thank you!
User avatar
GijsB
Party member
Posts: 380
Joined: Wed Jul 20, 2011 10:19 pm
Location: Netherlands

Re: Loading an image

Post by GijsB »

williammah wrote:
Robin wrote:love.graphics.newImage ^-^

Ask away if you need more help.

so basically i put in that command followed by the directory?

btw, thank you!
yup! ^_^
User avatar
miko
Party member
Posts: 410
Joined: Fri Nov 26, 2010 2:25 pm
Location: PL

Re: Loading an image

Post by miko »

williammah wrote:Hey guys!

I'm super green here, so can you guys teach me how to load an image from my hard disk?

thanks!
Meet the Hamster Ball: http://love2d.org/wiki/Tutorial:Hamster_Ball
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Loading an image

Post by BlackBulletIV »

williammah wrote:so basically i put in that command followed by the directory?
By the file's path (not just its directory), yes. This path is relative to your game's folder and save folder. You might want read up a bit on love.filesystem.
williammah
Prole
Posts: 3
Joined: Wed Sep 07, 2011 10:55 am

Re: Loading an image

Post by williammah »

BlackBulletIV wrote:
williammah wrote:so basically i put in that command followed by the directory?
By the file's path (not just its directory), yes. This path is relative to your game's folder and save folder. You might want read up a bit on love.filesystem.

ok then

thanks guys for all the replies! :)
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 238 guests