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
| Improve this Doc View SourceDrawImage(IImageProcessingContext, Image, GraphicsOptions)
Draws the given image together with the current one by blending their pixels.
Declaration
public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image image, GraphicsOptions options)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image this method extends. |
Image | image | The image to blend with the currently processing image. |
GraphicsOptions | options | The options, including the blending type and blending amount. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The Image<TPixel>. |
DrawImage(IImageProcessingContext, Image, PixelColorBlendingMode, PixelAlphaCompositionMode, Single)
Draws the given image together with the current one 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 image this method extends. |
Image | image | The image to blend with the currently processing image. |
PixelColorBlendingMode | colorBlending | The color blending mode. |
PixelAlphaCompositionMode | alphaComposition | The alpha composition mode. |
Single | opacity | The opacity of the image to blend. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The Image<TPixel>. |
DrawImage(IImageProcessingContext, Image, PixelColorBlendingMode, Single)
Draws the given image together with the current one 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 image this method extends. |
Image | image | The image to blend with the currently processing image. |
PixelColorBlendingMode | colorBlending | The blending mode. |
Single | opacity | The opacity of the image to blend. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The Image<TPixel>. |
DrawImage(IImageProcessingContext, Image, Point, GraphicsOptions)
Draws the given image together with the current one 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 image this method extends. |
Image | image | The image to blend with the currently processing image. |
Point | location | The location to draw the blended image. |
GraphicsOptions | options | The options containing the blend mode and opacity. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The Image<TPixel>. |
DrawImage(IImageProcessingContext, Image, Point, PixelColorBlendingMode, PixelAlphaCompositionMode, Single)
Draws the given image together with the current one 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 image this method extends. |
Image | image | The image to blend with the currently processing image. |
Point | location | The location to draw the blended image. |
PixelColorBlendingMode | colorBlending | The color blending to apply. |
PixelAlphaCompositionMode | alphaComposition | The alpha composition mode. |
Single | opacity | The opacity of the image to blend. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The Image<TPixel>. |
DrawImage(IImageProcessingContext, Image, Point, PixelColorBlendingMode, Single)
Draws the given image together with the current one 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 image this method extends. |
Image | image | The image to blend with the currently processing image. |
Point | location | The location to draw the blended image. |
PixelColorBlendingMode | colorBlending | The color blending to apply. |
Single | opacity | The opacity of the image to blend. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The Image<TPixel>. |
DrawImage(IImageProcessingContext, Image, Point, Single)
Draws the given image together with the current one 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 image this method extends. |
Image | image | The image to blend with the currently processing image. |
Point | location | The location to draw the blended image. |
Single | opacity | The opacity of the image to blend. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The Image<TPixel>. |
DrawImage(IImageProcessingContext, Image, Single)
Draws the given image together with the current one by blending their pixels.
Declaration
public static IImageProcessingContext DrawImage(this IImageProcessingContext source, Image image, float opacity)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image this method extends. |
Image | image | The image to blend with the currently processing image. |
Single | opacity | The opacity of the image to blend. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The Image<TPixel>. |