Class GorgonGifDecodingOptions
Options used when decoding an image from a stream as a GIF file.
Inherited Members
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 SourceGorgonGifDecodingOptions()
Initializes a new instance of the GorgonGifDecodingOptions class.
Declaration
public GorgonGifDecodingOptions()
Properties
| Edit this page View SourceAlphaThreshold
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.
Options
Property to return the list of options available to the codec.
Declaration
public IGorgonOptionBag Options { get; }
Property Value
Type | Description |
---|---|
IGorgonOptionBag |
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.
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.