iOS Problem with image?

My program works fine in simulator, both under windows and mac, but when I load it on a real iOS device, images fail to appear. The entirety of my program:

local img = display.newImage (“diagrambutton.png”,0,0,true)
img.x = display.contentWidth/2
img.y = display.contentHeight/2

The png file is located in the same folder folder where main.lua is located. It is a 200x200 image file.

Running in simulator (Windows or Mac), viewing any device, the image is shown at screen center. On a real iOS device, no image is shown. What is going on here? [import]uid: 157797 topic_id: 36352 reply_id: 336352[/import]

Additional info: deployed with ipa file using TestFlightApp. [import]uid: 157797 topic_id: 36352 reply_id: 144383[/import]

Filenames on iOS devices are case sensitive, did you check that?

e.g ‘Diagrambutton.png’ is something different then ‘diagrambutton.png’

[import]uid: 50459 topic_id: 36352 reply_id: 144409[/import]

@rmbsoft: yes, the case is all lower for everything.

I’m stumped so far, maybe there’s something weird about my png file? But it works everywhere else. [import]uid: 157797 topic_id: 36352 reply_id: 144420[/import]

I had a problem like that once. It turned out I hadn’t saved an actual png file even though I gave it a png extension. It was actually a psd file, or perhaps a jpg. So make sure when you save your png it is actually being saved as a png. Don’t know why it worked in the simulator, but it did.
[import]uid: 9422 topic_id: 36352 reply_id: 144426[/import]

HardBoiled, you win.

As unbelievable as it seemed, that was exactly the problem. The graphic files were generated by a php script that I wrote to do downscaling, and it was naming them png files, but they were actually jpg’s. Wow.

Thanks!
Fritz
[import]uid: 157797 topic_id: 36352 reply_id: 144495[/import]

Additional info: deployed with ipa file using TestFlightApp. [import]uid: 157797 topic_id: 36352 reply_id: 144383[/import]

Filenames on iOS devices are case sensitive, did you check that?

e.g ‘Diagrambutton.png’ is something different then ‘diagrambutton.png’

[import]uid: 50459 topic_id: 36352 reply_id: 144409[/import]

@rmbsoft: yes, the case is all lower for everything.

I’m stumped so far, maybe there’s something weird about my png file? But it works everywhere else. [import]uid: 157797 topic_id: 36352 reply_id: 144420[/import]

I had a problem like that once. It turned out I hadn’t saved an actual png file even though I gave it a png extension. It was actually a psd file, or perhaps a jpg. So make sure when you save your png it is actually being saved as a png. Don’t know why it worked in the simulator, but it did.
[import]uid: 9422 topic_id: 36352 reply_id: 144426[/import]

HardBoiled, you win.

As unbelievable as it seemed, that was exactly the problem. The graphic files were generated by a php script that I wrote to do downscaling, and it was naming them png files, but they were actually jpg’s. Wow.

Thanks!
Fritz
[import]uid: 157797 topic_id: 36352 reply_id: 144495[/import]

Additional info: deployed with ipa file using TestFlightApp. [import]uid: 157797 topic_id: 36352 reply_id: 144383[/import]

Filenames on iOS devices are case sensitive, did you check that?

e.g ‘Diagrambutton.png’ is something different then ‘diagrambutton.png’

[import]uid: 50459 topic_id: 36352 reply_id: 144409[/import]

@rmbsoft: yes, the case is all lower for everything.

I’m stumped so far, maybe there’s something weird about my png file? But it works everywhere else. [import]uid: 157797 topic_id: 36352 reply_id: 144420[/import]

I had a problem like that once. It turned out I hadn’t saved an actual png file even though I gave it a png extension. It was actually a psd file, or perhaps a jpg. So make sure when you save your png it is actually being saved as a png. Don’t know why it worked in the simulator, but it did.
[import]uid: 9422 topic_id: 36352 reply_id: 144426[/import]

HardBoiled, you win.

As unbelievable as it seemed, that was exactly the problem. The graphic files were generated by a php script that I wrote to do downscaling, and it was naming them png files, but they were actually jpg’s. Wow.

Thanks!
Fritz
[import]uid: 157797 topic_id: 36352 reply_id: 144495[/import]

Additional info: deployed with ipa file using TestFlightApp. [import]uid: 157797 topic_id: 36352 reply_id: 144383[/import]

Filenames on iOS devices are case sensitive, did you check that?

e.g ‘Diagrambutton.png’ is something different then ‘diagrambutton.png’

[import]uid: 50459 topic_id: 36352 reply_id: 144409[/import]

@rmbsoft: yes, the case is all lower for everything.

I’m stumped so far, maybe there’s something weird about my png file? But it works everywhere else. [import]uid: 157797 topic_id: 36352 reply_id: 144420[/import]

I had a problem like that once. It turned out I hadn’t saved an actual png file even though I gave it a png extension. It was actually a psd file, or perhaps a jpg. So make sure when you save your png it is actually being saved as a png. Don’t know why it worked in the simulator, but it did.
[import]uid: 9422 topic_id: 36352 reply_id: 144426[/import]