A generic error occurred in gdi+. bitmap.save

Error
A generic error occurred in GDI+.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.

Solution

Save your Bitmap image using following code

using (MemoryStream ms = new MemoryStream())

{
convBmp.Save(ms, ImageFormat.Jpeg);
}

Note :  convBmp is a bitmap object.

About the Author

avatar