Page 1 of 1

Loading an image

Posted: Wed Sep 07, 2011 10:57 am
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!

Re: Loading an image

Posted: Wed Sep 07, 2011 11:13 am
by Robin
love.graphics.newImage ^-^

Ask away if you need more help.

Re: Loading an image

Posted: Wed Sep 07, 2011 11:18 am
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!

Re: Loading an image

Posted: Wed Sep 07, 2011 11:20 am
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! ^_^

Re: Loading an image

Posted: Wed Sep 07, 2011 2:22 pm
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

Re: Loading an image

Posted: Wed Sep 07, 2011 8:49 pm
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.

Re: Loading an image

Posted: Thu Sep 08, 2011 1:44 pm
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! :)