L
Lump Kin
I'm trying to load a bitmap created using the GDIInternals
BitmapHandler.SaveBitmap function but it fails everytime.
The following code is taken from the sample BitmapFun project and
slightly modified to show my issue.
String lsPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName);
// Load gif
Bitmap b = new Bitmap( lsPath + "\\test.gif");
// Get CF internal data structure
InMemoryBitmap bmp = BitmapHandler.GetInMemoryBitmap(b);
// Save bitmap bits to a file
BitmapHandler.SaveBitmap(bmp, @lsPath + "\\out.bmp");
// Load saved bitmap
Bitmap c = new Bitmap( lsPath + "\\out.bmp");
When it attemps to perform the "new bitmap" function on the saved
bitmap, I get the following error -
"An unhandled exception of type 'System.ArgumentException' occurred in
System.Drawing.dll
Additional information: Argument Exception"
However, the bitmap will load fine if viewed on the desktop. Any
clues on how to get around this problem would be greatly appreciated.
Thx
BitmapHandler.SaveBitmap function but it fails everytime.
The following code is taken from the sample BitmapFun project and
slightly modified to show my issue.
String lsPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName);
// Load gif
Bitmap b = new Bitmap( lsPath + "\\test.gif");
// Get CF internal data structure
InMemoryBitmap bmp = BitmapHandler.GetInMemoryBitmap(b);
// Save bitmap bits to a file
BitmapHandler.SaveBitmap(bmp, @lsPath + "\\out.bmp");
// Load saved bitmap
Bitmap c = new Bitmap( lsPath + "\\out.bmp");
When it attemps to perform the "new bitmap" function on the saved
bitmap, I get the following error -
"An unhandled exception of type 'System.ArgumentException' occurred in
System.Drawing.dll
Additional information: Argument Exception"
However, the bitmap will load fine if viewed on the desktop. Any
clues on how to get around this problem would be greatly appreciated.
Thx