Gorgon
Show / Hide Table of Contents

Class GorgonPngEncodingOptions

Options used when encoding an image to a stream as a PNG file..

Inheritance
object
GorgonPngEncodingOptions
Implements
IGorgonWicEncodingOptions
IGorgonImageCodecEncodingOptions
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: Gorgon.Graphics.Imaging.Codecs
Assembly: Gorgon.Graphics.Imaging.dll
Syntax
public sealed class GorgonPngEncodingOptions : IGorgonWicEncodingOptions, IGorgonImageCodecEncodingOptions

Constructors

| Edit this page View Source

GorgonPngEncodingOptions()

Initializes a new instance of the GorgonPngEncodingOptions class.

Declaration
public GorgonPngEncodingOptions()

Properties

| Edit this page View Source

Dithering

Property to set or return the type of ImageDithering to use.

Declaration
public ImageDithering Dithering { get; set; }
Property Value
Type Description
ImageDithering
Remarks

This flag is used to determine which type of dithering algorithm should be used when converting the bit depth for a pixel format to a lower bit depth. If the pixel format of the image is supported natively by the codec, then this value will be ignored.

With dithering applied, the image will visually appear closer to the original by using patterns to simulate a greater number of colors.

The default value is None.

| Edit this page View Source

DpiX

Property to set or return the horizontal dots-per-inch for the encoded image.

Declaration
public double DpiX { get; set; }
Property Value
Type Description
double
Remarks

This information is metadata only, no action is taken with this value.

The default value is 72.

| Edit this page View Source

DpiY

Property to set or return the vertical dots-per-index for the encoded image.

Declaration
public double DpiY { get; set; }
Property Value
Type Description
double
Remarks

This information is metadata only, no action is taken with this value.

The default value is 72.

| Edit this page View Source

Filter

Property to set or return the type of filter to use when when compressing the PNG file.

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

The default value is DontCare.

| Edit this page View Source

Interlacing

Property to set or return whether to use interlacing when encoding an image as a PNG file.

Declaration
public bool Interlacing { get; set; }
Property Value
Type Description
bool
Remarks

The default value is false.

| Edit this page View Source

Options

Property to return the list of options available to the codec.

Declaration
public IGorgonOptionBag Options { get; }
Property Value
Type Description
IGorgonOptionBag

Implements

IGorgonWicEncodingOptions
IGorgonImageCodecEncodingOptions

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author