C# Class BlogEngine.Core.FileSystem.Image

image specific class, will contain the extra methods and properties of an image
Inheritance: System.IO.File
Afficher le fichier Open project: rasmuskl/ReSharperCourse

Méthodes publiques

Méthode Description
CropImage ( int x, int y, int width, int height ) : Image

Crops an image by giving the crop start x & y co-ordinates and then the height & width to crop to. Making a perfect rectangle of the crop area.

Image ( ) : System

ctor, property free constructor, initiates the this.Image(file) passing in a null file reference

Image ( File obj ) : System

ctor, copys all the properties from the file object into the new object.

ModifyImage ( ) : Image

accepts change requests for an image for rotate & flip

ResizeImage ( Size newSize ) : Image

resizes the image to a new size. The image will be replaced

ResizeImage ( decimal Percent ) : Image

resizes the image to a new size based on a percentage

This may not be exactly to the percent as we must maintain aspect ratios.

ResizeImageThumbnail ( int MaxSize, byte originalContents ) : byte[]

Private Methods

Méthode Description
ArrayToBmp ( byte inArray ) : Bitmap

converts a byte array to a bitmap

BmpToArray ( Bitmap bmp ) : byte[]

converts a bitmap to an array

resizeImage ( System imgToResize, Size size ) : Image

resizes an image to specific size

Method Details

CropImage() public méthode

Crops an image by giving the crop start x & y co-ordinates and then the height & width to crop to. Making a perfect rectangle of the crop area.
public CropImage ( int x, int y, int width, int height ) : Image
x int the x co-ordinate
y int the y co-ordinate
width int the width to crop
height int the height to crop
Résultat Image

Image() public méthode

ctor, property free constructor, initiates the this.Image(file) passing in a null file reference
public Image ( ) : System
Résultat System

Image() public méthode

ctor, copys all the properties from the file object into the new object.
public Image ( File obj ) : System
obj System.IO.File
Résultat System

ModifyImage() public méthode

accepts change requests for an image for rotate & flip
public ModifyImage ( ) : Image
Résultat Image

ResizeImage() public méthode

resizes the image to a new size. The image will be replaced
public ResizeImage ( Size newSize ) : Image
newSize System.Drawing.Size the new Size for the image
Résultat Image

ResizeImage() public méthode

resizes the image to a new size based on a percentage
This may not be exactly to the percent as we must maintain aspect ratios.
public ResizeImage ( decimal Percent ) : Image
Percent decimal
Résultat Image

ResizeImageThumbnail() public static méthode

public static ResizeImageThumbnail ( int MaxSize, byte originalContents ) : byte[]
MaxSize int
originalContents byte
Résultat byte[]