Table of Contents

Class BrightnessExtensions

Namespace
SixLabors.ImageSharp.Processing
Assembly
SixLabors.ImageSharp.dll

Defines extensions that allow the alteration of the brightness component of an Image using Mutate/Clone.

public static class BrightnessExtensions
Inheritance
BrightnessExtensions
Inherited Members

Methods

Brightness(IImageProcessingContext, float)

Alters the brightness component of the image.

public static IImageProcessingContext Brightness(this IImageProcessingContext source, float amount)

Parameters

source IImageProcessingContext

The current image processing context.

amount float

The proportion of the conversion. Must be greater than or equal to 0.

Returns

IImageProcessingContext

The IImageProcessingContext.

Remarks

A value of 0 will create an image that is completely black. A value of 1 leaves the input unchanged. Other values are linear multipliers on the effect. Values of an amount over 1 are allowed, providing brighter results.

Brightness(IImageProcessingContext, float, Rectangle)

Alters the brightness component of the image.

public static IImageProcessingContext Brightness(this IImageProcessingContext source, float amount, Rectangle rectangle)

Parameters

source IImageProcessingContext

The current image processing context.

amount float

The proportion of the conversion. Must be greater than or equal to 0.

rectangle Rectangle

The Rectangle structure that specifies the portion of the image object to alter.

Returns

IImageProcessingContext

The IImageProcessingContext.

Remarks

A value of 0 will create an image that is completely black. A value of 1 leaves the input unchanged. Other values are linear multipliers on the effect. Values of an amount over 1 are allowed, providing brighter results.