Table of Contents

Class DrawImageExtensions

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

Adds extensions that allow the drawing of images to the Image<TPixel> type.

public static class DrawImageExtensions
Inheritance
DrawImageExtensions
Inherited Members

Methods

DrawImage(IImageProcessingContext, Image, GraphicsOptions)

Draws the given image together with the currently processing image by blending their pixels.

public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, GraphicsOptions options)

Parameters

source IImageProcessingContext

The current image processing context.

foreground Image

The image to draw on the currently processing image.

options GraphicsOptions

The options, including the blending type and blending amount.

Returns

IImageProcessingContext

The IImageProcessingContext.

DrawImage(IImageProcessingContext, Image, PixelColorBlendingMode, PixelAlphaCompositionMode, float)

Draws the given image together with the currently processing image by blending their pixels.

public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, PixelColorBlendingMode colorBlending, PixelAlphaCompositionMode alphaComposition, float opacity)

Parameters

source IImageProcessingContext

The current image processing context.

foreground Image

The image to draw on the currently processing image.

colorBlending PixelColorBlendingMode

The color blending mode.

alphaComposition PixelAlphaCompositionMode

The alpha composition mode.

opacity float

The opacity of the image to draw. Must be between 0 and 1.

Returns

IImageProcessingContext

The IImageProcessingContext.

DrawImage(IImageProcessingContext, Image, PixelColorBlendingMode, float)

Draws the given image together with the currently processing image by blending their pixels.

public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, PixelColorBlendingMode colorBlending, float opacity)

Parameters

source IImageProcessingContext

The current image processing context.

foreground Image

The image to draw on the currently processing image.

colorBlending PixelColorBlendingMode

The color blending mode.

opacity float

The opacity of the image to draw. Must be between 0 and 1.

Returns

IImageProcessingContext

The IImageProcessingContext.

DrawImage(IImageProcessingContext, Image, Point, GraphicsOptions)

Draws the given image together with the currently processing image by blending their pixels.

public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Point backgroundLocation, GraphicsOptions options)

Parameters

source IImageProcessingContext

The current image processing context.

foreground Image

The image to draw on the currently processing image.

backgroundLocation Point

The location on the currently processing image at which to draw.

options GraphicsOptions

The options containing the blend mode and opacity.

Returns

IImageProcessingContext

The IImageProcessingContext.

DrawImage(IImageProcessingContext, Image, Point, PixelColorBlendingMode, PixelAlphaCompositionMode, float)

Draws the given image together with the currently processing image by blending their pixels.

public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Point backgroundLocation, PixelColorBlendingMode colorBlending, PixelAlphaCompositionMode alphaComposition, float opacity)

Parameters

source IImageProcessingContext

The current image processing context.

foreground Image

The image to draw on the currently processing image.

backgroundLocation Point

The location on the currently processing image at which to draw.

colorBlending PixelColorBlendingMode

The color blending to apply.

alphaComposition PixelAlphaCompositionMode

The alpha composition mode.

opacity float

The opacity of the image to draw. Must be between 0 and 1.

Returns

IImageProcessingContext

The IImageProcessingContext.

DrawImage(IImageProcessingContext, Image, Point, PixelColorBlendingMode, float)

Draws the given image together with the currently processing image by blending their pixels.

public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Point backgroundLocation, PixelColorBlendingMode colorBlending, float opacity)

Parameters

source IImageProcessingContext

The current image processing context.

foreground Image

The image to draw on the currently processing image.

backgroundLocation Point

The location on the currently processing image at which to draw.

colorBlending PixelColorBlendingMode

The color blending to apply.

opacity float

The opacity of the image to draw. Must be between 0 and 1.

Returns

IImageProcessingContext

The IImageProcessingContext.

DrawImage(IImageProcessingContext, Image, Point, Rectangle, GraphicsOptions)

Draws the given image together with the currently processing image by blending their pixels.

public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Point backgroundLocation, Rectangle foregroundRectangle, GraphicsOptions options)

Parameters

source IImageProcessingContext

The current image processing context.

foreground Image

The image to draw on the currently processing image.

backgroundLocation Point

The location on the currently processing image at which to draw.

foregroundRectangle Rectangle

The rectangle structure that specifies the portion of the image to draw.

options GraphicsOptions

The options containing the blend mode and opacity.

Returns

IImageProcessingContext

The IImageProcessingContext.

DrawImage(IImageProcessingContext, Image, Point, Rectangle, PixelColorBlendingMode, PixelAlphaCompositionMode, float)

Draws the given image together with the currently processing image by blending their pixels.

public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Point backgroundLocation, Rectangle foregroundRectangle, PixelColorBlendingMode colorBlending, PixelAlphaCompositionMode alphaComposition, float opacity)

Parameters

source IImageProcessingContext

The current image processing context.

foreground Image

The image to draw on the currently processing image.

backgroundLocation Point

The location on the currently processing image at which to draw.

foregroundRectangle Rectangle

The rectangle structure that specifies the portion of the image to draw.

colorBlending PixelColorBlendingMode

The color blending to apply.

alphaComposition PixelAlphaCompositionMode

The alpha composition mode.

opacity float

The opacity of the image to draw. Must be between 0 and 1.

Returns

IImageProcessingContext

The IImageProcessingContext.

DrawImage(IImageProcessingContext, Image, Point, Rectangle, PixelColorBlendingMode, float)

Draws the given image together with the currently processing image by blending their pixels.

public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Point backgroundLocation, Rectangle foregroundRectangle, PixelColorBlendingMode colorBlending, float opacity)

Parameters

source IImageProcessingContext

The current image processing context.

foreground Image

The image to draw on the currently processing image.

backgroundLocation Point

The location on the currently processing image at which to draw.

foregroundRectangle Rectangle

The rectangle structure that specifies the portion of the image to draw.

colorBlending PixelColorBlendingMode

The color blending to apply.

opacity float

The opacity of the image to draw. Must be between 0 and 1.

Returns

IImageProcessingContext

The IImageProcessingContext.

DrawImage(IImageProcessingContext, Image, Point, Rectangle, float)

Draws the given image together with the currently processing image by blending their pixels.

public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Point backgroundLocation, Rectangle foregroundRectangle, float opacity)

Parameters

source IImageProcessingContext

The current image processing context.

foreground Image

The image to draw on the currently processing image.

backgroundLocation Point

The location on the currently processing image at which to draw.

foregroundRectangle Rectangle

The rectangle structure that specifies the portion of the image to draw.

opacity float

The opacity of the image to draw. Must be between 0 and 1.

Returns

IImageProcessingContext

The IImageProcessingContext.

DrawImage(IImageProcessingContext, Image, Point, float)

Draws the given image together with the currently processing image by blending their pixels.

public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Point backgroundLocation, float opacity)

Parameters

source IImageProcessingContext

The current image processing context.

foreground Image

The image to draw on the currently processing image.

backgroundLocation Point

The location on the currently processing image at which to draw.

opacity float

The opacity of the image to draw. Must be between 0 and 1.

Returns

IImageProcessingContext

The IImageProcessingContext.

DrawImage(IImageProcessingContext, Image, Rectangle, GraphicsOptions)

Draws the given image together with the currently processing image by blending their pixels.

public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Rectangle foregroundRectangle, GraphicsOptions options)

Parameters

source IImageProcessingContext

The current image processing context.

foreground Image

The image to draw on the currently processing image.

foregroundRectangle Rectangle

The rectangle structure that specifies the portion of the image to draw.

options GraphicsOptions

The options, including the blending type and blending amount.

Returns

IImageProcessingContext

The IImageProcessingContext.

DrawImage(IImageProcessingContext, Image, Rectangle, PixelColorBlendingMode, PixelAlphaCompositionMode, float)

Draws the given image together with the currently processing image by blending their pixels.

public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Rectangle foregroundRectangle, PixelColorBlendingMode colorBlending, PixelAlphaCompositionMode alphaComposition, float opacity)

Parameters

source IImageProcessingContext

The current image processing context.

foreground Image

The image to draw on the currently processing image.

foregroundRectangle Rectangle

The rectangle structure that specifies the portion of the image to draw.

colorBlending PixelColorBlendingMode

The color blending mode.

alphaComposition PixelAlphaCompositionMode

The alpha composition mode.

opacity float

The opacity of the image to draw. Must be between 0 and 1.

Returns

IImageProcessingContext

The IImageProcessingContext.

DrawImage(IImageProcessingContext, Image, Rectangle, PixelColorBlendingMode, float)

Draws the given image together with the currently processing image by blending their pixels.

public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Rectangle foregroundRectangle, PixelColorBlendingMode colorBlending, float opacity)

Parameters

source IImageProcessingContext

The current image processing context.

foreground Image

The image to draw on the currently processing image.

foregroundRectangle Rectangle

The rectangle structure that specifies the portion of the image to draw.

colorBlending PixelColorBlendingMode

The color blending mode.

opacity float

The opacity of the image to draw. Must be between 0 and 1.

Returns

IImageProcessingContext

The IImageProcessingContext.

DrawImage(IImageProcessingContext, Image, Rectangle, float)

Draws the given image together with the currently processing image by blending their pixels.

public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Rectangle foregroundRectangle, float opacity)

Parameters

source IImageProcessingContext

The current image processing context.

foreground Image

The image to draw on the currently processing image.

foregroundRectangle Rectangle

The rectangle structure that specifies the portion of the image to draw.

opacity float

The opacity of the image to draw. Must be between 0 and 1.

Returns

IImageProcessingContext

The IImageProcessingContext.

DrawImage(IImageProcessingContext, Image, float)

Draws the given image together with the currently processing image by blending their pixels.

public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, float opacity)

Parameters

source IImageProcessingContext

The current image processing context.

foreground Image

The image to draw on the currently processing image.

opacity float

The opacity of the image to draw. Must be between 0 and 1.

Returns

IImageProcessingContext

The IImageProcessingContext.