Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bmp to jpg using Embarcadero c++

Status
Not open for further replies.

AlbertoHG

Programmer
Mar 30, 2021
1
0
0
MX
Hi All! the instruction in c++ Embarcadero
Image->Picture->SaveToFile( "graph" );
saves the file into a bmp format. Is there a way to save it as a jpg or to compress a bmp image into a jpg format?
I'd really appreciate any help.
Alberto

Never mind, already got the answer! The key code is
TJPEGImage *jp = new TJPEGImage();
try
{
jp->Assign(Image1->Picture->Bitmap);
jp->SaveToFile(something.jpg);
}
__finally
{
delete jp;
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top