Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TImage->Picture cant load JPG



Permlink Replies: 1 - Last Post: Mar 12, 2018 6:34 PM Last Post By: Sebastian Ledesma
Sebastian Ledesma

Posts: 78
Registered: 11/9/00
TImage->Picture cant load JPG
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 12, 2018 6:21 PM
Hi:

I'm trying to load a .jpg file into a TImage.
I've tried with :
Image1->Picture->LoadFromFile(myFile);
but I get an exception when the file it's .jpg, .png. or .gif: Unkonw picture extension.

How can I load a .jpg into a form?
( I'm using C++Builder 10.2.2 and XE8 )

Thanks in advance.

Sebas
Sebastian Ledesma

Posts: 78
Registered: 11/9/00
Re: TImage->Picture cant load JPG
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 12, 2018 6:34 PM   in response to: Sebastian Ledesma in response to: Sebastian Ledesma
Solved!

Just add:
#include <GIFimg.hpp>
#include <pngimage.hpp>
#include <jpeg.hpp>

Sebas
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02