# GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ImportAsFragment

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_ImportAsFragment_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ImportAsFragment*">ImportAsFragment Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_ImportAsFragment_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ImportAsFragment*"></a>
<h4 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_ImportAsFragment_GrapeCity_Documents_Imaging_Windows_GcWicBitmap_System_Int32_System_Int32_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ImportAsFragment(GrapeCity.Documents.Imaging.Windows.GcWicBitmap,System.Int32,System.Int32)">ImportAsFragment(GcWicBitmap, int, int)</h4>
<div class="markdown level1 summary"><p>Loads another <a class="xref" href="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.html">GcWicBitmap</a> at the given destination within the image.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void ImportAsFragment(GcWicBitmap sourceWicBitmap, int xDst, int yDst)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub ImportAsFragment(sourceWicBitmap As GcWicBitmap, xDst As Integer, yDst 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="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.html">GcWicBitmap</a></td>
      <td><span class="parametername">sourceWicBitmap</span></td>
      <td><p>The source <a class="xref" href="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.html">GcWicBitmap</a>.</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 destination X pixel coordinate within the target bitmap.</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 destination Y pixel coordinate within the target bitmap.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_ImportAsFragment_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ImportAsFragment*"></a>
<h4 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_ImportAsFragment_GrapeCity_Documents_Imaging_GcBitmap_System_Int32_System_Int32_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ImportAsFragment(GrapeCity.Documents.Imaging.GcBitmap,System.Int32,System.Int32)">ImportAsFragment(GcBitmap, int, int)</h4>
<div class="markdown level1 summary"><p>Loads a <a class="xref" href="../DS.Documents.Imaging/GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a> at the given destination within the image.</p>
<p>If the source image is not opaque, the color channels must be premultiplied with the alpha channel.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void ImportAsFragment(GcBitmap sourceBitmap, int xDst, int yDst)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub ImportAsFragment(sourceBitmap As GcBitmap, xDst As Integer, yDst 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="../DS.Documents.Imaging/GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a></td>
      <td><span class="parametername">sourceBitmap</span></td>
      <td><p>The source <a class="xref" href="../DS.Documents.Imaging/GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a>.</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 destination X pixel coordinate within the target bitmap.</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 destination Y pixel coordinate within the target bitmap.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_ImportAsFragment_GrapeCity_Documents_Imaging_GcBitmap_System_Int32_System_Int32__seealso">See Also</h5>
<div class="seealso">
    <div><a class="xref" href="../DS.Documents.Imaging/GrapeCity.Documents.Imaging.GcBitmap.ConvertToPremultipliedAlpha.html#GrapeCity_Documents_Imaging_GcBitmap_ConvertToPremultipliedAlpha">ConvertToPremultipliedAlpha</a>()</div>
</div>


<a id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_ImportAsFragment_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ImportAsFragment*"></a>
<h4 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_ImportAsFragment_System_Byte___System_Drawing_Rectangle_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ImportAsFragment(System.Byte[],System.Drawing.Rectangle)">ImportAsFragment(byte[], Rectangle)</h4>
<div class="markdown level1 summary"><p>Loads the pixel buffer from a byte array at the given destination within the image.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void ImportAsFragment(byte[] bytes, Rectangle dstRect)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub ImportAsFragment(bytes As Byte(), dstRect 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="https://learn.microsoft.com/dotnet/api/system.byte">byte</a>[]</td>
      <td><span class="parametername">bytes</span></td>
      <td><p>The source byte array with pixel buffer.</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">dstRect</span></td>
      <td><p>The destination rectangle within the target bitmap.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_ImportAsFragment_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ImportAsFragment*"></a>
<h4 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_ImportAsFragment_System_IntPtr_System_Drawing_Rectangle_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.ImportAsFragment(System.IntPtr,System.Drawing.Rectangle)">ImportAsFragment(IntPtr, Rectangle)</h4>
<div class="markdown level1 summary"><p>Copies the unmanaged block of memory ato the given destination within the image.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void ImportAsFragment(IntPtr srcPtr, Rectangle dstRect)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub ImportAsFragment(srcPtr As IntPtr, dstRect 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="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a></td>
      <td><span class="parametername">srcPtr</span></td>
      <td><p>The pointer to the beginning of the unmanaged block of memory.</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">dstRect</span></td>
      <td><p>The destination rectangle within the target bitmap.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
