![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Bitmaps from streams - duplicated data in memory? Hi, If I create a Bitmap object from a stream, is the data making up the image from that stream duplicated in the Bitmap object, or does the Bitmap just point to the stream somehow without holding any image data? I did notice that if I populated a Bitmap object from a MemoryStream, if I closed the MemoryStream I got a GDI error when I tried to save the Bitmap, so I assumed it was the latter. Just looking for confirmation. Thanks, Chris |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Bitmaps from streams - duplicated data in memory? Chris Ashley wrote: Quote: > If I create a Bitmap object from a stream, is the data making up the > image from that stream duplicated in the Bitmap object or does the Bitmap > just point to the stream somehow without holding any image data? copied. If it is, it will use the stream directly. That's an implementation detail, though. The documentation for Bitmap explicitly states: "You must keep the stream open for the lifetime of the Bitmap." Bitmap could one day read lazily from non-seekable streams if it so desired. Quote: > I did notice that if I populated a Bitmap object from a MemoryStream, > if I closed the MemoryStream I got a GDI error when I tried to save > the Bitmap, so I assumed it was the latter. Just looking for > confirmation. > streams. :-) -- J. http://symbolsprose.blogspot.com |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| any way to enable "alternate data streams" in Vista ? | Vista file management | |||
| Alternate Data Streams on files | PowerShell | |||
| Bitmaps | Vista General | |||