Table of Contents

ImageTaskBase<T> Class

Definition

Namespace
GleamTech.ImageUltimate
Assembly
GleamTech.ImageUltimate.dll

This is a base class for internal use which cannot be instantiated. Use the derived ImageTask class instead.

public class ImageTaskBase<T> where T : ImageTaskBase<T>

Type Parameters

T
Inheritance
ImageTaskBase<T>
Derived

Methods

Blur(double)

Blurs the current image with the specified radius. The command is added to the chain and not executed until the actual processing is done.

Brightness(double)

Adjusts brightness of the current image by the given amount. The command is added to the chain and not executed until the actual processing is done.

BrightnessContrast(double, double)

Adjusts brightness and contrast of the current image by the given amounts simultaneously. The command is added to the chain and not executed until the actual processing is done.

Contrast(double)

Adjusts contrast of the current image by the given amount. The command is added to the chain and not executed until the actual processing is done.

Crop(int, int, int, int)

Crops the current image to the given coordinates and size. The command is added to the chain and not executed until the actual processing is done.

Crop(Rectangle)

Crops the current image to the given rectangle. The command is added to the chain and not executed until the actual processing is done.

Enhance()

Enhances the current image by adjusting colors and gamma automatically. The command is added to the chain and not executed until the actual processing is done.

FixOrientation()

Adjusts the current image so that its orientation is suitable for viewing (i.e. top-left orientation). The command is added to the chain and not executed until the actual processing is done. This command reads and resets the EXIF image profile setting 'Orientation' and then performs the appropriate 90 degree rotation on the image to orient the image, for correct viewing. When AutoFixOrientationEnabled is set to true, you don't need to call this method manually.

FlipHorizontal()

Flips the current image horizontally. The image will be mirrored from left to right. The command is added to the chain and not executed until the actual processing is done.

FlipVertical()

Flips the current image vertically. The image will be mirrored from top to bottom. The command is added to the chain and not executed until the actual processing is done.

LiquidResize(int, int, ResizeMode)

Resizes the current image to the given dimensions in content-aware manner (seam carving). The command is added to the chain and not executed until the actual processing is done.

RemoveMetadata()

Removes all metadata like EXIF, IPTC, XMP fields, clipping paths, color profiles, comments and PNG chunks from the current image. This is always called automatically when using ImageWebTask as image metadata can be a privacy problem for online images. The command is added to the chain and not executed until the actual processing is done.

Resize(int, int, ResizeMode)

Resizes the current image to the given dimensions. The command is added to the chain and not executed until the actual processing is done.

ResizeHeight(int, ResizeMode)

Resizes the current image to the given height while preserving the aspect ratio. This is a shortcut to calling Resize(int, int, ResizeMode) method with 0 for width value. The command is added to the chain and not executed until the actual processing is done.

ResizeWidth(int, ResizeMode)

Resizes the current image to the given width while preserving the aspect ratio. This is a shortcut to calling Resize(int, int, ResizeMode) method with 0 for height value. The command is added to the chain and not executed until the actual processing is done.

Rotate(double, Color?)

Rotates the current image by the given angle. The command is added to the chain and not executed until the actual processing is done.

Sharpen(double)

Sharpens the current image with the specified radius. The command is added to the chain and not executed until the actual processing is done.

Thumbnail(int, int)

Smartly generates a thumbnail from the current image. This method is optimized for thumbnails so you should prefer it over Resize(int, int, ResizeMode), ResizeWidth(int, ResizeMode) or ResizeHeight(int, ResizeMode) methods. This command should be the first one in the chain. Most image formats (Jpg, Tiff, Psd and Camera Raw files) can have EXIF thumbnails so this method will first try to read that image from EXIF metadata, remove black stripes above and below it and resize it down further if needed. This will ensure very fast performance when your whole purpose is generating thumbnails. Only if there is no thumbnail in metadata or the thumbnail is smaller than the requested size, the thumbnail will be created by resizing the original image as usual. EXIF thumbnails are typically in size 160x120.

TrimBorders(Color, double)

Trims the borders of a specific color around the current image. The command is added to the chain and not executed until the actual processing is done.

TrimBorders(double)

Trims the borders of any color around the current image. The command is added to the chain and not executed until the actual processing is done.