uses jpeg;
procedure ZipJPEG;
var
jpg: TJpegImage;
bmp: TBitmap;
begin
jpg := TJpegImage.Create;
bmp := TBitmap.Create;
try
jpg.LoadFromFile('c:\A.jpg');
bmp.Width := jpg.Width;
bmp.Height := jpg.Height;
bmp.Canvas.StretchDraw(bmp.Canvas.ClipRect, jpg);
jpg.Assign(bmp);
jpg.CompressionQuality := 10;
jpg.Compress;
jpg.SaveToFile('C:\AA.jpg');
finally
bmp.free;
jpg.free;
end;
end;
Copyright © 2014 DelphiW.com 开发 源码 文档 技巧 All Rights Reserved
晋ICP备14006235号-8 晋公网安备 14108102000087号
执行时间: 0.036484956741333 seconds