Search Results for

    Show / Hide Table of Contents

    Class PngIndexedEncoderOptions

    Indexed color PNG encoder options.

    Inheritance
    System.Object
    PngIndexedEncoderOptions
    Implements
    IPngEncoderOptions
    IIndexedEncoderOptions
    IEncoderOptions
    System.IEquatable<PngIndexedEncoderOptions>
    Namespace: PhotoSauce.MagicScaler
    Assembly: PhotoSauce.MagicScaler.dll
    Syntax
    public sealed class PngIndexedEncoderOptions : ValueType, IPngEncoderOptions, IIndexedEncoderOptions, IEncoderOptions

    Constructors

    PngIndexedEncoderOptions(Int32, Int32[], DitherMode, PngFilter, Boolean)

    Indexed color PNG encoder options.

    Declaration
    public PngIndexedEncoderOptions(int MaxPaletteSize, int[] PredefinedPalette, DitherMode Dither, PngFilter Filter, bool Interlace)
    Parameters
    Type Name Description
    System.Int32 MaxPaletteSize

    The maximum number of entries in the target palette. Actual palette may have fewer entries if the image contains fewer colors.

    System.Int32[] PredefinedPalette

    The palette to use when quantizing the image. If null, a custom palette will be created from the image.

    DitherMode Dither

    Controls dithering when palette has fewer colors than the image.

    PngFilter Filter

    The PngFilter to apply to the image before compression.

    System.Boolean Interlace

    True to enable interlaced PNG output, otherwise false.

    Properties

    Default

    Default indexed color PNG encoder options.

    Declaration
    public static PngIndexedEncoderOptions Default { get; }
    Property Value
    Type Description
    PngIndexedEncoderOptions

    Dither

    Controls dithering when palette has fewer colors than the image.

    Declaration
    public DitherMode Dither { get; set; }
    Property Value
    Type Description
    DitherMode

    Filter

    The PngFilter to apply to the image before compression.

    Declaration
    public PngFilter Filter { get; set; }
    Property Value
    Type Description
    PngFilter

    Interlace

    True to enable interlaced PNG output, otherwise false.

    Declaration
    public bool Interlace { get; set; }
    Property Value
    Type Description
    System.Boolean

    MaxPaletteSize

    The maximum number of entries in the target palette. Actual palette may have fewer entries if the image contains fewer colors.

    Declaration
    public int MaxPaletteSize { get; set; }
    Property Value
    Type Description
    System.Int32

    PredefinedPalette

    The palette to use when quantizing the image. If null, a custom palette will be created from the image.

    Declaration
    public int[] PredefinedPalette { get; set; }
    Property Value
    Type Description
    System.Int32[]

    Methods

    Deconstruct(out Int32, out Int32[], out DitherMode, out PngFilter, out Boolean)

    Declaration
    public void Deconstruct(out int MaxPaletteSize, out int[] PredefinedPalette, out DitherMode Dither, out PngFilter Filter, out bool Interlace)
    Parameters
    Type Name Description
    System.Int32 MaxPaletteSize
    System.Int32[] PredefinedPalette
    DitherMode Dither
    PngFilter Filter
    System.Boolean Interlace

    Equals(PngIndexedEncoderOptions)

    Declaration
    public bool Equals(PngIndexedEncoderOptions other)
    Parameters
    Type Name Description
    PngIndexedEncoderOptions other
    Returns
    Type Description
    System.Boolean

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    Operators

    Equality(PngIndexedEncoderOptions, PngIndexedEncoderOptions)

    Declaration
    public static bool operator ==(PngIndexedEncoderOptions left, PngIndexedEncoderOptions right)
    Parameters
    Type Name Description
    PngIndexedEncoderOptions left
    PngIndexedEncoderOptions right
    Returns
    Type Description
    System.Boolean

    Inequality(PngIndexedEncoderOptions, PngIndexedEncoderOptions)

    Declaration
    public static bool operator !=(PngIndexedEncoderOptions left, PngIndexedEncoderOptions right)
    Parameters
    Type Name Description
    PngIndexedEncoderOptions left
    PngIndexedEncoderOptions right
    Returns
    Type Description
    System.Boolean

    Implements

    IPngEncoderOptions
    IIndexedEncoderOptions
    IEncoderOptions
    System.IEquatable<>
    In This Article
    Back to top Copyright © 2022 Clinton Ingram
    Generated with DocFX