문제

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 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?

도움이 되었습니까?

해결책 2

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top