<PackageReference Include="System.Drawing.Common" Version="10.0.0-preview.2.25163.9" />

LevelsEffect

public class LevelsEffect : Effect
Adjusts the light, mid-tone, or dark areas of an image.
using Windows.Win32; using Windows.Win32.Graphics.GdiPlus; namespace System.Drawing.Imaging.Effects { public class LevelsEffect : Effect { private readonly LevelsParams _levelsParams; public int Highlight => _levelsParams.highlight; public int Midtone => _levelsParams.midtone; public int Shadow => _levelsParams.shadow; public LevelsEffect(int highlight, int midtone, int shadow) : base(PInvoke.LevelsEffectGuid) { _levelsParams = new LevelsParams { highlight = highlight, midtone = midtone, shadow = shadow }; SetParameters(ref _levelsParams); } } }