[]
        
(Showing Draft Content)

C1.Win.Util.ImageRecolorer.BlendOverBackground

BlendOverBackground Method

BlendOverBackground(Bitmap, Color, Color)

Blends only the pixels matching the given targetColor against a specified background color, preserving all other pixels.

Declaration
public Bitmap BlendOverBackground(Bitmap srcImage, Color targetColor, Color background)
Parameters
Type Name Description
Bitmap srcImage

The source bitmap with alpha channel (must be Format32bppPArgb).

Color targetColor

The color to match.

Color background

The background color to blend the transparent pixels against

Returns
Type Description
Bitmap

A 32bpp image

Exceptions
Type Condition
ArgumentException

Thrown if the source bitmap is not in a supported 32bpp PARGB format.