Page 1 of 2

WEIRD PNG image problem

Posted: Tue Jun 30, 2009 2:23 pm
by CryoNox
Hey all, I've encountered a weird problem when I create my own .png images. When I drag my project folder into the LÖVE icon, the image loads perfectly fine. However, when I compress everything into a zip folder and change the extension to .love, the image fails to load when I run the program. This is really weird because the LÖVE logo which I downloaded has no problem in loading, but the error only occurs when I try to load my own PNG images.

Help?

I used both Adobe Photoshop CS3 as well as MSPaint to create the PNG images, and this weird problem occurs.
I'm using Windows Vista by the way.

Re: WEIRD PNG image problem

Posted: Tue Jun 30, 2009 2:35 pm
by bartbes
That is weird.. Anyway, you might open the zip and see if something is different, or if the image got corrupted, still.. weird.

Re: WEIRD PNG image problem

Posted: Tue Jun 30, 2009 2:48 pm
by rude
Post the .love which fails.

Re: WEIRD PNG image problem

Posted: Tue Jun 30, 2009 6:16 pm
by CryoNox
alright I've attached it ^^
By right, you're supposed to see the love logo fading in before fading out. It doesn't appear though, cos the image won't load.

Re: WEIRD PNG image problem

Posted: Tue Jun 30, 2009 6:24 pm
by bartbes
It worked once I changed loveBG.png into LoveBG.png (in your code).

Re: WEIRD PNG image problem

Posted: Wed Jul 01, 2009 3:39 am
by CryoNox
oh thanks bartbes, I didn't notice the case :D

Still, its kinda weird that the problem only occurs after it is compressed into a .love file.

Re: WEIRD PNG image problem

Posted: Wed Jul 01, 2009 6:08 am
by Robin
I guess that in compressed archives Case Matters(tm). Or at least with the love.filesystem back-end (PhysicsFS).

Re: WEIRD PNG image problem

Posted: Wed Jul 01, 2009 6:30 am
by bartbes
Of course PhysFS is a layer on top of the filesystem, so while NTFS and FAT are case-insensitive, zip appears to be case-sensitive (just like a lot of other systems, so watch your case)

Re: WEIRD PNG image problem

Posted: Wed Jul 01, 2009 6:44 am
by Robin
Even on Windows, using the correct case is good practice. The system isn't case-sensitive, but sloppiness about case can only shoot you in the foot later. Especially if you or other people want to use it on other systems. ;) About every tenth project or so on PyGame didn't run until every filename was re-cased.

Re: WEIRD PNG image problem

Posted: Wed Jul 01, 2009 7:41 am
by bartbes
Robin wrote:About every tenth project or so on PyGame didn't run until every filename was re-cased.
How do you dare talk about PyGame? :P

Anyway, he's right, it's not just good for cross-platformness (?), but also as a good coding practice, it's like variables, a variable called "a" is not to be referenced to using "A", even if the language supports it, it's just bad.