G'day folks,

I've got this TImage component showing images on request from a directory.
This works file with *.BMP files, but don't seems to work with *.JPG files.

The code I'm using is as follows:

if fileExists(intToStr(iNumber) + '.JPG) then
      imgPhoto1.picture.loadFromFile(intToStr(iNumber) + '.JPG)
else
    if fileExists(intToStr(iNumber) + '.BMP) then
         imgPhoto1.picture.loadFromFile(intToStr(iNumber) + '.BMP)


Thus initially it searches for a JPG file else it loads a BMP file.


The BMP file get loaded and shows correctly, but the JPG file returns the
following message when loaded into the TImage:
"Unknown picture file extension (.JPG)"

Any idea?

Thanks for your help.

John Christenhusz
E-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to