I'm glad I could be of help.

Also since you are reusing existing stream it might not be a bad idea to set its size to 0 before storing the data (greyed image) in it the second time. Why?
If the size of that data is smaller than the size of stream you might end up with new data to be stored on the beggining of the stream and some renmants of old dta at the end of the stream. And this could lead to some unpredicatable behavior of your program which would probably be hard to debug.
Naturally this completly depends on how method that stores the data into the stream works (does it adjust the size of the stream or does not).