Hi Laurence,
U wrote:
> You need to include the Jpeg.pas file in your unit.
Is this a standard Delphi file? I can't find this file on my system.
I still wonder, why can TImage load a BMP or JPG image at design-time but
can't load the same JPG at run-time?
Thanks for any help,
John Christenhusz
Original message:
-----------------
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)"
---------------------------------------------------------------------------
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"