TODO: remove support for transparency until it's understood better? Class AnimatedGifEncoder - Encodes a GIF file consisting of one or more frames. Instantiate the encoder using the constructor, call the AddFrame to add as many GifFrames as desired, then call the WriteToStream or WriteToFile method to create the animation. No copyright asserted on the source code of this class. May be used for any purpose, however, refer to the Unisys LZW patent for restrictions on use of the associated LZWEncoder class. Please forward any corrections to email@example.com. @author Kevin Weiner, FM Software @version 1.03 November 2003 Modified by Phil Garcia (firstname.lastname@example.org) 1. Add support to output the Gif to a MemoryStream (9/2/2005) Modified by Simon Bridewell, June-August 2009: Downloaded from http://www.thinkedge.com/BlogEngine/file.axd?file=NGif_src2.zip * Corrected FxCop code analysis errors. * Documentation comments converted to .net XML comments. * Refactored so that all properties are set in the constructor. * Writing of GIF components to the output stream delegated to the classes for those components. * Added option to use a global colour table instead of local colour tables. * Added support for colour tables with fewer than 256 colours * Colour quantization only performed for animations with more than 256 colours.
GifComponents (Module: GifComponents) Version: 0.1.3594.26453
Default constructor. Sets repeat count to 0 (repeat indefinitely) Sets colour table strategy to UseGlobal Sets image quantization quality to 10. Screen size defaults to size of first frame.
Adds a frame to the animation.
Sets quality of color quantization (conversion of images to the maximum 256 colors allowed by the GIF specification). Lower values (minimum = 1) produce better colors, but slow processing significantly. 10 is the default, and produces good color mapping at reasonable speeds. Values greater than 20 do not yield significant improvements in speed. Defaults to 1 if less than 1.
Indicates whether the animation will contain a single global colour table for all frames (UseGlobal) or a local colour table for each frame (UseLocal)
Gets the status of this component, consisting of its error state and any associated error message.(Inherited from GifComponent.)
Gets the combined error states of this component and all its child components.(Inherited from GifComponent.)
Gets any error message associated with the component's error state.(Inherited from GifComponent.)
Gets the member of the Gif.Components.ErrorState enumeration held within the ComponentStatus property.(Inherited from GifComponent.)
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.(Inherited from Object.)
Serves as a hash function for a particular type. GetHashCode()()() is suitable for use in hashing algorithms and data structures like a hash table.(Inherited from Object.)
Gets the Type of the current instance.(Inherited from Object.)
The size, in pixels, of the animated GIF file. If this property is not set before the animation is encoder, the size of the first frame to be added will be used.
Creates a shallow copy of the current Object.(Inherited from Object.)
The number of times to repeat the animation. 0 to repeat indefinitely. -1 to not repeat. Defaults to -1 if less than -1.
Sets the ComponentStatus property of thie GifComponent.(Inherited from GifComponent.)
Tests whether the error state of this component or any of its member components contains the supplied member of the ErrorState enumeration.(Inherited from GifComponent.)
Gets a string representation of the error status of this component and its subcomponents.(Inherited from GifComponent.)
Gets and sets the transparent color for the next added frame and any subsequent frames. Since all colors are subject to modification in the quantization process, the color in the final palette for each frame closest to the given color becomes the transparent color for that frame. May be set to Color.Empty to indicate no transparent color.
Writes an animated GIF file to the supplied file name.
Writes the GIF animation to the supplied stream.(Overrides GifComponent.WriteToStream(Stream).)