Error message when you use the Image.Save method to create a very large GIF file in Windows Server 2003 or in Windows XP: "System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+" (915415)



The information in this article applies to:

  • Microsoft Windows XP Home Edition
  • Microsoft Windows XP Professional
  • Microsoft Windows XP Professional x64 Edition
  • Microsoft Windows Server 2003, Datacenter Edition for Itanium-based Systems
  • Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems
  • Microsoft Windows Server 2003, Datacenter x64 Edition
  • Microsoft Windows Server 2003, Enterprise x64 Edition
  • Microsoft Windows Server 2003, Standard x64 Edition
  • Microsoft Windows Server 2003, Datacenter Edition
  • Microsoft Windows Server 2003, Enterprise Edition
  • Microsoft Windows Server 2003, Standard Edition
  • Microsoft Windows Server 2003, Web Edition

SYMPTOMS

Consider the following scenario. You have an application that is built by using the .NET Framework in Microsoft Windows Server 2003 or in Microsoft Windows XP. This application uses the Graphics Device Interface (GDI+) API. You create a very large GIF file by using the Image.Save method. However, when you try to read this file from your application, you receive the following error message:
System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
For example, you receive this error message when you run code that is similar to the following:
      int iWidth  = 600;
      int iHeight = 2202;

      Bitmap oBitmap = new Bitmap(iWidth,iHeight, PixelFormat.Format24bppRgb);      
      oBitmap.Save("c:\\GifImage.Gif",ImageFormat.Gif);
      Image oBit2 = Bitmap.FromFile("c:\\GifImage.Gif");

RESOLUTION

Hotfix information

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

To install this hotfix, you must be running one of the following operating systems:
  • Windows Server 2003 with Service Pack 1
  • Windows Server 2003, Edition for Itanium-based Systems with Service Pack 1
  • Windows Server 2003, x64 Edition
  • Windows XP Professional x64 Edition
  • Windows XP with Service Pack 1

Restart requirement

You must restart your computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.Windows Server 2003, x86-based versions
File nameFile versionFile sizeDateTimePlatformSP requirementService branch
Gdiplus.dll5.2.3790.26601,728,51215-Mar-200615:33x86SP1SP1QFE
Gdiplus.manNot Applicable39715-Mar-200615:35Not ApplicableSP1SP1QFE
Gdiplus.manNot Applicable60515-Mar-200615:35Not ApplicableSP1SP1QFE
Windows Server 2003, Itanium-based versions
File nameFile versionFile sizeDateTimePlatformSP requirement
Gdiplus.dll5.2.3790.26605,288,44815-Mar-200616:58IA-64SP1
Gdiplus.manNot Applicable39815-Mar-200616:58Not ApplicableSP1
Gdiplus.manNot Applicable60715-Mar-200616:58Not ApplicableSP1
Gdiplus.dll5.2.3790.26601,728,51215-Mar-200616:58x86SP1
Gdiplus.manNot Applicable39715-Mar-200616:58Not ApplicableSP1
Gdiplus.manNot Applicable60515-Mar-200616:58Not ApplicableNone
Windows, x64-based versions
File nameFile versionFile sizeDateTimePlatformSP requirement
Gdiplus.dll5.2.3790.26602,878,46415-Mar-200616:58x64SP1
Gdiplus.manNot Applicable39915-Mar-200616:58Not ApplicableSP1
Gdiplus.manNot Applicable60915-Mar-200616:58Not ApplicableSP1
Gdiplus.dll5.2.3790.26601,728,51215-Mar-200616:58x86SP1
Gdiplus.manNot Applicable39715-Mar-200616:58Not ApplicableSP1
Gdiplus.manNot Applicable60515-Mar-200616:58Not ApplicableNone
Windows XP, x86-based versions
File nameFile versionFile sizeDateTimePlatformSP requirementService branch
Sxs.dll5.1.2600.1579700,92820-Aug-200422:01x86SP1SP1QFE
Gdiplus.dll5.1.3102.18181,638,40023-Mar-200605:10x86SP1SP1QFE
Gdiplus.manNot Applicable39723-Mar-200605:17Not ApplicableSP1SP1QFE
Gdiplus.manNot Applicable60523-Mar-200605:17Not ApplicableNoneSP1QFE
Gdiplus.dll5.1.3102.28731,720,32023-Mar-200605:03x86SP2SP2QFE
Gdiplus.manNot Applicable39723-Mar-200605:15Not ApplicableSP2SP2QFE
Gdiplus.manNot Applicable60523-Mar-200605:15Not ApplicableNoneSP2QFE

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Technical support for Windows x64 editions

Your hardware manufacturer provides technical support and assistance for Microsoft Windows x64 editions. Your hardware manufacturer provides support because a Windows x64 edition was included with your hardware. Your hardware manufacturer might have customized the Windows x64 edition installation with unique components. Unique components might include specific device drivers or might include optional settings to maximize the performance of the hardware. Microsoft will provide reasonable-effort assistance if you need technical help with your Windows x64 edition. However, you might have to contact your manufacturer directly. Your manufacturer is best qualified to support the software that your manufacturer installed on the hardware.

For product information about Microsoft Windows XP Professional x64 Edition, visit the following Microsoft Web site: For product information about Microsoft Windows Server 2003 x64 editions, visit the following Microsoft Web site:

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Modification Type:MajorLast Reviewed:4/12/2006
Keywords:kbQFE kbExpertiseAdvanced kberrmsg kbHotfixServer KB915415 kbAudDeveloper