Problem reading image file into BitmapEx

HARRY

Active Member
Licensed User
Longtime User
Hi,

A program runs well on the desktop. On the device however, Exceptions reports an System.IO.FileNotFoundException error. Below the code:
AddObject("BmpSrc","BitmapEx")
Msgbox(SrcSpec)
ErrorLabel(LabelEx)
Msgbox(FileExist(SrcSpec)) ' reports True
BmpSrc.New1(SrcSpec)

The last statement throws the error. The relevant file is a valid .jpg file. SrcSpec is e.g. \Opslagkaart\DCIM\100MEDIA\IMAG0008.jpg.

Opslagkaart is dutch for Storage Card

Clicking on that file in the Explorer on the device shows the image correctly

Does somebody have any idea what can be wrong?

Harry
 

HARRY

Active Member
Licensed User
Longtime User
Hi Andrew,

Problem solved. No other program had opened the file. The error message (I/O error) was misleading. After some rearrangements in my program I got the message OutOfMemory exactly on the same place. Then, I remembered an old 'problem' - too large images - and the solution: the JPEG library. Now everything works well. Thanks,
Harry
 
Top