Streaming a PNG file into Response.OutputStream?

Posted by: Rick Strahls WebLog, on 14 Jun 2006 | View original | Bookmarked: 0 time(s)

Hmmm… I’m working on an HTTP handler that is returning an image as its end result. The image generation works fine and a generic routine returns a Bitmap image as a result. Finally I write out the image like this:   Bitmap bmp = wwWebUtils.CornerImage(backcolor, color, c, Radius, Height, Width);   // *** Works: //bmp.Save(@"c:\projects2005\wwStore\corner.png", ImageFormat.Png);         // *** Doesn’t work Response.ContentType = "image/png"; bmp.Save(Response.OutputStream,ImageFormat.Png);   This...

Advertisement
Category: ASP.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 2536 | Hits: 253

Similar Posts

  • How to download Internet Explorer 8 for Windows 7 E without any Web browser? more
  • Using the RadFileExplorer for ASP.NET AJAX in a MOSS web application more
  • IIS 7 Error Pages taking over 500 Errors more
  • IIS 7 Compression. Good? Bad? How much? more
  • When using LINQ to XML why dont I get results if I dont import a XML namespace (Daniel Walzenbach)? more
  • Creating a folder inside the ZIP file with System.IO.Packaging more
  • ASP.NET disk-based caching more
  • Silverlight: RadChart for Export to Image more
  • Compressing JS files as part of your build process more
  • Retrieve File Contents using SQL Server 2005 SQL CLR 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