Examples Delphi

Converting bitmap pictures to jpg couldn't be easier using one TImage and one TJpegImage:
unit bmp2jpg;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls,jpeg, ExtCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
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;
end.