Common Problems with rendering Bitmaps into ASP.NET OutputStream

Posted by: Rick Strahls WebLog, on 20 Oct 2006 | View original

Raise your hand if youve loaded an image from a Resource (or a BLOB database field):   Bitmap bm2 = this.GetGlobalResourceObject("Resources", "_BitMap") as Bitmap; Response.ContentType = "image/jpeg"; bm2.Save(Response.OutputStream, ImageFormat.Jpeg); Response.End();   and finding out that you cant save the image! You get a not so happy error: A generic error occurred in GDI+. Description: An unhandled exception occurred during the execution of the current web request. Please review the...

Advertisement
The leading UI suite for ASP.NET - Telerik radControls
Outstanding performance. Full ASP.NET AJAX support. Nearly codeless development.

Similar Posts

  • Interesting bug in Saxon.NET/Mono/OSX usage more
  • Wondering where the latest build is more
  • AspAlliance Ideas more
  • ASPInsiders more

News Categories

.NET | ADO.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Community Server | dasBlog | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD