C# Class RockWeb.ImageUploader

Handles retrieving file data from storage
Inheritance: FileUploader
Show file Open project: CentralAZ/Rockit-CentralAZ

Public Methods

Method Description
GetFileBytes ( HttpContext context, System.Web.HttpPostedFile uploadedFile ) : byte[]

Gets the file bytes.

ValidateFileType ( HttpContext context, System.Web.HttpPostedFile uploadedFile ) : void

Validates the type of the file.

Private Methods

Method Description
ContentTypeToImageFormat ( string contentType ) : ImageFormat

Returns the ImageFormat for the given ContentType string. Throws NotSupportedException if given an unknown/unsupported content type.

OrientationToFlipType ( string orientation ) : RotateFlipType

Orientations the type of to flip.

ResizeImage ( Image imgToResize, Size size ) : Image

Resizes the image.

RoughResize ( Bitmap input, int maxWidth, int maxHeight ) : Bitmap

Roughes the resize.

Method Details

GetFileBytes() public method

Gets the file bytes.
public GetFileBytes ( HttpContext context, System.Web.HttpPostedFile uploadedFile ) : byte[]
context System.Web.HttpContext The context.
uploadedFile System.Web.HttpPostedFile The uploaded file.
return byte[]

ValidateFileType() public method

Validates the type of the file.
Filetype now allowed
public ValidateFileType ( HttpContext context, System.Web.HttpPostedFile uploadedFile ) : void
context System.Web.HttpContext The context.
uploadedFile System.Web.HttpPostedFile The uploaded file.
return void