# GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ExportFragment

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_ExportFragment_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ExportFragment*">ExportFragment Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_ExportFragment_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ExportFragment*"></a>
<h4 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_ExportFragment_GrapeCity_Documents_Imaging_GcBitmap_System_Int32_System_Int32_System_Drawing_Rectangle_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ExportFragment(GrapeCity.Documents.Imaging.GcBitmap,System.Int32,System.Int32,System.Drawing.Rectangle)">ExportFragment(GcBitmap, int, int, Rectangle)</h4>
<div class="markdown level1 summary"><p>Copies a fragment of the image to the specified <a class="xref" href="../DS.Documents.Imaging/GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a> object.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void ExportFragment(GcBitmap dstBitmap, int xDst, int yDst, Rectangle srcRect)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub ExportFragment(dstBitmap As GcBitmap, xDst As Integer, yDst As Integer, srcRect As Rectangle)</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">dstBitmap</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.int32">int</a></td>
      <td><span class="parametername">xDst</span></td>
      <td><p>The x-coordinate, in pixels, of the upper-left corner of the destination rectangle.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">yDst</span></td>
      <td><p>The y-coordinate, in pixels, of the upper-left corner of the destination rectangle.</p>
</td>
    </tr>
    <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>
  </tbody>
</table>


<a id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_ExportFragment_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ExportFragment*"></a>
<h4 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_ExportFragment_System_IntPtr_System_Drawing_Rectangle_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ExportFragment(System.IntPtr,System.Drawing.Rectangle)">ExportFragment(IntPtr, Rectangle)</h4>
<div class="markdown level1 summary"><p>Copies a fragment of the image to the unmanaged block of memory.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int ExportFragment(IntPtr dstPtr, Rectangle srcRect)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function ExportFragment(dstPtr As IntPtr, srcRect As Rectangle) As Integer</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.intptr">IntPtr</a></td>
      <td><span class="parametername">dstPtr</span></td>
      <td><p>The pointer to the unmanaged block of memory or IntPtr.Zero.</p>
</td>
    </tr>
    <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>
  </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="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><p>Returns the number of bytes in the requested fragment of the image.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
