This documentation is for the old version. Go to the latest Graphics Mill docs

ColorAdjustmentProvider Class

This class contains methods and properties used by Bitmap to apply color adjustment.

Namespace: Aurigma.GraphicsMill
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

Visual Basic
Public Class ColorAdjustmentProvider _
	Inherits LockableObject
C#
public class ColorAdjustmentProvider : LockableObject

Remarks

This class enables you to apply tone and color correction algorithms on the bitmap without creating appropriate transform object (contained in Aurigma.GraphicsMill.Transforms namespace). Therefore you can write only single line of code to make a tone correction. For example, instead of this code:

Visual Basic
'... bitmap instantiation is omitted for brevity

Dim hsl As New Aurigma.GraphicsMill.Transforms.AdjustHsl
hsl.Hue = 0.1F
hsl.Saturation = -0.2F
hsl.Lightness = 0.1F
hsl.ApplyTransform(bitmap)
C#
//... bitmap instantiation is omitted for brevity

Aurigma.GraphicsMill.Transforms.AdjustHsl hsl = 
    new Aurigma.GraphicsMill.Transforms.AdjustHsl();
hsl.Hue = 0.1F;
hsl.Saturation = -0.2F;
hsl.Lightness = 0.1F;
hsl.ApplyTransform(bitmap);

you can just use this code:

Visual Basic
bitmap.ColorAdjustment.AdjustHsl(0.1F, -0.2F, 0.1F)
C#
bitmap.ColorAdjustment.AdjustHsl(0.1F, -0.2F, 0.1F);

The only drawback of this short syntax is that you can run transforms and effects through this class only in synchronous mode. If you need to use asynchronous mode, you should create transform class instances and set up the asynchronous mode settings for them.

Another difference of using of this class instead of transform objects is event handling. Unlike transform objects, you should assign event handlers directly to the Bitmap class.

Inheritance Hierarchy

System.Object
L Aurigma.GraphicsMill.LockableObject
L Aurigma.GraphicsMill.ColorAdjustmentProvider

Thread Safety

Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.

See Also

Reference