Gorgon
Show / Hide Table of Contents

Class GorgonGifDecodingOptions

Options used when decoding an image from a stream as a GIF file.

Inheritance
object
GorgonGifDecodingOptions
Implements
IGorgonWicDecodingOptions
IGorgonImageCodecDecodingOptions
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Gorgon.Graphics.Imaging.Codecs
Assembly: Gorgon.Graphics.Imaging.dll
Syntax
public class GorgonGifDecodingOptions : IGorgonWicDecodingOptions, IGorgonImageCodecDecodingOptions
Remarks

When decoding a GIF file into a GorgonImage, the Dithering property is ignored.

Constructors

| Edit this page View Source

GorgonGifDecodingOptions()

Initializes a new instance of the GorgonGifDecodingOptions class.

Declaration
public GorgonGifDecodingOptions()

Properties

| Edit this page View Source

AlphaThreshold

Property to set or return the alpha threshold percentage for this codec.

Declaration
public float AlphaThreshold { get; set; }
Property Value
Type Description
float
Remarks

Use this to determine what percentage of alpha channel values should be considered transparent for the GIF. A value of 0.5f will mean that colors with an alpha component less than 0.5f will be considered transparent.

This value does not apply to GIF files with multiple frames.

The default value is 0.0f.

| 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
| Edit this page View Source

Palette

Property to set or return a custom color palette to apply to the GIF file.

Declaration
public IList<GorgonColor> Palette { get; set; }
Property Value
Type Description
IList<GorgonColor>
Remarks

Use this to define a new palette for the 8 bit indexed image in the GIF file during decoding.

This value does not remap the pixel values to the corresponding palette color, therefore, palettes assigned to the image may not give the desired results without careful palette selection.

This value is ignored when the GIF file has multiple frames of animation.

The default value is an empty list.

| Edit this page View Source

ReadAllFrames

Property to set or return whether to read all frames from an image.

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

This property will tell the codec to decode multiple frames into an image array. Applications can then use that data to animate the GIF images.

This value is ignored if the GIF file contains only a single frame.

The default value is true.

Implements

IGorgonWicDecodingOptions
IGorgonImageCodecDecodingOptions

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