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