(Gast)
n/a Beiträge
|
Re: JPG zu BMP umwandeln
25. Jan 2005, 20:24
das is auch gut:
Delphi-Quellcode:
uses axCtrls;
function LoadGraphic(const FileName: string): TBitMap;
var
OleG: TOleGraphic;
fs: TFileStream;
begin
result := TBitMap.Create;
OleG := TOleGraphic.Create;
fs := TFileStream.Create(FileName, fmOpenRead or fmSharedenyNone);
try
OleG.LoadFromStream(fs);
with result do
begin
Width := OleG.Width;
Height := OleG.Height;
Canvas.Draw(0,0,OleG);
end;
finally
OleG.Free;
fs.Free;
end;
end;
|
|
Zitat
|