SetPalette

EmfImage.SetPalette method

Enhance your image’s color palette by setting it with the specified IColorPalette. Achieve vivid, vibrant visuals with ease, ensuring your images stand out and captivate viewers. Ideal for optimizing color schemes and achieving the perfect look for your projects.

public override void SetPalette(IColorPalette palette, bool updateColors)
ParameterTypeDescription
paletteIColorPaletteThe palette to set.
updateColorsBooleanif set to true colors will be updated according to the new palette; otherwise color indexes remain unchanged. Note that unchanged indexes may crash the image on loading if some indexes have no corresponding palette entries.

Exceptions

exceptioncondition
NotImplementedExceptionInvalid for vector images

See Also