# GrapeCity.Documents.Imaging.Windows.GcWicBitmap.Import

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_Import_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.Import*">Import Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_Import_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.Import*"></a>
<h4 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_Import_GrapeCity_Documents_Imaging_Windows_GcWicBitmap_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.Import(GrapeCity.Documents.Imaging.Windows.GcWicBitmap)">Import(GcWicBitmap)</h4>
<div class="markdown level1 summary"><p>Loads the image from another instance of <a class="xref" href="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.html">GcWicBitmap</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 Import(GcWicBitmap sourceWicBitmap)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Import(sourceWicBitmap As GcWicBitmap)</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>
  </tbody>
</table>


<a id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_Import_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.Import*"></a>
<h4 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_Import_GrapeCity_Documents_Imaging_GcBitmap_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.Import(GrapeCity.Documents.Imaging.GcBitmap)">Import(GcBitmap)</h4>
<div class="markdown level1 summary"><p>Loads the image from an instance of the <a class="xref" href="../DS.Documents.Imaging/GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a> class.</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 Import(GcBitmap sourceBitmap)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Import(sourceBitmap 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="../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>
  </tbody>
</table>
<h5 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_Import_GrapeCity_Documents_Imaging_GcBitmap__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_Import_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.Import*"></a>
<h4 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_Import_System_Byte___System_Int32_System_Int32_GrapeCity_Documents_Imaging_Windows_WicPixelFormat_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.Import(System.Byte[],System.Int32,System.Int32,GrapeCity.Documents.Imaging.Windows.WicPixelFormat)">Import(byte[], int, int, WicPixelFormat)</h4>
<div class="markdown level1 summary"><p>Loads the image from a byte array containing the pixels buffer.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Import(byte[] bytes, int width, int height, WicPixelFormat pixelFormat)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Import(bytes As Byte(), width As Integer, height As Integer, pixelFormat As WicPixelFormat)</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.int32">int</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>The width of the image, in pixels.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">height</span></td>
      <td><p>The height of the image, in pixels.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Imaging.Windows.WicPixelFormat.html">WicPixelFormat</a></td>
      <td><span class="parametername">pixelFormat</span></td>
      <td><p>The pixel format of the image.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_Import_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.Import*"></a>
<h4 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_Import_System_Byte___System_Int32_System_Int32_System_Int32_GrapeCity_Documents_Imaging_Windows_WicPixelFormat_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.Import(System.Byte[],System.Int32,System.Int32,System.Int32,GrapeCity.Documents.Imaging.Windows.WicPixelFormat)">Import(byte[], int, int, int, WicPixelFormat)</h4>
<div class="markdown level1 summary"><p>Loads the image from a byte array containing the pixels buffer with specified stride (bytes per row of pixels).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Import(byte[] bytes, int stride, int width, int height, WicPixelFormat pixelFormat)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Import(bytes As Byte(), stride As Integer, width As Integer, height As Integer, pixelFormat As WicPixelFormat)</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.int32">int</a></td>
      <td><span class="parametername">stride</span></td>
      <td><p>The stride (bytes per row) of the image data in the source byte array.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>The width of the image, in pixels.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">height</span></td>
      <td><p>The height of the image, in pixels.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Imaging.Windows.WicPixelFormat.html">WicPixelFormat</a></td>
      <td><span class="parametername">pixelFormat</span></td>
      <td><p>The pixel format of the image.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_Import_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.Import*"></a>
<h4 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_Import_System_IntPtr_System_Int32_System_Int32_GrapeCity_Documents_Imaging_Windows_WicPixelFormat_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.Import(System.IntPtr,System.Int32,System.Int32,GrapeCity.Documents.Imaging.Windows.WicPixelFormat)">Import(IntPtr, int, int, WicPixelFormat)</h4>
<div class="markdown level1 summary"><p>Loads the image from the unmanaged block of memory pointed by IntPtr.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Import(IntPtr srcPtr, int width, int height, WicPixelFormat pixelFormat)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Import(srcPtr As IntPtr, width As Integer, height As Integer, pixelFormat As WicPixelFormat)</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.int32">int</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>The width of the image, in pixels.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">height</span></td>
      <td><p>The height of the image, in pixels.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Imaging.Windows.WicPixelFormat.html">WicPixelFormat</a></td>
      <td><span class="parametername">pixelFormat</span></td>
      <td><p>The pixel format of the image.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_Import_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.Import*"></a>
<h4 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_Import_System_IntPtr_System_Int32_System_Int32_System_Int32_GrapeCity_Documents_Imaging_Windows_WicPixelFormat_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.Import(System.IntPtr,System.Int32,System.Int32,System.Int32,GrapeCity.Documents.Imaging.Windows.WicPixelFormat)">Import(IntPtr, int, int, int, WicPixelFormat)</h4>
<div class="markdown level1 summary"><p>Loads the image from a unmanaged block of memory pointed by IntPtr and having the specified stride (bytes per row of pixels).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Import(IntPtr srcPtr, int stride, int width, int height, WicPixelFormat pixelFormat)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Import(srcPtr As IntPtr, stride As Integer, width As Integer, height As Integer, pixelFormat As WicPixelFormat)</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.int32">int</a></td>
      <td><span class="parametername">stride</span></td>
      <td><p>The stride (bytes per row) of the source image data.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>The width of the image, in pixels.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">height</span></td>
      <td><p>The height of the image, in pixels.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Imaging.Windows.WicPixelFormat.html">WicPixelFormat</a></td>
      <td><span class="parametername">pixelFormat</span></td>
      <td><p>The pixel format of the image.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
