How to get multiple images from a filestream in C#
<p>I have a <code>Stream myStream</code> and I want to get a jpeg from it. This would be ok if the stream was just a jpeg, I would just do <code>Image img = Image.FromStream(MyStream);</code> but the stream is actually a header (ASCII text) followed by a jpeg, followed by a header, followed by a jpeg...</p>

<p>I can extract the headers easily, and they contain information about the jpeg (specifically its resolution and size in bytes) but I don't know how to then get the images as they come through and save them to disk (actually I only want to display them one after the other in an animation, but it's kinda the same thing).</p>

<p>Anyone any ideas?</p>

<p>Here's what the stream looks like:</p>

<p><code>[320,240,10734]jpegDataIncomprihensibleTextGoingOnForAges[320,240,10032]jpegDataIncomprihensibleTextGoingOnForAges...</code></p>