Board index » delphi » LoadFromStream question

LoadFromStream question


2005-03-01 02:38:18 AM
delphi56
Hi,
I did an application to download an imagem using THTTPGet and I got an TStream as result, when the download finished.
Then I created the TGifImage object and tried to LoadFromStream.
I got an error message: Premature end of data.
But the stream had 4KB of size.
If I save the stream to file, and then read the image from saved file, it works.
But I cant save the stream to file where this application will run.
What can I do?
Thanks,
Marcelo
 
 

Re:LoadFromStream question

"Marcelo Ando" <XXXX@XXXXX.COM>skrev i en meddelelse
Quote
Then I created the TGifImage object and tried to LoadFromStream.
I got an error message: Premature end of data.
Probably the usual error.
Did you forget to reset the stream position to 0?
--
Finn Tolderlund
 

Re:LoadFromStream question

"Finn Tolderlund" <XXXX@XXXXX.COM>writes:
Quote

"Marcelo Ando" <XXXX@XXXXX.COM>skrev i en meddelelse
news:4223651a$XXXX@XXXXX.COM...
>Then I created the TGifImage object and tried to LoadFromStream.
>I got an error message: Premature end of data.

Probably the usual error.
Did you forget to reset the stream position to 0?
--
Finn Tolderlund


You are right. I wasnt reseting the position. Now it is working.
Thank you very much. :D
Regards,
Marcelo