主页 > 编程资料 > Delphi >
发布时间:2015-09-22 作者:网络 阅读:161次

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;


关键字词: