# C1.Util.SvgRendering.ToImage

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_SvgRendering_ToImage_" data-uid="C1.Util.SvgRendering.ToImage*">ToImage Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_SvgRendering_ToImage_" data-uid="C1.Util.SvgRendering.ToImage*"></a>
<h4 id="C1_Util_SvgRendering_ToImage_GrapeCity_Documents_Drawing_Image_" data-uid="C1.Util.SvgRendering.ToImage(GrapeCity.Documents.Drawing.Image)">ToImage(Image)</h4>
<div class="markdown level1 summary"><p>Convert a image to the image in memory.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[CLSCompliant(false)]
[Obsolete(&quot;please use XLImage.FromImage method&quot;)]
public static Image ToImage(Image image)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;CLSCompliant(False)&gt;
&lt;Obsolete(&quot;please use XLImage.FromImage method&quot;)&gt;
Public Shared Function ToImage(image As Image) As Image</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><span class="xref">Image</span></td>
      <td><span class="parametername">image</span></td>
      <td><p>The image object.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">Image</span></td>
      <td><p>The graphics image in memory.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_SvgRendering_ToImage_" data-uid="C1.Util.SvgRendering.ToImage*"></a>
<h4 id="C1_Util_SvgRendering_ToImage_GrapeCity_Documents_Drawing_IImage_" data-uid="C1.Util.SvgRendering.ToImage(GrapeCity.Documents.Drawing.IImage)">ToImage(IImage)</h4>
<div class="markdown level1 summary"><p>Convert a image interface to the image in memory.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[CLSCompliant(false)]
public static Image ToImage(IImage img)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;CLSCompliant(False)&gt;
Public Shared Function ToImage(img As IImage) As Image</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><span class="xref">IImage</span></td>
      <td><span class="parametername">img</span></td>
      <td><p>The image interface.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">Image</span></td>
      <td><p>The graphics image in memory.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_SvgRendering_ToImage_" data-uid="C1.Util.SvgRendering.ToImage*"></a>
<h4 id="C1_Util_SvgRendering_ToImage_System_Byte___" data-uid="C1.Util.SvgRendering.ToImage(System.Byte[])">ToImage(byte[])</h4>
<div class="markdown level1 summary"><p>Convert a image data to the image in memory.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[CLSCompliant(false)]
public static Image ToImage(byte[] data)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;CLSCompliant(False)&gt;
Public Shared Function ToImage(data As Byte()) As Image</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.byte">byte</a>[]</td>
      <td><span class="parametername">data</span></td>
      <td><p>The image data.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">Image</span></td>
      <td><p>The graphics image in memory.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Util_SvgRendering_ToImage_System_Byte____remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The image data must be available while working with the image.</p>
</div>


<a id="C1_Util_SvgRendering_ToImage_" data-uid="C1.Util.SvgRendering.ToImage*"></a>
<h4 id="C1_Util_SvgRendering_ToImage_GrapeCity_Documents_Imaging_GcBitmap_" data-uid="C1.Util.SvgRendering.ToImage(GrapeCity.Documents.Imaging.GcBitmap)">ToImage(GcBitmap)</h4>
<div class="markdown level1 summary"><p>Convert a bitmap object to the image in memory.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[CLSCompliant(false)]
public static Image ToImage(GcBitmap bitmap)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;CLSCompliant(False)&gt;
Public Shared Function ToImage(bitmap As GcBitmap) As Image</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><span class="xref">GcBitmap</span></td>
      <td><span class="parametername">bitmap</span></td>
      <td><p>The graphics <span class="xref">GrapeCity.Documents.Imaging.GcBitmap</span> object.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">Image</span></td>
      <td><p>The graphics image in memory.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_SvgRendering_ToImage_" data-uid="C1.Util.SvgRendering.ToImage*"></a>
<h4 id="C1_Util_SvgRendering_ToImage_System_IO_Stream_" data-uid="C1.Util.SvgRendering.ToImage(System.IO.Stream)">ToImage(Stream)</h4>
<div class="markdown level1 summary"><p>Read a stream to the image in memory.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[CLSCompliant(false)]
public static Image ToImage(Stream stream)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;CLSCompliant(False)&gt;
Public Shared Function ToImage(stream As Stream) As Image</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 image <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a> object.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">Image</span></td>
      <td><p>The graphics image in memory.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_SvgRendering_ToImage_" data-uid="C1.Util.SvgRendering.ToImage*"></a>
<h4 id="C1_Util_SvgRendering_ToImage_System_String_" data-uid="C1.Util.SvgRendering.ToImage(System.String)">ToImage(string)</h4>
<div class="markdown level1 summary"><p>Convert a bitmap object to the image in memory.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[CLSCompliant(false)]
public static Image ToImage(string source)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;CLSCompliant(False)&gt;
Public Shared Function ToImage(source As String) As Image</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">source</span></td>
      <td><p>The path to an existing file or a BASE64 string.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">Image</span></td>
      <td><p>The graphics image in memory.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
