procedure TForm1.Button1Click(Sender: TObject);
var
MyJPEG : TJPEGImage;
MyBMP : TBitmap;
begin
MyBMP := TBitmap.Create;
with MyBMP do
try
{Cargamos el BMP}
{Load the BMP}
LoadFromFile('YourBmpHere.BMP');
MyJPEG := TJPEGImage.Create;
with MyJPEG do begin
Assign(MyBMP);
{Grabamos el JPG}
{Save the JPG}
SaveToFile('YourJpegHere.JPEG');
Free;
end;
finally
Free;
end;
end;
|