Loading image files only in lower case?

mhc

Member
Licensed User
Longtime User
I have an array of string:

B4X:
dialogs(3)="IWin.jpg"  [COLOR="Red"]<= that's the spelling of the file stored on the hard disk[/COLOR]

I have a BitmapDrawable:

B4X:
Dim bd As BitmapDrawable

I have a Sub which shows the image:

B4X:
bd.Initialize(LoadBitmap(File.DirAssets,dialogs(DialogNr)))
imgDialog.Background=bd

In this way I get an error on emulator during the app is running: File not exist.
When I change the name of the file on the hard disk from IWin.jpg to iwin.jpg then the app run well.
And it is not necessary to change the spelling of file name inside the code:
dialogs(3)="IWin.jpg" still works!

So, in program code I can use the origin spelling of file name, but I have to change to lower case on hard disk.

mhc
 
Top