Saving bitmaps as JPEGs

Hi,
This has probably been answered hundereds of times, bit I have a TBitmap and
would like to save it as a JPEG file. Can anyone show me where I am going
wrong ?
If you want, you can email me on RPende...@dataworks.co.uk
My currect code is:

procedure SavePic( AFilename: String );
var
  fBmp: Graphics.TBitmap;
  fJPEG: TJPEGImage;
  fMyRect: TRect;
begin
  with fMyRect do
  begin
    Left := 0;
    Top := 0;
    Right := fBitImage.Width;
    bottom := fBitImage.Height;
  end;
  fBmp := Graphics.TBitmap.Create;
  fJPEG := TJPEGImage.Create;
  try
    fBmp.Width := fMyRect.Right;
    fBmp.Height := fMyRect.Bottom;
    fBmp.Canvas.CopyRect( fMyRect, fBitImage.Canvas, fMyRect );
    fBmp.SaveToFile( AFilename + '.bmp' );

    fJPEG.Assign( fBmp );
    fJPEG.SaveToFile( AFilename + '.jpg' );
  finally
    fBmp.free;    fJPEG.Free;
  end;
end;