Bitmap, Bitmap.Save() and BitmapResource
Bitmap, Bitmap.Save() and BitmapResource
Please explain Bitmap, Bitmap.Save() (specifically why it would return false and why it would fail) and BitmapResource.
Re: Bitmap, Bitmap.Save() and BitmapResource
Hi Herb,
Just a quick answer for now, but I will try to find some time to answer all these questions of yours on the forums after I set up a desk and chair over here, and the hot air of Viet Nam cool down
Bitmap is the core object to hold picture data, in a variety of pixel color formats. It can hold both device independent and device dependent bitmaps (Depending on whether or not you pass a display system to the Bitmap::Load method, or whether you call MakeDD or not).
BitmapResource is a higher level utility function for automatically managing the loading and unloading of bitmap data when entering or exiting a specific display driver/graphics mode. It is akin to the Window::OnLoadGraphics and Window::OnUnloadGraphics events.
Bitmap::Save() returns false if it was unable to save the bitmap to the file, if e.g. it was not able to open the specified file name for writing or if the underlying picture format library call failed. It will return false on failure and true on success.
NOTE: You want to use Save() on display independent bitmaps only (a bitmap on which MakeDD has NOT been called and initialized with a null display system).
Please let me know if you have any other specific question(s) about these.
Cheers,
Jerome
Just a quick answer for now, but I will try to find some time to answer all these questions of yours on the forums after I set up a desk and chair over here, and the hot air of Viet Nam cool down
Bitmap is the core object to hold picture data, in a variety of pixel color formats. It can hold both device independent and device dependent bitmaps (Depending on whether or not you pass a display system to the Bitmap::Load method, or whether you call MakeDD or not).
BitmapResource is a higher level utility function for automatically managing the loading and unloading of bitmap data when entering or exiting a specific display driver/graphics mode. It is akin to the Window::OnLoadGraphics and Window::OnUnloadGraphics events.
Bitmap::Save() returns false if it was unable to save the bitmap to the file, if e.g. it was not able to open the specified file name for writing or if the underlying picture format library call failed. It will return false on failure and true on success.
NOTE: You want to use Save() on display independent bitmaps only (a bitmap on which MakeDD has NOT been called and initialized with a null display system).
Please let me know if you have any other specific question(s) about these.
Cheers,
Jerome
Re: Bitmap, Bitmap.Save() and BitmapResource
Sam,
Have you come across the sdk/samples/guiAndGfx/bitmapsAndKB sample?
It comes with a little PowerPoint tutorial as well.
You moves bitmaps around with the keyboard. The PowerPoint talks about the audio/piano sample also
Cool stuff
Have you come across the sdk/samples/guiAndGfx/bitmapsAndKB sample?
It comes with a little PowerPoint tutorial as well.
You moves bitmaps around with the keyboard. The PowerPoint talks about the audio/piano sample also
Cool stuff