//试一试
uses
  JPEG;begin
  with TJPEGIamge.Crate(Self) do try
    Picture.Assign(Iamge1.Picture);
    Picture.SaveToFile('D:\1.jpg');
  finally
    Free;
  end;
end;

解决方案 »

  1.   

    with TJPEGImage.Crate(Self) do try
    //         ~~~~笔误
        
      

  2.   

    如果一个3534x2564的BMP图像用你的方法就很慢或者死机,如何解决?
      

  3.   

    var
      MyJpeg: TJpegImage;
      Image1: TImage;
    begin
      Image1:= TImage.Create(self);
      MyJpeg:= TJpegImage.Create;
      Image1.Picture.Bitmap.LoadFromFile('c:\windows\desktop\aa.BMP');  // Load the Bitmap from a file
      MyJpeg.Assign(Image1.Picture.Bitmap);  // Assign the BitMap to MyJpeg object
      MyJpeg.CompressionQuality:=StrToInt('75');
      MyJpeg.Compress;
      MyJpeg.SaveToFile('c:\windows\desktop\test.JPG'); // Save the JPEG to Disk
    end;