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
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: ASP.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 3544 | Hits: 275

Similar Posts

  • Silverlight: RadChart for Export to Image more
  • ASP.NET disk-based caching more
  • 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
  • Creating a folder inside the ZIP file with System.IO.Packaging more
  • When using LINQ to XML why dont I get results if I dont import a XML namespace (Daniel Walzenbach)? more
  • IIS 7 Error Pages taking over 500 Errors more
  • IIS 7 Compression. Good? Bad? How much? more
  • EOAST #4 Evolution of a software thingy Part 4 more
  • Linq-a-fi your file system by creating your own DSL more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | 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