C# Class AdaptiveImages.AdaptiveImageHandler

Inheritance: IHttpHandler
Datei anzeigen Open project: davemcdermid/AdaptiveImages

Public Methods

Method Description
AdaptiveImageHandler ( ) : System
ProcessRequest ( HttpContext context ) : void

Private Methods

Method Description
BrowserDetect ( HttpContext context ) : bool

Switch off mobile-first if browser is identifying as desktop

GenerateImage ( string source_file, string cache_file, int resolution ) : string

Generates a resized image at a specified resolution from the source_file and saves to the cache_file

GetEncoderForMimeType ( string mimeType ) : System.Drawing.Imaging.ImageCodecInfo

Return the ImageCodecInfo for a given mime-type

RefreshCache ( string source_file, string cache_file, int resolution ) : string

Deletes the cache_file if older than source_file

SendErrorImage ( HttpContext context, string message ) : void

Sends an image to the client with the specified message

SendImage ( HttpContext context, string filename, int browser_cache ) : void

Sends an image to the client with caching enabled

Method Details

AdaptiveImageHandler() public method

public AdaptiveImageHandler ( ) : System
return System

ProcessRequest() public method

public ProcessRequest ( HttpContext context ) : void
context System.Web.HttpContext
return void