一個壓縮jpeg圖片的過程 [delphi] uses jpeg; procedure ZipJPEG; var jpg: TJpegImage; bmp: TBitmap; begin jpg := TJpegImage.Create; bmp := TBitmap.Create; try www.2cto.com 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;