//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:= TBitmap.Create;
MyJpeg:= TJpegImage.Create;
Bmp.LoadFromFile(temp);
MyJpeg.Assign(Bmp);
MyJpeg.CompressionQuality := ACQ;
MyJpeg.Compress;
MyJpeg.SaveToFile(Path);
MyJpeg.free;
Bmp.free;
if FileExists(path) then
result := True;
end;
end;
该文章转载自网络大本营:
阅读(2766) | 评论(1) | 转发(0) |