# C1.Util.DX.WIC.DdsFrameDecode.CopyBlocks

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_WIC_DdsFrameDecode_CopyBlocks_" data-uid="C1.Util.DX.WIC.DdsFrameDecode.CopyBlocks*">CopyBlocks Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_WIC_DdsFrameDecode_CopyBlocks_" data-uid="C1.Util.DX.WIC.DdsFrameDecode.CopyBlocks*"></a>
<h4 id="C1_Util_DX_WIC_DdsFrameDecode_CopyBlocks_System_Nullable_C1_Util_DX_RectL__System_Int32_C1_Util_DX_DataStream_" data-uid="C1.Util.DX.WIC.DdsFrameDecode.CopyBlocks(System.Nullable{C1.Util.DX.RectL},System.Int32,C1.Util.DX.DataStream)">CopyBlocks(RectL?, int, DataStream)</h4>
<div class="markdown level1 summary"><p>Requests pixel data as it is natively stored within the DDS file.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void CopyBlocks(RectL? boundsInBlocks, int stride, DataStream destination)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub CopyBlocks(boundsInBlocks As RectL?, stride As Integer, destination 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">boundsInBlocks</span></td>
      <td><p>The rectangle to copy from the source. A <code>null</code> value specifies the entire texture. If the texture uses a block-compressed <strong><a class="xref" href="C1.Util.DX.DXGI.Format.html">Format</a></strong>, all values of the rectangle are expressed in number of blocks, not 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">stride</span></td>
      <td><p>The stride, in bytes, of the destination buffer. This represents the number of bytes from the buffer reference to the next row of data. If the texture uses a block-compressed <strong><a class="xref" href="C1.Util.DX.DXGI.Format.html">Format</a></strong>, a &quot;row of data&quot; is defined as a row of blocks which contains multiple pixel scanlines.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DataStream.html">DataStream</a></td>
      <td><span class="parametername">destination</span></td>
      <td><p>A reference to the destination buffer.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_WIC_DdsFrameDecode_CopyBlocks_" data-uid="C1.Util.DX.WIC.DdsFrameDecode.CopyBlocks*"></a>
<h4 id="C1_Util_DX_WIC_DdsFrameDecode_CopyBlocks_System_Nullable_C1_Util_DX_RectL__System_Int32_System_Int32_System_IntPtr_" data-uid="C1.Util.DX.WIC.DdsFrameDecode.CopyBlocks(System.Nullable{C1.Util.DX.RectL},System.Int32,System.Int32,System.IntPtr)">CopyBlocks(RectL?, int, int, IntPtr)</h4>
<div class="markdown level1 summary"><p>HRESULT IWICDdsFrameDecode::CopyBlocks([In, Optional] const WICRect* prcBoundsInBlocks,[In] unsigned int cbStride,[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 CopyBlocks(RectL? rcBoundsInBlocksRef, int stride, int bufferSize, IntPtr bufferRef)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub CopyBlocks(rcBoundsInBlocksRef As RectL?, stride 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="C1.Util.DX.RectL.html">RectL</a>?</td>
      <td><span class="parametername">rcBoundsInBlocksRef</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">stride</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>
