My Corona app correctly shows my PNG images when it's running in the Android simulator on PC. When I take the same code and compile on the Mac, my button 开发者_JAVA百科images work, but other PNGs don't work. It's very simple code I'm working with at the moment, but before I post it, I wondered if there is something about PNGs on the Mac that I don't realize. A path is a path, and if it works on PC it should just work on Mac. Right?
A path is a path, and if it works on PC it should just work on Mac. Right?
Not necessarily. I don't know about Corona in particular, but in general, Windows is case-insensitive while linux & mac are case-sensitive. It's possible that an image called Foo.PNG and being refered to as 'foo.png' works on windows, but not on mac. It depends on how Corona is built.
So, mi advice is: check that you are using the same case in your code and in your filenames & extensions (I recommend all lowercase, but this is a personal preference)
If this doesn't solve your problem, it would be the time to show us some code.
It turns out that indexed PNGs aren't allowed in Corona, which is what I had. However, they worked on the PC / Android simulator. We brought the code over to the Mac and it didn't work, as it should not. So, we simply opened the images, saved as RGB PNG and voila, all the images worked.
精彩评论