Meet us at PRINT 19. Chicago, IL. Oct. 3 - 5.

GifReader Class

Contains methods and properties used to read GIF images.

Namespace: Aurigma.GraphicsMill.Codecs
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public sealed class GifReader : ImageReader

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 reads a GIF image and saves its frames as separate PNG files:

C#
using (var reader = new GifReader(@"Images\slideshow.gif"))
{
    for (int i = 0; i < reader.Frames.Count; i++)
    {
        reader.Frames[i].GetBitmap().Save(@"Images\Output\GIF_frame_" + i.ToString() + ".png");
    }
}

Inheritance Hierarchy

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

Manual