procedure JPegToBMPDemo;
var
JPeg: TJPegImage;
Bmp: TBitmap;
begin
JPeg := TJPegImage.Create;
JPeg.LoadFromFile('chemical.jpg');
Bmp := TBitmap.Create;
Bmp.Width := JPeg.Width;
Bmp.Height := JPeg.Height;
Bmp.Canvas.Draw(0, 0, JPeg);
Bmp.SaveToFile('chemical.bmp');
Bmp.Free;
JPeg.Free;
end;
别忘了加上 use jpeg