Einzelnen Beitrag anzeigen

Blackheart

Registriert seit: 4. Mai 2005
846 Beiträge
 
Delphi 7 Enterprise
 
#8

Re: BMP (nicht genügend speicher) JPG 4 MP

  Alt 17. Aug 2006, 12:50
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var JPG:TJpegImage;
      bmp: TBitmap;
begin
   JPG := TJPEGImage.Create;
   JPG.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'Bild.jpg');
   bmp := TBitmap.Create;
   bmp.width:= JPG.Width;
   bmp.Height:= JPG.Height;
   bmp.canvas.StretchDraw(Rect(0,0,bmp.width,bmp.height),JPG);
   bmp.Assign(JPG);
   bmp.SaveToFile(ChangeFileExt(ExtractFilePath(ParamStr(0)), '.bmp'));
   JPG.assign(bmp);
   bmp.free;
   JPG.free;
end;
  Mit Zitat antworten Zitat