# GrapeCity.Documents.Excel.Drawing.IShape.ToImage

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Excel_Drawing_IShape_ToImage_" data-uid="GrapeCity.Documents.Excel.Drawing.IShape.ToImage*">ToImage Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Excel_Drawing_IShape_ToImage_" data-uid="GrapeCity.Documents.Excel.Drawing.IShape.ToImage*"></a>
<h4 id="GrapeCity_Documents_Excel_Drawing_IShape_ToImage_System_String_" data-uid="GrapeCity.Documents.Excel.Drawing.IShape.ToImage(System.String)">ToImage(string)</h4>
<div class="markdown level1 summary"><p>Saves the shape to the specified image file.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">void ToImage(string fileName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Sub ToImage(fileName As String)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">fileName</span></td>
      <td><p>The output image file.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Excel_Drawing_IShape_ToImage_" data-uid="GrapeCity.Documents.Excel.Drawing.IShape.ToImage*"></a>
<h4 id="GrapeCity_Documents_Excel_Drawing_IShape_ToImage_System_String_GrapeCity_Documents_Excel_ImageSaveOptions_" data-uid="GrapeCity.Documents.Excel.Drawing.IShape.ToImage(System.String,GrapeCity.Documents.Excel.ImageSaveOptions)">ToImage(string, ImageSaveOptions)</h4>
<div class="markdown level1 summary"><p>Saves the shape to the specified image file using options.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">void ToImage(string fileName, ImageSaveOptions options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Sub ToImage(fileName As String, options As ImageSaveOptions)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">fileName</span></td>
      <td><p>The output image file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Excel.ImageSaveOptions.html">ImageSaveOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p>The options for output image.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Excel_Drawing_IShape_ToImage_" data-uid="GrapeCity.Documents.Excel.Drawing.IShape.ToImage*"></a>
<h4 id="GrapeCity_Documents_Excel_Drawing_IShape_ToImage_System_IO_Stream_GrapeCity_Documents_Excel_Drawing_ImageType_" data-uid="GrapeCity.Documents.Excel.Drawing.IShape.ToImage(System.IO.Stream,GrapeCity.Documents.Excel.Drawing.ImageType)">ToImage(Stream, ImageType)</h4>
<div class="markdown level1 summary"><p>Saves the shape to the specified image stream.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">void ToImage(Stream stream, ImageType imageType)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Sub ToImage(stream As Stream, imageType As ImageType)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a></td>
      <td><span class="parametername">stream</span></td>
      <td><p>The output image stream.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Excel.Drawing.ImageType.html">ImageType</a></td>
      <td><span class="parametername">imageType</span></td>
      <td><p>Specifies the type of image to create.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Excel_Drawing_IShape_ToImage_" data-uid="GrapeCity.Documents.Excel.Drawing.IShape.ToImage*"></a>
<h4 id="GrapeCity_Documents_Excel_Drawing_IShape_ToImage_System_IO_Stream_GrapeCity_Documents_Excel_Drawing_ImageType_GrapeCity_Documents_Excel_ImageSaveOptions_" data-uid="GrapeCity.Documents.Excel.Drawing.IShape.ToImage(System.IO.Stream,GrapeCity.Documents.Excel.Drawing.ImageType,GrapeCity.Documents.Excel.ImageSaveOptions)">ToImage(Stream, ImageType, ImageSaveOptions)</h4>
<div class="markdown level1 summary"><p>Saves the shape to the specified image stream using options.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">void ToImage(Stream stream, ImageType imageType, ImageSaveOptions options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Sub ToImage(stream As Stream, imageType As ImageType, options As ImageSaveOptions)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a></td>
      <td><span class="parametername">stream</span></td>
      <td><p>The output image stream.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Excel.Drawing.ImageType.html">ImageType</a></td>
      <td><span class="parametername">imageType</span></td>
      <td><p>Specifies the type of image to create.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Excel.ImageSaveOptions.html">ImageSaveOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p>The options for output image.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
