# GrapeCity.Documents.Imaging.GcGifWriter

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="GrapeCity_Documents_Imaging_GcGifWriter" data-uid="GrapeCity.Documents.Imaging.GcGifWriter" class="text-break">GcGifWriter Class
</h1>
  <div class="markdown level0 summary"><p>Allows creating a multi-frame GIF file.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">GcGifWriter</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="GrapeCity.Documents.Imaging.html">GrapeCity.Documents.Imaging</a></h6>
  <h6><strong>Assembly</strong>: DS.Documents.Imaging.dll</h6>
  <h5 id="GrapeCity_Documents_Imaging_GcGifWriter_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class GcGifWriter : IDisposable</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class GcGifWriter
    Implements IDisposable</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Documents_Imaging_GcGifWriter__ctor_System_IO_Stream_System_Boolean_" data-uid="GrapeCity.Documents.Imaging.GcGifWriter.#ctor(System.IO.Stream,System.Boolean)">
          <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.-ctor.html#GrapeCity_Documents_Imaging_GcGifWriter__ctor_System_IO_Stream_System_Boolean_">GcGifWriter(Stream, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.html">GcGifWriter</a> class and sets the output stream.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_GcGifWriter__ctor_System_String_" data-uid="GrapeCity.Documents.Imaging.GcGifWriter.#ctor(System.String)">
          <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.-ctor.html#GrapeCity_Documents_Imaging_GcGifWriter__ctor_System_String_">GcGifWriter(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.html">GcGifWriter</a> class and sets the output file.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Documents_Imaging_GcGifWriter_AllowAddingTransparentColor" data-uid="GrapeCity.Documents.Imaging.GcGifWriter.AllowAddingTransparentColor">
          <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.AllowAddingTransparentColor.html#GrapeCity_Documents_Imaging_GcGifWriter_AllowAddingTransparentColor">AllowAddingTransparentColor</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating if a transparent color should be added to the Global and Local Color Tables, if the number of opaque colors is less than 256.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_GcGifWriter_Comment" data-uid="GrapeCity.Documents.Imaging.GcGifWriter.Comment">
          <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.Comment.html#GrapeCity_Documents_Imaging_GcGifWriter_Comment">Comment</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the optional GIF comment.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_GcGifWriter_CommentEncoding" data-uid="GrapeCity.Documents.Imaging.GcGifWriter.CommentEncoding">
          <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.CommentEncoding.html#GrapeCity_Documents_Imaging_GcGifWriter_CommentEncoding">CommentEncoding</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the encoding for the Comment string, Encoding.UTF8 is used by default.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_GcGifWriter_GlobalPalette" data-uid="GrapeCity.Documents.Imaging.GcGifWriter.GlobalPalette">
          <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.GlobalPalette.html#GrapeCity_Documents_Imaging_GcGifWriter_GlobalPalette">GlobalPalette</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the palette with opaque colors in 32-bit ARGB format to be stored as the Global Color Table.</p>
<p>If the palette contains 255 or less elements, the transparent color can be appended to the Global Color Table.</p>
<p>Elements with index 256 and above are ignored.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_GcGifWriter_IccProfileData" data-uid="GrapeCity.Documents.Imaging.GcGifWriter.IccProfileData">
          <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.IccProfileData.html#GrapeCity_Documents_Imaging_GcGifWriter_IccProfileData">IccProfileData</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the raw ICC profile data for the frames.
<remark>The value should be assigned before appending the first frame.</remark></p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_GcGifWriter_IsDisposed" data-uid="GrapeCity.Documents.Imaging.GcGifWriter.IsDisposed">
          <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.IsDisposed.html#GrapeCity_Documents_Imaging_GcGifWriter_IsDisposed">IsDisposed</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a value indicating whether the <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.html">GcGifWriter</a> has been disposed of.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_GcGifWriter_LogicalScreenHeight" data-uid="GrapeCity.Documents.Imaging.GcGifWriter.LogicalScreenHeight">
          <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.LogicalScreenHeight.html#GrapeCity_Documents_Imaging_GcGifWriter_LogicalScreenHeight">LogicalScreenHeight</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the height, in pixels, of the Logical Screen where the frames will be rendered.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_GcGifWriter_LogicalScreenWidth" data-uid="GrapeCity.Documents.Imaging.GcGifWriter.LogicalScreenWidth">
          <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.LogicalScreenWidth.html#GrapeCity_Documents_Imaging_GcGifWriter_LogicalScreenWidth">LogicalScreenWidth</a>
        </td>
        <td class="markdown level1 summary"><p>Get or sets the width, in pixels, of the Logical Screen where the frames will be rendered.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_GcGifWriter_LoopCount" data-uid="GrapeCity.Documents.Imaging.GcGifWriter.LoopCount">
          <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.LoopCount.html#GrapeCity_Documents_Imaging_GcGifWriter_LoopCount">LoopCount</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the number of iterations the animated GIF should be executed. 0 means infinite loop.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_GcGifWriter_NextFrameIndex" data-uid="GrapeCity.Documents.Imaging.GcGifWriter.NextFrameIndex">
          <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.NextFrameIndex.html#GrapeCity_Documents_Imaging_GcGifWriter_NextFrameIndex">NextFrameIndex</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the index of the next frame to be added.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_GcGifWriter_PixelAspectRatio" data-uid="GrapeCity.Documents.Imaging.GcGifWriter.PixelAspectRatio">
          <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.PixelAspectRatio.html#GrapeCity_Documents_Imaging_GcGifWriter_PixelAspectRatio">PixelAspectRatio</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the quotient of the pixel's width over its height.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Documents_Imaging_GcGifWriter_AppendFrame_GrapeCity_Documents_Imaging_BilevelBitmap_System_Int32_System_Int32_GrapeCity_Documents_Imaging_GifDisposalMethod_System_Int32_System_Boolean_" data-uid="GrapeCity.Documents.Imaging.GcGifWriter.AppendFrame(GrapeCity.Documents.Imaging.BilevelBitmap,System.Int32,System.Int32,GrapeCity.Documents.Imaging.GifDisposalMethod,System.Int32,System.Boolean)">
          <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.AppendFrame.html#GrapeCity_Documents_Imaging_GcGifWriter_AppendFrame_GrapeCity_Documents_Imaging_BilevelBitmap_System_Int32_System_Int32_GrapeCity_Documents_Imaging_GifDisposalMethod_System_Int32_System_Boolean_">AppendFrame(BilevelBitmap, int, int, GifDisposalMethod, int, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Writes the specified <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.html">BilevelBitmap</a> to the output stream as the next frame.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_GcGifWriter_AppendFrame_GrapeCity_Documents_Imaging_GcBitmap_System_Int32_System_Int32_System_Int32_GrapeCity_Documents_Imaging_GifDisposalMethod_System_Int32_System_Boolean_" data-uid="GrapeCity.Documents.Imaging.GcGifWriter.AppendFrame(GrapeCity.Documents.Imaging.GcBitmap,System.Int32,System.Int32,System.Int32,GrapeCity.Documents.Imaging.GifDisposalMethod,System.Int32,System.Boolean)">
          <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.AppendFrame.html#GrapeCity_Documents_Imaging_GcGifWriter_AppendFrame_GrapeCity_Documents_Imaging_GcBitmap_System_Int32_System_Int32_System_Int32_GrapeCity_Documents_Imaging_GifDisposalMethod_System_Int32_System_Boolean_">AppendFrame(GcBitmap, int, int, int, GifDisposalMethod, int, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Writes the specified <a class="xref" href="GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a> to the output stream as the next frame.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_GcGifWriter_AppendFrame_GrapeCity_Documents_Imaging_GcBitmap_System_UInt32___GrapeCity_Documents_Imaging_DitheringMethod_System_Int32_System_Int32_GrapeCity_Documents_Imaging_GifDisposalMethod_System_Int32_System_Boolean_" data-uid="GrapeCity.Documents.Imaging.GcGifWriter.AppendFrame(GrapeCity.Documents.Imaging.GcBitmap,System.UInt32[],GrapeCity.Documents.Imaging.DitheringMethod,System.Int32,System.Int32,GrapeCity.Documents.Imaging.GifDisposalMethod,System.Int32,System.Boolean)">
          <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.AppendFrame.html#GrapeCity_Documents_Imaging_GcGifWriter_AppendFrame_GrapeCity_Documents_Imaging_GcBitmap_System_UInt32___GrapeCity_Documents_Imaging_DitheringMethod_System_Int32_System_Int32_GrapeCity_Documents_Imaging_GifDisposalMethod_System_Int32_System_Boolean_">AppendFrame(GcBitmap, uint[], DitheringMethod, int, int, GifDisposalMethod, int, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Writes the specified <a class="xref" href="GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a> to the output stream as the next frame.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_GcGifWriter_AppendFrame_GrapeCity_Documents_Imaging_GrayscaleBitmap_System_Int32_System_Int32_GrapeCity_Documents_Imaging_GifDisposalMethod_System_Int32_System_Boolean_" data-uid="GrapeCity.Documents.Imaging.GcGifWriter.AppendFrame(GrapeCity.Documents.Imaging.GrayscaleBitmap,System.Int32,System.Int32,GrapeCity.Documents.Imaging.GifDisposalMethod,System.Int32,System.Boolean)">
          <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.AppendFrame.html#GrapeCity_Documents_Imaging_GcGifWriter_AppendFrame_GrapeCity_Documents_Imaging_GrayscaleBitmap_System_Int32_System_Int32_GrapeCity_Documents_Imaging_GifDisposalMethod_System_Int32_System_Boolean_">AppendFrame(GrayscaleBitmap, int, int, GifDisposalMethod, int, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Writes the specified <a class="xref" href="GrapeCity.Documents.Imaging.GrayscaleBitmap.html">GrayscaleBitmap</a> to the output stream as the next frame.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_GcGifWriter_AppendFrame_GrapeCity_Documents_Imaging_Indexed4bppBitmap_System_Int32_System_Int32_GrapeCity_Documents_Imaging_GifDisposalMethod_System_Int32_System_Boolean_" data-uid="GrapeCity.Documents.Imaging.GcGifWriter.AppendFrame(GrapeCity.Documents.Imaging.Indexed4bppBitmap,System.Int32,System.Int32,GrapeCity.Documents.Imaging.GifDisposalMethod,System.Int32,System.Boolean)">
          <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.AppendFrame.html#GrapeCity_Documents_Imaging_GcGifWriter_AppendFrame_GrapeCity_Documents_Imaging_Indexed4bppBitmap_System_Int32_System_Int32_GrapeCity_Documents_Imaging_GifDisposalMethod_System_Int32_System_Boolean_">AppendFrame(Indexed4bppBitmap, int, int, GifDisposalMethod, int, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Writes the specified <a class="xref" href="GrapeCity.Documents.Imaging.Indexed4bppBitmap.html">Indexed4bppBitmap</a> to the output stream as the next frame.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_GcGifWriter_AppendFrame_GrapeCity_Documents_Imaging_Indexed8bppBitmap_System_Int32_System_Int32_GrapeCity_Documents_Imaging_GifDisposalMethod_System_Int32_System_Boolean_" data-uid="GrapeCity.Documents.Imaging.GcGifWriter.AppendFrame(GrapeCity.Documents.Imaging.Indexed8bppBitmap,System.Int32,System.Int32,GrapeCity.Documents.Imaging.GifDisposalMethod,System.Int32,System.Boolean)">
          <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.AppendFrame.html#GrapeCity_Documents_Imaging_GcGifWriter_AppendFrame_GrapeCity_Documents_Imaging_Indexed8bppBitmap_System_Int32_System_Int32_GrapeCity_Documents_Imaging_GifDisposalMethod_System_Int32_System_Boolean_">AppendFrame(Indexed8bppBitmap, int, int, GifDisposalMethod, int, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Writes the specified <a class="xref" href="GrapeCity.Documents.Imaging.Indexed8bppBitmap.html">Indexed8bppBitmap</a> to the output stream as the next frame.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_GcGifWriter_Dispose" data-uid="GrapeCity.Documents.Imaging.GcGifWriter.Dispose">
          <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.Dispose.html#GrapeCity_Documents_Imaging_GcGifWriter_Dispose">Dispose()</a>
        </td>
        <td class="markdown level1 summary"><p>Clean up any resources being used.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_GcGifWriter_Dispose_System_Boolean_" data-uid="GrapeCity.Documents.Imaging.GcGifWriter.Dispose(System.Boolean)">
          <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.Dispose.html#GrapeCity_Documents_Imaging_GcGifWriter_Dispose_System_Boolean_">Dispose(bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Performs cleanup operations on managed and unmanaged resources.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_GcGifWriter_SetDpi_System_Single_System_Single_" data-uid="GrapeCity.Documents.Imaging.GcGifWriter.SetDpi(System.Single,System.Single)">
          <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.SetDpi.html#GrapeCity_Documents_Imaging_GcGifWriter_SetDpi_System_Single_System_Single_">SetDpi(float, float)</a>
        </td>
        <td class="markdown level1 summary"><p>Updates the <a class="xref" href="GrapeCity.Documents.Imaging.GcGifWriter.PixelAspectRatio.html#GrapeCity_Documents_Imaging_GcGifWriter_PixelAspectRatio">PixelAspectRatio</a> property based on the specified horizontal and vertical resolutions.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
