function Bmp2Jpg(Bmp: TBitmap; Quality: Integer = 100): TJpegImage; begin Result := nil; if Assigned(Bmp) then begin Result := TJpegImage.Create; Result.Assign(Bmp); {Its all folks...} Result.CompressionQuality := Quality; Result.JPEGNeeded; {Key method...} Result.Compress; end;end;
2. Var bmp:TBitMap; jpg:TJPEGImage; begin try Bmp := TBitmap.Create; Jpg:=TJPEGImage.Create; Bmp.LoadFromFile('c:\a.bmp'); TmpFileName:='C:\a.jpg'; Jpg.Assign(Bmp); Jpg.SaveToFile(TmpFileName); finally Bmp.Free; Jpg.Free; end; end;
lincanwen(密码错误) 不好意思,你晚了一步,我给分了, Thank you all the same!
将paradox的数据,导入到Access数据库中,
Var bmp:TBitMap;
jpg:TJPEGImage;
begin
try
Bmp := TBitmap.Create;
Jpg:=TJPEGImage.Create;
Bmp.LoadFromFile('c:\a.bmp');
TmpFileName:='C:\a.jpg';
Jpg.Assign(Bmp);
Jpg.SaveToFile(TmpFileName);
finally
Bmp.Free;
Jpg.Free;
end;
end;
不好意思,你晚了一步,我给分了,
Thank you all the same!