Delphi-PRAXiS
Seite 3 von 3     123   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Delphi Frage zu IdHHTP Komponente! (https://www.delphipraxis.net/16213-frage-zu-idhhtp-komponente.html)

SirThornberry 12. Feb 2004 19:30

Re: Frage zu IdHHTP Komponente!
 
ihr seit doch komich, wieso erst als file speichern, gibt doch memorystreams
Delphi-Quellcode:
var myStream: TStream;
begin
  myStream := TMemoryStream.create;
  idhttp1.get(url, mystream);
  mystream.position := 0;
  image1.Picture.Graphic.LoadFromStream(mystream);
  myStream.free;
end;

Plague 12. Feb 2004 19:56

Re: Frage zu IdHHTP Komponente!
 
Also das funktioniert aber nicht!!!
Die Variante mit dem Speichern hat wunderbar funktioniert. Bei dir kommt nun folgender Fehler:

http://www.lamprecht-bau.de/Thomas/fehler.bmp

Was ist an dem Quelltext falsch?

stoxx 12. Feb 2004 19:56

Re: Frage zu IdHHTP Komponente!
 
hihi sorry, Plague .. natürlich musst Du es in einen Stream laden, hatte Deinen komischen Aufruf glatt übersehen :wall: :-) :-)

Plague 12. Feb 2004 20:01

Re: Frage zu IdHHTP Komponente!
 
wie in einen Stream laden?

Das verstehe ich grade nicht... Du lädst das Bild doch schon in den Stream wenn du idhttp1.get('http://www.lamprecht-bau.de/Thomas/Music/foto.bmp', mystream);

folgenden Code angibst... Oder nicht?

SirThornberry 12. Feb 2004 20:05

Re: Frage zu IdHHTP Komponente!
 
also bei mir geht der souce den ich gepostet hab. musst natürlich dafür sogen das timage auch jpegs anzeigen kann bei graphic

Plague 12. Feb 2004 20:11

Re: Frage zu IdHHTP Komponente!
 
Also irgendwie bin ich im Moment doch sehr verwundert. Wieso muss ich jpeg-Dateien laden können? Es handelt sich doch um eine Bitmap (*.bmp) Datei...

SirThornberry 12. Feb 2004 20:18

Re: Frage zu IdHHTP Komponente!
 
achso, dachte es geht um ein jpg. bei bitmap ist anstelle von
Delphi-Quellcode:
image1.Picture.Graphic.LoadFromStream(mystream);
natürlich
Delphi-Quellcode:
image1.Picture.Bitmap.LoadFromStream(mystream);
besser angebracht

Zitat:

Das verstehe ich grade nicht... Du lädst das Bild doch schon in den Stream wenn du idhttp1.get('http://www.lamprecht-bau.de/Thomas/Music/foto.bmp', mystream);
Klar wird das bild bei idhttp1.get schon in den stream geladen, aber es muss ja vom stream aus auch noch in das bild...


Alle Zeitangaben in WEZ +1. Es ist jetzt 13:00 Uhr.
Seite 3 von 3     123   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz