- Aurigma Graphics Mill 5.5 for .NET
- Introduction
- What's New?
- Overview of Features
- Getting Started
- Programming with Graphics Mill for .NET
- File Formats
- Graphics Mill for .NET Add-ons
- Class Library Reference
- Aurigma.GraphicsMill Namespace
- Aurigma.GraphicsMill.AjaxControls Namespace
- Aurigma.GraphicsMill.AjaxControls.VectorObjects Namespace
- Aurigma.GraphicsMill.AjaxControls.VectorObjects.Math Namespace
- Aurigma.GraphicsMill.AjaxControls.VectorObjects.RedoUndo Namespace
- Aurigma.GraphicsMill.Codecs Namespace
- AdobeResourceBlock Class
- AdobeResourceDictionary Class
- AdvancedPsdFrame Class
- AdvancedPsdReader Class
- AdvancedPsdTextFrame Class
- AsfIndexer Class
- AviAlphaTransition Class
- AviAudioManager Class
- AviCompressor Class
- AviCustomTransition Class
- AviDrawTransitionEventArgs Class
- AviDrawTransitionEventHandler Delegate
- AviDrawWatermarkEventArgs Class
- AviDrawWatermarkEventHandler Delegate
- AviEncoderOptions Class
- AviFrame Class
- AviReader Class
- AviStripesTransition Class
- AviStripesTransitionMode Enumeration
- AviTimerStyle Enumeration
- AviTransition Class
- AviWatermark Class
- AviWriter Class
- BmpEncoderOptions Class
- BmpFrame Class
- BmpReader Class
- BmpWriter Class
- CompressionType Enumeration
- CustomEncoderOptions Class
- CustomFormatReader Class
- CustomFormatReader.LoadingMode Enumeration
- CustomFormatWriter Class
- CustomFrame Class
- DisposalMethod Enumeration
- DSEncoderOptions Class
- DSFrame Class
- DSPreLoadedFrame Class
- DSReader Class
- EncoderOptions Class
- ExifDictionary Class
- ExifItemInfo Structure
- FormatManager Class
- FormatReader Class
- FormatWriter Class
- Frame Class
- GifEncoderOptions Class
- GifFrame Class
- GifReader Class
- GifWriter Class
- ID3LyricsContentType Enumeration
- ID3LyricsTimestampFormat Enumeration
- ID3SynchronisedLyrics Class
- IEncoderOptions Interface
- IFormatInfo Interface
- IFormatReader Interface
- IFormatWriter Interface
- IFrame Interface
- IFrameEnumerator Interface
- IMediaProcessorMetadataReadSupport Interface
- IMetadataReadSupport Interface
- IMetadataWriteSupport Interface
- IptcDictionary Class
- ITimeReader Interface
- ITimeWriter Interface
- IXmpDictionary Interface
- Jpeg2kEncoderOptions Class
- Jpeg2kFrame Class
- Jpeg2kProgressionOrder Enumeration
- Jpeg2kReader Class
- Jpeg2kWriter Class
- JpegAlignToSampleSizeMode Enumeration
- JpegEncoderOptions Class
- JpegFrame Class
- JpegMarkerException Class
- JpegReader Class
- JpegWriter Class
- LosslessJpegTransform Class
- MediaCorruptedException Class
- MediaFormatManager Class
- MediaProcessorMetadataDictionary Class
- MediaProviderException Class
- MediaUnsupportedException Class
- MetadataDictionary Class
- MetadataEnumerator Class
- MultiFrameException Class
- PcxEncoderOptions Class
- PcxFrame Class
- PcxReader Class
- PdfEncoderOptions Class
- PdfFrame Class
- PdfWriter Class
- PngEncoderOptions Class
- PngFrame Class
- PngReader Class
- PngWriter Class
- PreLoadedFrame Class
- PsdEncoderOptions Class
- PsdFrame Class
- PsdFrameType Enumeration
- PsdReader Class
- PsdTextJustification Enumeration
- QTEncoderOptions Class
- QTFrame Class
- QTReader Class
- SwfEncoderOptions Class
- SwfFrame Class
- SwfWriter Class
- TiffChannelType Enumeration
- TiffEncoderOptions Class
- TiffExtraChannel Class
- TiffExtraChannelCollection Class
- TiffFrame Class
- TiffReader Class
- TiffWriter Class
- WbmpEncoderOptions Class
- WbmpFrame Class
- WbmpReader Class
- WbmpWriter Class
- WMEncoderOptions Class
- WMFrame Class
- WMPreLoadedFrame Class
- WMReader Class
- XmpArrayNode Class
- XmpData Class
- XmpDictionaryNode Class
- XmpLocalizedTextItemNode Class
- XmpLocalizedTextNode Class
- XmpNamespace Class
- XmpNode Class
- XmpNodeType Enumeration
- XmpStructNode Class
- XmpTagNames Class
- XmpValueNode Class
- Aurigma.GraphicsMill.Drawing Namespace
- Aurigma.GraphicsMill.Licensing Namespace
- Aurigma.GraphicsMill.Transforms Namespace
- Aurigma.GraphicsMill.WebControls Namespace
- Aurigma.GraphicsMill.WinControls Namespace
- GraphicsMill Namespace (Client Class Library)
- Aurigma.GraphicsMill.AjaxControls Namespace (Client Class Library)
- Aurigma.GraphicsMill.AjaxControls.VectorObjects Namespace (Client Class Library)
- Aurigma.GraphicsMill.AjaxControls.VectorObjects.Math Namespace (Client Class Library)
- Aurigma.GraphicsMill.AjaxControls.VectorObjects.RedoUndo Namespace (Client Class Library)
- Samples
- Licensing
- Copyright Notices
GifWriter Class
This class enables you to write GIF images (both static and animated).
Namespace:
Aurigma.GraphicsMill.Codecs
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Syntax
Public NotInheritable Class GifWriter _
Inherits FormatWriter
public sealed class GifWriter : FormatWriter
Remarks
The GIF format was designed by Compuserve in 1987. Since then it has become very popular for general image exchange. There are two types of GIF files; GIF87a, the original standard of 1987 and GIF89a, the revised standard of 1989. All of these formats are available for reading in Graphics Mill for .NET and GIF89a format is available for saving. Main advantage of GIF89a against GIF87a is animation and transparency support.
The GIF format is a lossless format and is good for saving any type of image that has 256 colors (or shades of gray), or fewer. This format is suitable as a generalized format for image exchange, however the color information limit in the format may require you to choose PNG, TIFF or JPEG instead of it. In general this is the best format for images with a limited number of colors, since the compression ratio is good (it is difficult to obtain better compression and stay lossless) and GIF files can be decompressed very quickly. GIF image format supports one-dimensional interlacing (a method of progressive display), this makes this format convenient for transmission images across slow communication links. That is why this format is very popular for Web graphics.
GIF format can store only indexed images. As soon as it supports animation, it can contain multiple frames. Frame can have its own position, and a number of other paramaters, as delay time, disposal method, etc.
Examples
This code sample demonstrates how to create an animated GIF file from several JPEG files. Draw attention, you can use this code to save simple GIF files too (by passing the single frame into it).
Dim dir As String = "C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\"
Dim images As String() = {"Blue hills.jpg", "Sunset.jpg", "Water lilies.jpg", "Winter.jpg"}
Dim image As String
Dim bitmap As New Aurigma.GraphicsMill.Bitmap
Dim writer As New Aurigma.GraphicsMill.Codecs.GifWriter("C:\Slideshow.gif")
For Each image In images
bitmap.Load(dir & image)
bitmap.ColorManagement.PaletteEntryCount = 32
bitmap.ColorManagement.ConvertToIndexed(8, Aurigma.GraphicsMill.ColorPaletteType.Adaptive, _
Nothing)
Dim frame As New Aurigma.GraphicsMill.Codecs.GifFrame
frame.Delay = 100
frame.SetBitmap(bitmap)
writer.AddFrame(frame)
frame.Dispose()
Next
bitmap.Dispose()
writer.Dispose()
string dir = @"C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures";
string[] images = {"Blue hills.jpg", "Sunset.jpg", "Water lilies.jpg", "Winter.jpg"};
using (Aurigma.GraphicsMill.Bitmap bitmap =
new Aurigma.GraphicsMill.Bitmap())
{
using (Aurigma.GraphicsMill.Codecs.GifWriter writer =
new Aurigma.GraphicsMill.Codecs.GifWriter(@"C:\Slideshow.gif"))
{
foreach (string image in images)
{
bitmap.Load(dir + image);
bitmap.ColorManagement.PaletteEntryCount = 32;
bitmap.ColorManagement.ConvertToIndexed(8,
Aurigma.GraphicsMill.ColorPaletteType.Adaptive, null);
using(Aurigma.GraphicsMill.Codecs.GifFrame frame =
new Aurigma.GraphicsMill.Codecs.GifFrame())
{
frame.Delay = 100;
frame.SetBitmap(bitmap);
writer.AddFrame(frame);
}
}
}
}
Inheritance Hierarchy
Thread Safety
Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.Object Model







Supported Pixel Formats
| Member Name | Description |
|---|---|
| Format1bppIndexed | 1 bit per pixel. Indexed. |
| Format4bppIndexed | 4 bits per pixel. Indexed. |
| Format8bppIndexed | 8 bits per pixel. Indexed. |
| Format8bppGrayScale | 8 bits per pixel. Grayscale. 8 bits are used for luminosity level. |