When I run the following code, the MemoryStream's Position is always set to
762 instead of 0, which is what I would expect:
Dim bmp As Image
Dim ms As MemoryStream
bmp = New System.Drawing. Bitmap("C:\2068 .bmp")
ms = New MemoryStream
bmp.Save(ms, bmp.RawFormat)
Console.WriteLi ne("MemoryStrea m Position = " & ms.Position)
ms.Close()
This is happening on two different computers for me. Does this happen to
anyone else? Is there a reason why the memory stream's position is set to
762 instead of 0? Or is it proper practice to always manually set stream
positions to zero when first creating them?
- Don
762 instead of 0, which is what I would expect:
Dim bmp As Image
Dim ms As MemoryStream
bmp = New System.Drawing. Bitmap("C:\2068 .bmp")
ms = New MemoryStream
bmp.Save(ms, bmp.RawFormat)
Console.WriteLi ne("MemoryStrea m Position = " & ms.Position)
ms.Close()
This is happening on two different computers for me. Does this happen to
anyone else? Is there a reason why the memory stream's position is set to
762 instead of 0? Or is it proper practice to always manually set stream
positions to zero when first creating them?
- Don
Comment