BitmapImage.SetPixel(Int32, Int32, Color) Method

Definition

Sets pixel at specific position

C#
public abstract void SetPixel (int x, int y, System.Drawing.Color color);

Parameters

x
Int32

X coordinate of the pixel

y
Int32

Y coordinate of the pixel

color
Color

Color to set the pixel to

Remarks

The use of SetPixel(Int32, Int32, Color) and GetPixel(Int32, Int32) is usually slow. For fast image updates, grab the underlying raw buffer by calling AsByteSpan() or use the GetDrawingApi() method and use high-level drawing functions.

Applies to

Produkt Verzie
.NET IoT Libraries 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 2.0.0, 2.1.0, 2.2.0