- 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
GifReader Class
This class enables you to read GIF images.
Namespace:
Aurigma.GraphicsMill.Codecs
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Syntax
Public NotInheritable Class GifReader _
Inherits FormatReader
public sealed class GifReader : FormatReader
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 process animated GIF. For example, if you need to resize an animated GIF, you can use this code:
Dim bitmap As New Aurigma.GraphicsMill.Bitmap
Dim reader As New Aurigma.GraphicsMill.Codecs.GifReader("C:\animated2.gif")
Dim writer As New Aurigma.GraphicsMill.Codecs.GifWriter("C:\animatedsmall.gif")
writer.GlobalPalette = reader.GlobalPalette
writer.BackgroundEntryIndex = reader.BackgroundEntryIndex
writer.PlaybackCount = reader.PlaybackCount
writer.SynchronizationMode = reader.SynchronizationMode
For i As Integer = 0 To reader.FrameCount - 1
Dim frame As Aurigma.GraphicsMill.Codecs.GifFrame = reader.LoadFrame(i)
frame.GetBitmap(bitmap)
bitmap.Transforms.Resize(bitmap.Width \ 2, bitmap.Height \ 2, _
Aurigma.GraphicsMill.Transforms.InterpolationMode.LowQuality)
frame.SetBitmap(bitmap)
frame.Top = frame.Top \ 2
frame.Left = frame.Left \ 2
writer.AddFrame(frame)
frame.Dispose()
Next
writer.Dispose()
reader.Dispose()
bitmap.Dispose()
Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap();
Aurigma.GraphicsMill.Codecs.GifReader reader =
new Aurigma.GraphicsMill.Codecs.GifReader(@"C:\animated2.gif");
Aurigma.GraphicsMill.Codecs.GifWriter writer =
new Aurigma.GraphicsMill.Codecs.GifWriter(@"C:\animatedsmall.gif");
writer.GlobalPalette = reader.GlobalPalette;
writer.BackgroundEntryIndex = reader.BackgroundEntryIndex;
writer.PlaybackCount = reader.PlaybackCount;
writer.SynchronizationMode = reader.SynchronizationMode;
for (int i = 0; i < reader.FrameCount - 1; i++)
{
Aurigma.GraphicsMill.Codecs.GifFrame frame =
(Aurigma.GraphicsMill.Codecs.GifFrame)(reader.LoadFrame(i));
frame.GetBitmap(bitmap);
bitmap.Transforms.Resize(bitmap.Width / 2, bitmap.Height / 2,
Aurigma.GraphicsMill.Transforms.InterpolationMode.LowQuality);
frame.SetBitmap(bitmap);
frame.Top = frame.Top / 2;
frame.Left = frame.Left / 2;
writer.AddFrame(frame);
frame.Dispose();
}
writer.Dispose();
reader.Dispose();
bitmap.Dispose();
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






