# GrapeCity.Documents.Barcode.GcBarcode.ToGcBitmap

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Barcode_GcBarcode_ToGcBitmap_" data-uid="GrapeCity.Documents.Barcode.GcBarcode.ToGcBitmap*">ToGcBitmap Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Barcode_GcBarcode_ToGcBitmap_" data-uid="GrapeCity.Documents.Barcode.GcBarcode.ToGcBitmap*"></a>
<h4 id="GrapeCity_Documents_Barcode_GcBarcode_ToGcBitmap_System_Int32_System_Boolean_" data-uid="GrapeCity.Documents.Barcode.GcBarcode.ToGcBitmap(System.Int32,System.Boolean)">ToGcBitmap(int, bool)</h4>
<div class="markdown level1 summary"><p>Renders the current barcode into a new instance of <a class="xref" href="../DS.Documents.Imaging/GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a> with the specified resolution.
It is the responsibility of the caller to dispose the returned bitmap after use.</p>
<p>Note that when the bitmap is drawn on a <b>GcPdfGraphics</b>, it must not be disposed
until after the target PDF is saved.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public GcBitmap ToGcBitmap(int dpi = 300, bool aliased = false)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function ToGcBitmap(Optional dpi As Integer = 300, Optional aliased As Boolean = False) As GcBitmap</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.int32">int</a></td>
      <td><span class="parametername">dpi</span></td>
      <td><p>The resolution of the generated bitmap.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">aliased</span></td>
      <td><p>Whether the barcode is drawn without anti-aliasing</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><a class="xref" href="../DS.Documents.Imaging/GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a></td>
      <td><p>The newly created <a class="xref" href="../DS.Documents.Imaging/GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a> containing the image of the barcode.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
