Convert BMP to JPG
With this procedure below you can convert BMP to JPG.
uses jpeg;
procedure ConvertBMPtoJPG;
var
bmp : TImage;
jpg : TJpegImage;
begin
bmp := TImage.Create(nil);
jpg := TJpegImage.Create;
bmp.picture.bitmap.LoadFromFile ( ‘c:\picture.bmp’ );
jpg.Assign( bmp.picture.bitmap );
// Here you can set the jpg object’s properties as compression, size and more
jpg.SaveToFile ( ‘c:\picture.jpg’ );
jpg.Free;
bmp.Free;
end;
With this procedure below you can convert JPT to BMP. ...
This component uses the IE's HTTP / HTTPS mechanism (WinInet...
Thursday 15 Feb 2007 | Delphi Tutorial | Graphics