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;
}
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;
}