| |

VerySource

 Forgot password?
 Register
Search
View: 1905|Reply: 4

About displaying jpg format images

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-12-14 17:30:02
| Show all posts |Read mode
Graphics::TBitmap *pBitmap=new Graphics::TBitmap;
  PBitmap->LoadFromFile("F:\\picture\\China recognized as the most beautiful 18 places\\Yunnan Luoping.jpg");
   Canvas->Draw(750,350,pBitmap); I want to display a picture in jpg format, but there are always exceptions when running. Is it necessary to convert the jpg image to bmp format first? any idea?
Reply

Use magic Report

0

Threads

7

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-12-14 20:15:01
| Show all posts
You all said the answer
Reply

Use magic Report

0

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-12-15 02:15:01
| Show all posts
#include <jpeg.hpp>
  ...
  TJPEGImage *Jpg;
  Jpg = new TJPEGImage();
  Jpg->LoadFromFile("d:\\aa.jpg");
  Image1->Canvas->Draw(0,0,Jpg);
  delete Jpg;
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-12-15 12:30:01
| Show all posts
Thanks, that's it!
Reply

Use magic Report

0

Threads

1

Posts

0.00

Credits

Newbie

Rank: 1

Credits
0.00

 China

Post time: 2021-2-14 16:45:55
| Show all posts
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list