C# Class Argentini.Halide.H3Image

The H3Image class contains methods and properties for performing or evaluating bitmap image operations.
Show file Open project: argentini/Halide

Public Methods

Method Description
ResizeImage ( string imageSavePath, int quality, int maxWidth, int maxHeight, string path ) : String

Resize an image on disk, constraining proportions (handles BMP, JPEG, GIF, TIFF, PNG); maintains transparency of PNG images. Filenames determine file types used automatically.

ResizeImage ( string imageSavePath, int quality, int maxWidth, int maxHeight, string path, Rectangle cropArea ) : String

Resize an image on disk, constraining proportions (handles BMP, JPEG, GIF, TIFF, PNG); maintains transparency of PNG images. Filenames determine file types used automatically.

Private Methods

Method Description
CropImage ( string path, int Width, int Height, int Left, int Top ) : Image

Load an image from disk and crop, returning cropped System.Drawing.Image object.

H3Image ( ) : System

Method Details

ResizeImage() public static method

Resize an image on disk, constraining proportions (handles BMP, JPEG, GIF, TIFF, PNG); maintains transparency of PNG images. Filenames determine file types used automatically.
public static ResizeImage ( string imageSavePath, int quality, int maxWidth, int maxHeight, string path ) : String
imageSavePath string Web-style path with filename for the final resized image.
quality int Quality setting from 1 to 100 (for JPEG only; 0 for other types).
maxWidth int How wide to make the image, constraining the aspect ratio (0 ignore this param). /// Only one "Max" property can be used at a time - set the other to a zero.
maxHeight int How tall to make the image, constraining the aspect ratio (0 ignore this param).
path string Web-style path to the source image file.
return String

ResizeImage() public static method

Resize an image on disk, constraining proportions (handles BMP, JPEG, GIF, TIFF, PNG); maintains transparency of PNG images. Filenames determine file types used automatically.
public static ResizeImage ( string imageSavePath, int quality, int maxWidth, int maxHeight, string path, Rectangle cropArea ) : String
imageSavePath string Web-style path with filename for the final resized image.
quality int Quality setting from 1 to 100 (for JPEG only; 0 for other types).
maxWidth int How wide to make the image, constraining the aspect ratio (0 ignore this param). /// Only one "Max" property can be used at a time - set the other to a zero.
maxHeight int How tall to make the image, constraining the aspect ratio (0 ignore this param).
path string Web-style path to the source image file.
cropArea System.Drawing.Rectangle Rectangle object (left, top, width, height) to crop image. Leave out for no cropping.
return String