God_Ares
asked on
bitmap.savetostream problems.
i have a bitmap and when i do this:
bitmap.SaveToFile('c:\1\2. bmp');
Bitmap.SaveToStream(Stream );
bitmap.LoadFromStream(stre am);
bitmap.SaveToFile('c:\1\3. bmp');
2.bmp <> 3.bmp why? What should i do to correct this?
(d5 pro)
bitmap.SaveToFile('c:\1\2.
Bitmap.SaveToStream(Stream
bitmap.LoadFromStream(stre
bitmap.SaveToFile('c:\1\3.
2.bmp <> 3.bmp why? What should i do to correct this?
(d5 pro)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Edited text of question.
ASKER
k i'll test it when i'm back home, i don't have delphi @work :(
And now? Will you give any comment? Even if you store the bitmap in the first line it is still needed to rewind the stream before you can read what you wrote before...
Ciao, Mike
Ciao, Mike
Oops, eMail crossing :-)
Ciao, Mike
Ciao, Mike
God Ares,
I am guessing that after the SaveToStream, you need to to do a seek to set the pointer back to the beginning of the stream. For Example:
bitmap.SaveToFile('c:\1\2. bmp');
Bitmap.SaveToStream(Stream );
Stream.Seek(0,0);
bitmap.LoadFromStream(stre am);
bitmap.SaveToFile('c:\1\3. bmp');
Try this and lemme know how you make out, okay?
Good luck!!
I am guessing that after the SaveToStream, you need to to do a seek to set the pointer back to the beginning of the stream. For Example:
bitmap.SaveToFile('c:\1\2.
Bitmap.SaveToStream(Stream
Stream.Seek(0,0);
bitmap.LoadFromStream(stre
bitmap.SaveToFile('c:\1\3.
Try this and lemme know how you make out, okay?
Good luck!!
ASKER
Lischke thank you for your awnser
DrDelphi thank you 2, but Lischke gave me the same...
DrDelphi thank you 2, but Lischke gave me the same...
bitmap.LoadFromFile('c:\1\
Ciao, Mike