---
title: "GifWriter Class"
canonical: https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_GifWriter.htm
product: "Graphics Mill"
---

# GifWriter Class
 
Contains methods and properties used to write GIF images (both static and animated).
 
**Namespace:** [Aurigma.GraphicsMill.Codecs](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Codecs.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public sealed class GifWriter : ImageWriter
```
 
## Remarks
  
GIF (Graphics Interchange Format) is a bitmap image format which works well for saving any type of grayscale or 256 color image. The color limitation makes the GIF format unsuitable for reproducing color photographs and other images with continuous color, but it is well-suited for simpler images such as graphics or logos with solid areas of color. The GIF image format supports animations and one-dimensional interlacing (a method of progressive displaying). GIF interlacing makes this format convenient for transmission of images across slow communication links.
 
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
  
The following code creates an animated GIF file by grouping JPEG images:
 
```csharp
string dir = @"C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\\";
string[] images = { "Chrysanthemum.jpg", "Desert.jpg", "Jellyfish.jpg", "Tulips.jpg" };

using (var writer = new GifWriter(@"Images\Output\Slideshow.gif"))
using (var cc = new ColorConverter(PixelFormat.Format8bppIndexed))
{
    writer.FrameOptions.Delay = 100;

    foreach (string image in images)
    {
        using (var reader = new JpegReader(dir + image))
        {
            Pipeline.Run(reader + cc + writer);
        }
    }
}
```
 
## Inheritance Hierarchy
  
- System.Object
    - [Aurigma.GraphicsMill.PipelineElement](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_PipelineElement.htm.md)
        - [Aurigma.GraphicsMill.Codecs.ImageWriter](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_ImageWriter.htm.md)
            - Aurigma.GraphicsMill.Codecs.GifWriter
 
## Thread Safety
 Static members of this type are not safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.
   
## See Also

### Reference

- [GifWriter Members](https://www.graphicsmill.com/docs/gm/AllMembers_T_Aurigma_GraphicsMill_Codecs_GifWriter.htm.md)
- [Aurigma.GraphicsMill.Codecs Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Codecs.htm.md)

### Manual

- [Supported File Formats](https://www.graphicsmill.com/docs/gm/supported-file-formats.htm.md)
- [Loading and Saving Animated GIFs](https://www.graphicsmill.com/docs/gm/loading-and-saving-animated-gifs.htm.md)
