# CSJ2K.j2k.image.Tiler.getCompData

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="CSJ2K_j2k_image_Tiler_getCompData_" data-uid="CSJ2K.j2k.image.Tiler.getCompData*">getCompData Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="CSJ2K_j2k_image_Tiler_getCompData_" data-uid="CSJ2K.j2k.image.Tiler.getCompData*"></a>
<h4 id="CSJ2K_j2k_image_Tiler_getCompData_CSJ2K_j2k_image_DataBlk_System_Int32_" data-uid="CSJ2K.j2k.image.Tiler.getCompData(CSJ2K.j2k.image.DataBlk,System.Int32)">getCompData(DataBlk, int)</h4>
<div class="markdown level1 summary"><p>Returns, in the blk argument, a block of image data containing the
specifed rectangular area, in the specified component. The data is
returned, as a copy of the internal data, therefore the returned data
can be modified &quot;in place&quot;.</p>
<pre><code>       &lt;p&gt;The rectangular area to return is specified by the 'ulx', 'uly', 'w'
       and 'h' members of the 'blk' argument, relative to the current
       tile. These members are not modified by this method. The 'offset' of
       the returned data is 0, and the 'scanw' is the same as the block's
       width. See the 'DataBlk' class.&lt;/p&gt;&lt;p&gt;This method, in general, is less efficient than the
       'getInternCompData()' method since, in general, it copies the
       data. However if the array of returned data is to be modified by the
       caller then this method is preferable.&lt;/p&gt;&lt;p&gt;If the data array in 'blk' is 'null', then a new one is created. If
       the data array is not 'null' then it is reused, and it must be large
       enough to contain the block's data. Otherwise an 'ArrayStoreException'
       or an 'IndexOutOfBoundsException' is thrown by the Java system.&lt;/p&gt;&lt;p&gt;The returned data may have its 'progressive' attribute set. In this
       case the returned data is only an approximation of the &quot;final&quot;
       data.&lt;/p&gt;
</code></pre>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public DataBlk getCompData(DataBlk blk, int c)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function getCompData(blk As DataBlk, c As Integer) As DataBlk</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="CSJ2K.j2k.image.DataBlk.html">DataBlk</a></td>
      <td><span class="parametername">blk</span></td>
      <td><p>Its coordinates and dimensions specify the area to return,
relative to the current tile. If it contains a non-null data array,
then it must be large enough. If it contains a null data array a new
one is created. Some fields in this object are modified to return the
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">c</span></td>
      <td><p>The index of the component from which to get the data.</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="CSJ2K.j2k.image.DataBlk.html">DataBlk</a></td>
      <td><p>The requested DataBlk</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="CSJ2K.j2k.image.BlkImgDataSrc.getCompData.html#CSJ2K_j2k_image_BlkImgDataSrc_getCompData_CSJ2K_j2k_image_DataBlk_System_Int32_">BlkImgDataSrc.getCompData(DataBlk, int)</a></div>
<h5 id="CSJ2K_j2k_image_Tiler_getCompData_CSJ2K_j2k_image_DataBlk_System_Int32__seealso">See Also</h5>
<div class="seealso">
    <div><a class="xref" href="CSJ2K.j2k.image.Tiler.getInternCompData.html#CSJ2K_j2k_image_Tiler_getInternCompData_CSJ2K_j2k_image_DataBlk_System_Int32_">getInternCompData</a>(<a class="xref" href="CSJ2K.j2k.image.DataBlk.html">DataBlk</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>)</div>
</div>
</div>
