C# Class Rock.Utility.FileUtilities

Mostra file Open project: NewSpring/Rock

Public Methods

Method Description
GetFileContentStream ( System.Web.HttpPostedFile uploadedFile, bool resizeIfImage = true ) : Stream

Gets the file bytes.

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

GetFileContentStream() public static method

Gets the file bytes.
public static GetFileContentStream ( System.Web.HttpPostedFile uploadedFile, bool resizeIfImage = true ) : Stream
uploadedFile System.Web.HttpPostedFile The uploaded file.
resizeIfImage bool if set to true [resize if image].
return Stream