you're probably thinking "what?!? he can't even do that?!"
well I can, but I want to load it from the stream starting at a position other than zero. Simply setting the position (using seek or just writing to the position) does not seem to work. I didn't find anything using google, so I feared it may not be possible, but it almost has to be, it's something so simple..
I'd rather not do weird things like copying byte arrays to bitmap-data things, I guess that would work but it shouldn't have to be that complicated.
If that's the only possibility then ofcourse it's ok..
[C#] Loading bitmap from a stream
Moderator: MaxCoderz Staff
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
- benryves
- Maxcoderz Staff
- Posts: 3087
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
I'm surprised seeking doesn't work, but can't verify it from here.
If it's a huge problem, seek to the right place, create a new MemoryStream and dump the data from the file to the MemoryStream, then load from the MemoryStream.
If it's a huge problem, seek to the right place, create a new MemoryStream and dump the data from the file to the MemoryStream, then load from the MemoryStream.
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am