Author Topic: Images not visible  (Read 2057 times)

CptGreenwood

  • Guest
Images not visible
« on: July 30, 2012, 12:12:25 pm »
Hi,

with my last iPhone testing build it appeared that some moving graphics are not visible anymore although I didn't change that part of the code.
On the iPhone simulator the views are visible as intended. All @2x-images are present. What could be wrong there?

Another question: Is there no need to free the memory of images, sounds, etc which are not needed any more? For all the Add-functions there are no Remove or Delete functions.

Thanx for an answer!

tim

  • Administrator
  • Hero Member
  • *****
  • Posts: 1595
  • Karma: +11/-1
    • View Profile
    • DragonFireSDK
Re: Images not visible
« Reply #1 on: July 30, 2012, 12:21:27 pm »
Remember that the file system in iOS is case sensitive.  So, make sure that any image, sound, MP3 that you ask to be loaded matches *precisely* with the name of the file on disk.

Thus:

Code: [Select]
ImageAdd("MyFile.png");
Will not be able to find "myfile.png" (or "MYFILE.PNG" or MyFile.PNG", etc.) on disk on the device.  This *will* work on the Simulator since the Windows file system isn't case sensitive...

You generally don't need to unload your images, sounds, etc. However, you *can* "recycle" your asset handles with ImageSetImage(), SoundsSetSound() and Mp3SetMp3().  These functions free existing objects from memory and load new assets in their place.
Tim Sommers
DragonFireSDK Team

CptGreenwood

  • Guest
Re: Images not visible
« Reply #2 on: July 31, 2012, 12:43:17 am »
Hi Tim,

there is no problem with the filename case, I've already checked that. As I said, from the last build the images were visible to the current build neither the part of the code responsible for displaying the images nor the filenames of the images themselfes were modified. By the way... if the iOS build cant't load images won't this produce a kind of error when running the app or would it really continue with invisible images?
Is there another thing I can look for or are you able to look "into" the build (don't know if this is possible).

Greetz,
Ralf

CptGreenwood

  • Guest
Re: Images not visible
« Reply #3 on: July 31, 2012, 02:19:52 am »
 :-\
Sorry, sorry, sorry... you were absolutely right. Due to a find/replace operation on the code when I replaced a lower case class name to an upper case, the filenames of my images were affected too. Now everything is fine...  ;D

tim

  • Administrator
  • Hero Member
  • *****
  • Posts: 1595
  • Karma: +11/-1
    • View Profile
    • DragonFireSDK
Re: Images not visible
« Reply #4 on: July 31, 2012, 07:51:33 am »
Glad you got it working.  This is one of those little "gotchas" with iOS.  I think this has happened to everyone at least once...
Tim Sommers
DragonFireSDK Team