# GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ToGcBitmap

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_ToGcBitmap_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ToGcBitmap*">ToGcBitmap Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_ToGcBitmap_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ToGcBitmap*"></a>
<h4 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_ToGcBitmap_System_Boolean_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ToGcBitmap(System.Boolean)">ToGcBitmap(bool)</h4>
<div class="markdown level1 summary"><p>Stores the image buffer to a <a class="xref" href="../DS.Documents.Imaging/GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a>.</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(bool updatePixelFormat = false)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function ToGcBitmap(Optional updatePixelFormat 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.boolean">bool</a></td>
      <td><span class="parametername">updatePixelFormat</span></td>
      <td><p>Indicates if all pixels should be converted from premultiplied alpha format or to opaque format with alpha = 255.</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></td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_ToGcBitmap_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ToGcBitmap*"></a>
<h4 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_ToGcBitmap_System_Drawing_Rectangle_System_Boolean_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ToGcBitmap(System.Drawing.Rectangle,System.Boolean)">ToGcBitmap(Rectangle, bool)</h4>
<div class="markdown level1 summary"><p>Stores a rectangular area of the image to a <a class="xref" href="../DS.Documents.Imaging/GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a>.</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(Rectangle srcRect, bool updatePixelFormat = false)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function ToGcBitmap(srcRect As Rectangle, Optional updatePixelFormat 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.drawing.rectangle">Rectangle</a></td>
      <td><span class="parametername">srcRect</span></td>
      <td><p>The source rectangle within the image.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">updatePixelFormat</span></td>
      <td><p>Indicates if all pixels should be converted from premultiplied alpha format or to opaque format with alpha = 255.</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></td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_ToGcBitmap_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ToGcBitmap*"></a>
<h4 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_ToGcBitmap_GrapeCity_Documents_Imaging_GcBitmap_System_Boolean_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ToGcBitmap(GrapeCity.Documents.Imaging.GcBitmap,System.Boolean)">ToGcBitmap(GcBitmap, bool)</h4>
<div class="markdown level1 summary"><p>Stores the image buffer into an existing instance of <a class="xref" href="../DS.Documents.Imaging/GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void ToGcBitmap(GcBitmap bmp, bool updatePixelFormat = false)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub ToGcBitmap(bmp As GcBitmap, Optional updatePixelFormat As Boolean = False)</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="../DS.Documents.Imaging/GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a></td>
      <td><span class="parametername">bmp</span></td>
      <td><p>The destination <a class="xref" href="../DS.Documents.Imaging/GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a> object.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">updatePixelFormat</span></td>
      <td><p>Indicates if all pixels should be converted from premultiplied alpha format or to opaque format with alpha = 255.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
