Class DrawImageExtensions
Adds extensions that allow the drawing of images to the Image<TPixel> type.
Inherited Members
Namespace: SixLabors.ImageSharp.Processing
Assembly: SixLabors.ImageSharp.dll
Syntax
public static class DrawImageExtensions
Methods
| Edit this page View SourceDrawImage(IImageProcessingContext, Image, GraphicsOptions)
Draws the given image together with the currently processing image by blending their pixels.
Declaration
public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, GraphicsOptions options)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The current image processing context. |
Image | foreground | The image to draw on the currently processing image. |
GraphicsOptions | options | The options, including the blending type and blending amount. |
Returns
Type | Description |
---|---|
IImageProcessingContext |
DrawImage(IImageProcessingContext, Image, PixelColorBlendingMode, PixelAlphaCompositionMode, float)
Draws the given image together with the currently processing image by blending their pixels.
Declaration
public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, PixelColorBlendingMode colorBlending, PixelAlphaCompositionMode alphaComposition, float opacity)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The current image processing context. |
Image | foreground | The image to draw on the currently processing image. |
PixelColorBlendingMode | colorBlending | The color blending mode. |
PixelAlphaCompositionMode | alphaComposition | The alpha composition mode. |
float | opacity | The opacity of the image to draw. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
IImageProcessingContext |
DrawImage(IImageProcessingContext, Image, PixelColorBlendingMode, float)
Draws the given image together with the currently processing image by blending their pixels.
Declaration
public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, PixelColorBlendingMode colorBlending, float opacity)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The current image processing context. |
Image | foreground | The image to draw on the currently processing image. |
PixelColorBlendingMode | colorBlending | The color blending mode. |
float | opacity | The opacity of the image to draw. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
IImageProcessingContext |
DrawImage(IImageProcessingContext, Image, Point, GraphicsOptions)
Draws the given image together with the currently processing image by blending their pixels.
Declaration
public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Point backgroundLocation, GraphicsOptions options)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The current image processing context. |
Image | foreground | The image to draw on the currently processing image. |
Point | backgroundLocation | The location on the currently processing image at which to draw. |
GraphicsOptions | options | The options containing the blend mode and opacity. |
Returns
Type | Description |
---|---|
IImageProcessingContext |
DrawImage(IImageProcessingContext, Image, Point, PixelColorBlendingMode, PixelAlphaCompositionMode, float)
Draws the given image together with the currently processing image by blending their pixels.
Declaration
public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Point backgroundLocation, PixelColorBlendingMode colorBlending, PixelAlphaCompositionMode alphaComposition, float opacity)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The current image processing context. |
Image | foreground | The image to draw on the currently processing image. |
Point | backgroundLocation | The location on the currently processing image at which to draw. |
PixelColorBlendingMode | colorBlending | The color blending to apply. |
PixelAlphaCompositionMode | alphaComposition | The alpha composition mode. |
float | opacity | The opacity of the image to draw. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
IImageProcessingContext |
DrawImage(IImageProcessingContext, Image, Point, PixelColorBlendingMode, float)
Draws the given image together with the currently processing image by blending their pixels.
Declaration
public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Point backgroundLocation, PixelColorBlendingMode colorBlending, float opacity)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The current image processing context. |
Image | foreground | The image to draw on the currently processing image. |
Point | backgroundLocation | The location on the currently processing image at which to draw. |
PixelColorBlendingMode | colorBlending | The color blending to apply. |
float | opacity | The opacity of the image to draw. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
IImageProcessingContext |
DrawImage(IImageProcessingContext, Image, Point, Rectangle, GraphicsOptions)
Draws the given image together with the currently processing image by blending their pixels.
Declaration
public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Point backgroundLocation, Rectangle foregroundRectangle, GraphicsOptions options)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The current image processing context. |
Image | foreground | The image to draw on the currently processing image. |
Point | backgroundLocation | The location on the currently processing image at which to draw. |
Rectangle | foregroundRectangle | The rectangle structure that specifies the portion of the image to draw. |
GraphicsOptions | options | The options containing the blend mode and opacity. |
Returns
Type | Description |
---|---|
IImageProcessingContext |
DrawImage(IImageProcessingContext, Image, Point, Rectangle, PixelColorBlendingMode, PixelAlphaCompositionMode, float)
Draws the given image together with the currently processing image by blending their pixels.
Declaration
public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Point backgroundLocation, Rectangle foregroundRectangle, PixelColorBlendingMode colorBlending, PixelAlphaCompositionMode alphaComposition, float opacity)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The current image processing context. |
Image | foreground | The image to draw on the currently processing image. |
Point | backgroundLocation | The location on the currently processing image at which to draw. |
Rectangle | foregroundRectangle | The rectangle structure that specifies the portion of the image to draw. |
PixelColorBlendingMode | colorBlending | The color blending to apply. |
PixelAlphaCompositionMode | alphaComposition | The alpha composition mode. |
float | opacity | The opacity of the image to draw. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
IImageProcessingContext |
DrawImage(IImageProcessingContext, Image, Point, Rectangle, PixelColorBlendingMode, float)
Draws the given image together with the currently processing image by blending their pixels.
Declaration
public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Point backgroundLocation, Rectangle foregroundRectangle, PixelColorBlendingMode colorBlending, float opacity)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The current image processing context. |
Image | foreground | The image to draw on the currently processing image. |
Point | backgroundLocation | The location on the currently processing image at which to draw. |
Rectangle | foregroundRectangle | The rectangle structure that specifies the portion of the image to draw. |
PixelColorBlendingMode | colorBlending | The color blending to apply. |
float | opacity | The opacity of the image to draw. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
IImageProcessingContext |
DrawImage(IImageProcessingContext, Image, Point, Rectangle, float)
Draws the given image together with the currently processing image by blending their pixels.
Declaration
public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Point backgroundLocation, Rectangle foregroundRectangle, float opacity)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The current image processing context. |
Image | foreground | The image to draw on the currently processing image. |
Point | backgroundLocation | The location on the currently processing image at which to draw. |
Rectangle | foregroundRectangle | The rectangle structure that specifies the portion of the image to draw. |
float | opacity | The opacity of the image to draw. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
IImageProcessingContext |
DrawImage(IImageProcessingContext, Image, Point, float)
Draws the given image together with the currently processing image by blending their pixels.
Declaration
public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Point backgroundLocation, float opacity)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The current image processing context. |
Image | foreground | The image to draw on the currently processing image. |
Point | backgroundLocation | The location on the currently processing image at which to draw. |
float | opacity | The opacity of the image to draw. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
IImageProcessingContext |
DrawImage(IImageProcessingContext, Image, Rectangle, GraphicsOptions)
Draws the given image together with the currently processing image by blending their pixels.
Declaration
public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Rectangle foregroundRectangle, GraphicsOptions options)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The current image processing context. |
Image | foreground | The image to draw on the currently processing image. |
Rectangle | foregroundRectangle | The rectangle structure that specifies the portion of the image to draw. |
GraphicsOptions | options | The options, including the blending type and blending amount. |
Returns
Type | Description |
---|---|
IImageProcessingContext |
DrawImage(IImageProcessingContext, Image, Rectangle, PixelColorBlendingMode, PixelAlphaCompositionMode, float)
Draws the given image together with the currently processing image by blending their pixels.
Declaration
public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Rectangle foregroundRectangle, PixelColorBlendingMode colorBlending, PixelAlphaCompositionMode alphaComposition, float opacity)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The current image processing context. |
Image | foreground | The image to draw on the currently processing image. |
Rectangle | foregroundRectangle | The rectangle structure that specifies the portion of the image to draw. |
PixelColorBlendingMode | colorBlending | The color blending mode. |
PixelAlphaCompositionMode | alphaComposition | The alpha composition mode. |
float | opacity | The opacity of the image to draw. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
IImageProcessingContext |
DrawImage(IImageProcessingContext, Image, Rectangle, PixelColorBlendingMode, float)
Draws the given image together with the currently processing image by blending their pixels.
Declaration
public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Rectangle foregroundRectangle, PixelColorBlendingMode colorBlending, float opacity)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The current image processing context. |
Image | foreground | The image to draw on the currently processing image. |
Rectangle | foregroundRectangle | The rectangle structure that specifies the portion of the image to draw. |
PixelColorBlendingMode | colorBlending | The color blending mode. |
float | opacity | The opacity of the image to draw. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
IImageProcessingContext |
DrawImage(IImageProcessingContext, Image, Rectangle, float)
Draws the given image together with the currently processing image by blending their pixels.
Declaration
public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, Rectangle foregroundRectangle, float opacity)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The current image processing context. |
Image | foreground | The image to draw on the currently processing image. |
Rectangle | foregroundRectangle | The rectangle structure that specifies the portion of the image to draw. |
float | opacity | The opacity of the image to draw. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
IImageProcessingContext |
DrawImage(IImageProcessingContext, Image, float)
Draws the given image together with the currently processing image by blending their pixels.
Declaration
public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image foreground, float opacity)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The current image processing context. |
Image | foreground | The image to draw on the currently processing image. |
float | opacity | The opacity of the image to draw. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
IImageProcessingContext |