On Wed, 23 Apr 2008 16:30:01 -0700, eddyctam
<ed******@discussions.microsoft.comwrote:
When creating a Bitmap object in C# with Bitmap temp = new
Bitmap("(filename
here)";
What is put into memory? Is it just the bitmap info header or is the
entire
bitmap loaded into memory?
I believe the entire bitmap is loaded. However, the instance will still
retain a reference to the file. I'm not sure why it does this for plain
bitmaps, but for multi-image files (GIF, TIFF) it does it so that you can
page through the images without having them all loaded at once.
If it is the entire bitmap loaded into memory, how can I access a bitmap
without loading it entirely into memory first?
That depends on what sort of access you want to do. But you can always
just open the bitmap file as a regular file and access it directly that
way.
AFAIK, there's no way to tell the Bitmap class to not load a complete
image at once from the file.
Pete