Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
Delphi 10.2 Tokyo Professional
|
Re: Funktionen einbinden ?
26. Aug 2006, 13:12
Delphi-Quellcode:
function TForm1.JPEGtoBMP(const FileName: TFileName):Tbitmap; // <-- TForm1 nicht vergessen!
var
jpeg: TJPEGImage;
bmp: TBitmap;
begin
jpeg := TJPEGImage.Create;
try
jpeg.CompressionQuality := 100; {Default Value}
jpeg.LoadFromFile(FileName);
bmp := TBitmap.Create;
try
bmp.Assign(jpeg);
result:=bmp;
bmp.SaveToFile(ExtractFilePath(ParamStr(0))+'\temp.bmp');
finally
bmp.Free
end;
finally
jpeg.Free
end;
end;
Gruß
Neutral General
Michael "Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
|