//bmp图片转换成jpg图片
function fun_BmpToJpg(temp path: String; ACQ: Integer): Boolean; stdcall;
var
MyJpeg: TJpegImage;
Bmp: TBitmap;
begin
result := false;
if FileExists(temp) then
begin
Bmp:= TBitmapCreate;
MyJpeg:= TJpegImageCreate;
BmpLoadFromFile(temp);
MyJpegAssign(Bmp);
MyJpegCompressionQuality := ACQ;
MyJpegCompress;
MyJpegSaveToFile(Path);
MyJpegfree;
Bmpfree;
if FileExists(path) then
result := True;
end;
end;
该文章转载自网络大本营