Nein, wieso dann funktioniert es, wenn ich die Bitmap als file lade z.B.:
Delphi-Quellcode:
PROCEDURE BMPtoJPG2 (CONST myBMPName: String; myJPGName: String);
VAR
Bitmap: TBitmap;
JPEG : TJPEGImage;
BEGIN
Bitmap := TBitmap.Create;
JPEG := TJPEGImage.Create;
TRY
Bitmap.LoadFromFile('myBMP.bmp');
JPEG.CompressionQuality := StrToInt(Form1.edit1.Text);
JPEG.Assign(Bitmap);
//myJPG.Assign(JPEG);
JPEG.SaveToFile('myJPEG.jpg');
FINALLY
Bitmap.Free;
JPEG.Free
END;
END;
procedure TForm1.Button2Click(Sender: TObject);
begin
image2.picture:= nil;
BMPtoJPG2('myBMP.bmp','myJPEG.jpg');
Image2.Picture.LoadFromFile('myJPEG.jpg');
end;