Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unknown picture file extension

583 views
Skip to first unread message

rhys sage

unread,
Jul 7, 2006, 10:13:27 PM7/7/06
to
I'm getting the message: ImageProject.exe raised exception class
EInvalidGraphic with message 'Unknown picture file extension (.jpg)'

And I'm getting it from the following:

Image1.Picture.LoadFromFile('test.jpg'); where test.jpg exists and can
be opened by other software.

I'm using Delphi 7


Any ideas?

--

Finn Tolderlund

unread,
Jul 8, 2006, 2:34:30 AM7/8/06
to

"rhys sage" <ab...@127.0.0.1> skrev i en meddelelse
news:44af14c7$1...@newsgroups.borland.com...

> I'm getting the message: ImageProject.exe raised exception class
> EInvalidGraphic with message 'Unknown picture file extension (.jpg)'
>
> And I'm getting it from the following:
>
> Image1.Picture.LoadFromFile('test.jpg'); where test.jpg exists and can
> be opened by other software.

Sounds like the usual beginners error.
You forgot to add jpeg to the uses clause.
--
Finn Tolderlund
http://www.tolderlund.eu/delphi/


Remy Lebeau (TeamB)

unread,
Jul 8, 2006, 3:04:53 AM7/8/06
to

"rhys sage" <ab...@127.0.0.1> wrote in message
news:44af14c7$1...@newsgroups.borland.com...

> I'm getting the message: ImageProject.exe raised exception
> class EInvalidGraphic with message 'Unknown picture file
> extension (.jpg)'

Did you include 'Jpeg' into your uses clause? The VCL does NOT have JPEG
support enabled by default. You have to include that unit into your code to
enable it.


Gambit


rhys sage

unread,
Jul 8, 2006, 11:27:14 AM7/8/06
to
Aha. Thanks. That was it. Not a beginner - just my 1st time using jpeg
images.
0 new messages