# C1.Util.DX.WIC.BitmapSourceTransform.CopyPixels

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_WIC_BitmapSourceTransform_CopyPixels_" data-uid="C1.Util.DX.WIC.BitmapSourceTransform.CopyPixels*">CopyPixels Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_WIC_BitmapSourceTransform_CopyPixels_" data-uid="C1.Util.DX.WIC.BitmapSourceTransform.CopyPixels*"></a>
<h4 id="C1_Util_DX_WIC_BitmapSourceTransform_CopyPixels_System_Int32_System_Int32_System_Int32_C1_Util_DX_DataStream_" data-uid="C1.Util.DX.WIC.BitmapSourceTransform.CopyPixels(System.Int32,System.Int32,System.Int32,C1.Util.DX.DataStream)">CopyPixels(int, int, int, DataStream)</h4>
<div class="markdown level1 summary"><p>Copies pixel data using the supplied input parameters.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void CopyPixels(int width, int height, int stride, DataStream output)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub CopyPixels(width As Integer, height As Integer, stride As Integer, output As DataStream)</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">width</span></td>
      <td><p>The width.</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.</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.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DataStream.html">DataStream</a></td>
      <td><span class="parametername">output</span></td>
      <td><p>The output.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_WIC_BitmapSourceTransform_CopyPixels_" data-uid="C1.Util.DX.WIC.BitmapSourceTransform.CopyPixels*"></a>
<h4 id="C1_Util_DX_WIC_BitmapSourceTransform_CopyPixels_System_Int32_System_Int32_C1_Util_DX_WIC_BitmapTransformOptions_System_Int32_C1_Util_DX_DataStream_" data-uid="C1.Util.DX.WIC.BitmapSourceTransform.CopyPixels(System.Int32,System.Int32,C1.Util.DX.WIC.BitmapTransformOptions,System.Int32,C1.Util.DX.DataStream)">CopyPixels(int, int, BitmapTransformOptions, int, DataStream)</h4>
<div class="markdown level1 summary"><p>Copies pixel data using the supplied input parameters.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void CopyPixels(int width, int height, BitmapTransformOptions dstTransform, int stride, DataStream output)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub CopyPixels(width As Integer, height As Integer, dstTransform As BitmapTransformOptions, stride As Integer, output As DataStream)</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">width</span></td>
      <td><p>The width.</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.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.WIC.BitmapTransformOptions.html">BitmapTransformOptions</a></td>
      <td><span class="parametername">dstTransform</span></td>
      <td><p>The DST transform.</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.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DataStream.html">DataStream</a></td>
      <td><span class="parametername">output</span></td>
      <td><p>The output.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_WIC_BitmapSourceTransform_CopyPixels_" data-uid="C1.Util.DX.WIC.BitmapSourceTransform.CopyPixels*"></a>
<h4 id="C1_Util_DX_WIC_BitmapSourceTransform_CopyPixels_System_Int32_System_Int32_System_Guid_C1_Util_DX_WIC_BitmapTransformOptions_System_Int32_C1_Util_DX_DataStream_" data-uid="C1.Util.DX.WIC.BitmapSourceTransform.CopyPixels(System.Int32,System.Int32,System.Guid,C1.Util.DX.WIC.BitmapTransformOptions,System.Int32,C1.Util.DX.DataStream)">CopyPixels(int, int, Guid, BitmapTransformOptions, int, DataStream)</h4>
<div class="markdown level1 summary"><p>Copies pixel data using the supplied input parameters.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void CopyPixels(int width, int height, Guid guidDstFormat, BitmapTransformOptions dstTransform, int stride, DataStream output)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub CopyPixels(width As Integer, height As Integer, guidDstFormat As Guid, dstTransform As BitmapTransformOptions, stride As Integer, output As DataStream)</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">width</span></td>
      <td><p>The width.</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.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.guid">Guid</a></td>
      <td><span class="parametername">guidDstFormat</span></td>
      <td><p>The GUID DST format.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.WIC.BitmapTransformOptions.html">BitmapTransformOptions</a></td>
      <td><span class="parametername">dstTransform</span></td>
      <td><p>The DST transform.</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.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DataStream.html">DataStream</a></td>
      <td><span class="parametername">output</span></td>
      <td><p>The output.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_WIC_BitmapSourceTransform_CopyPixels_" data-uid="C1.Util.DX.WIC.BitmapSourceTransform.CopyPixels*"></a>
<h4 id="C1_Util_DX_WIC_BitmapSourceTransform_CopyPixels_C1_Util_DX_RectL_System_Int32_System_Int32_System_Guid_C1_Util_DX_WIC_BitmapTransformOptions_System_Int32_C1_Util_DX_DataStream_" data-uid="C1.Util.DX.WIC.BitmapSourceTransform.CopyPixels(C1.Util.DX.RectL,System.Int32,System.Int32,System.Guid,C1.Util.DX.WIC.BitmapTransformOptions,System.Int32,C1.Util.DX.DataStream)">CopyPixels(RectL, int, int, Guid, BitmapTransformOptions, int, DataStream)</h4>
<div class="markdown level1 summary"><p>Copies pixel data using the supplied input parameters.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void CopyPixels(RectL rectangle, int width, int height, Guid guidDstFormat, BitmapTransformOptions dstTransform, int stride, DataStream output)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub CopyPixels(rectangle As RectL, width As Integer, height As Integer, guidDstFormat As Guid, dstTransform As BitmapTransformOptions, stride As Integer, output As DataStream)</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="C1.Util.DX.RectL.html">RectL</a></td>
      <td><span class="parametername">rectangle</span></td>
      <td><p>The 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">width</span></td>
      <td><p>The width.</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.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.guid">Guid</a></td>
      <td><span class="parametername">guidDstFormat</span></td>
      <td><p>The GUID DST format.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.WIC.BitmapTransformOptions.html">BitmapTransformOptions</a></td>
      <td><span class="parametername">dstTransform</span></td>
      <td><p>The DST transform.</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.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DataStream.html">DataStream</a></td>
      <td><span class="parametername">output</span></td>
      <td><p>The output.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_WIC_BitmapSourceTransform_CopyPixels_" data-uid="C1.Util.DX.WIC.BitmapSourceTransform.CopyPixels*"></a>
<h4 id="C1_Util_DX_WIC_BitmapSourceTransform_CopyPixels_System_IntPtr_System_Int32_System_Int32_System_Nullable_System_Guid__C1_Util_DX_WIC_BitmapTransformOptions_System_Int32_System_Int32_System_IntPtr_" data-uid="C1.Util.DX.WIC.BitmapSourceTransform.CopyPixels(System.IntPtr,System.Int32,System.Int32,System.Nullable{System.Guid},C1.Util.DX.WIC.BitmapTransformOptions,System.Int32,System.Int32,System.IntPtr)">CopyPixels(IntPtr, int, int, Guid?, BitmapTransformOptions, int, int, IntPtr)</h4>
<div class="markdown level1 summary"><p>HRESULT IWICBitmapSourceTransform::CopyPixels([In] const void* prc,[In] unsigned int uiWidth,[In] unsigned int uiHeight,[In, Optional] GUID* pguidDstFormat,[In] WICBitmapTransformOptions dstTransform,[In] unsigned int nStride,[In] unsigned int cbBufferSize,[In] void* pbBuffer)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void CopyPixels(IntPtr rectangleRef, int width, int height, Guid? guidDstFormatRef, BitmapTransformOptions dstTransform, int nStride, int bufferSize, IntPtr bufferRef)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub CopyPixels(rectangleRef As IntPtr, width As Integer, height As Integer, guidDstFormatRef As Guid?, dstTransform As BitmapTransformOptions, nStride As Integer, bufferSize As Integer, bufferRef As IntPtr)</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">rectangleRef</span></td>
      <td></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></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></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.guid">Guid</a>?</td>
      <td><span class="parametername">guidDstFormatRef</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.WIC.BitmapTransformOptions.html">BitmapTransformOptions</a></td>
      <td><span class="parametername">dstTransform</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">nStride</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">bufferSize</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a></td>
      <td><span class="parametername">bufferRef</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
