Einzelnen Beitrag anzeigen

gauggi

Registriert seit: 18. Apr 2006
177 Beiträge
 
#1

BMP in JPG Umwandlung funktioniert nicht

  Alt 13. Okt 2006, 19:38
Ich habe ein grosses Problem. Wenn ich das Programm ausführe, wird ein runtime error erzeugt.

Hier der Code:

Delphi-Quellcode:
 var
  Bmp: TBitmap;
  Jpg: TJpegImage;
begin
  Bmp := TBitmap.Create;
  Jpg := TJpegImage.Create;
  try
    Bmp:=form1.Image1.Picture.Bitmap;
    Jpg.CompressionQuality:=spinedit1.Value;
    Jpg.Assign(Bmp);
    Jpg.SaveToFile(form1.SaveDialog1.FileName + '.jpg');
  finally
    Jpg.Free;
    Bmp.Free;
    end;
     Close;
  end;
Was ist da dran falsch?????

mfg Gauggi
  Mit Zitat antworten Zitat