Registriert seit: 15. Dez 2002
Ort: Mittelfranken
980 Beiträge
Delphi 10 Seattle Enterprise
|
Re: Jpeg Zu Bitmap Fehler
4. Feb 2008, 16:28
evtl. so von Jpeg zu BMP:
Delphi-Quellcode:
var
Bitmap: TBitmap;
Stream: TFileStream;
begin
Bitmap := TBitmap.Create;
try
Bitmap.LoadFromFile(ParamStr(1));
with TJPEGImage.Create do
try
Assign(Bitmap);
if ParamCount > 1 then
CompressionQuality := StrToIntDef(ParamStr(2),100);
Stream := TFileStream.Create(ChangeFileExt(ParamStr(1),'.JPG'),fmCreate);
try
SaveToStream(Stream)
finally
Stream.Free
end
finally
Free
end
finally
Bitmap.Free
end;
end;
|