Image Transforms with the ASP.NET Generated Image Control

Posted by: 4GuysFromRolla.com Headlines, on 29 Apr 2009 | View original | Bookmarked: 0 time(s)

Last week's article - Dynamically Generating and Caching Images in ASP.NET with the GeneratedImage Control - looked at how to programmatically create and cache images on the fly using the GeneratedImage control, one of a suite of "Futures" technologies found in the ASP.NET Team's CodePlex site. Programmatically creating and displaying images entails the use of an HTTP Handler for generating the binary content of the dynamically-generated image. While this HTTP Handler can be implemented as an ASP.NET page, the GeneratedImage control includes the ImageHandler class, which serves as a base class for HTTP Handlers designed specifically to generate and serve dynamic images and includes built-in functionality for caching images on the client and/or web server. Last week's article illustrated both how to create an HTTP Handler for generating dynamic images (one that extended ImageHandler) as well as how to use the GeneratedImage Web control to display such dynamically-generated images in a web page.

In addition to its image generation and caching features, the ImageHandler class includes functionality for performing image transforms. An image transformation is a process that takes an image as input, modifies it in some way, and outputs the modified image. Common image transformations include image resizing, changing the image's color information (such as transforming a color image into a black and white one), and adding a watermark to the image. What's more, transformations can be chained together. For example, you could take an original image and feed in into the resize transformation. The output of the resize transformation could then be used as the input of the watermark transformation, which would then output the resized image with a watermark.

The GeneratedImage control ships with an image transform class that resizes the original image, as well as an ImageTransform class that serves as a base class for creating your own image transform classes. This article illustrates how to use resize dynamically-created images on the fly as well as how to create your own image transform classes. Read on to learn more!
Read More >

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: 1825 | Hits: 38

Similar Posts

  • Data-binding Telerik CoverFlow for Silverlight + some Routed Commands goodness more
  • Choose your preferred data layout with RadListView for ASP.NET AJAX more
  • Quick and painless Byte Array to Image converter for RadGridView for Silverlight more
  • Using Seadragon with ASP.NET MVC more
  • Ajax Control Toolkit: new controls, bug fixes more
  • Using Microsoft's Chart Controls In An ASP.NET Application: Programmatically Generating Chart Images more
  • Announcing the Microsoft AJAX CDN more
  • API changes introduced by the new CoverFlow control more
  • Watch out the flow is coming! Telerik CoverFlow for Silverlight 3 more
  • Using Microsoft's Chart Controls In An ASP.NET Application: Rendering the Chart 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