# CSJ2K.j2k.codestream.reader.HeaderDecoder.createResampler

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="CSJ2K_j2k_codestream_reader_HeaderDecoder_createResampler_" data-uid="CSJ2K.j2k.codestream.reader.HeaderDecoder.createResampler*">createResampler Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="CSJ2K_j2k_codestream_reader_HeaderDecoder_createResampler_" data-uid="CSJ2K.j2k.codestream.reader.HeaderDecoder.createResampler*"></a>
<h4 id="CSJ2K_j2k_codestream_reader_HeaderDecoder_createResampler_CSJ2K_j2k_image_BlkImgDataSrc_CSJ2K_Color_ColorSpace_" data-uid="CSJ2K.j2k.codestream.reader.HeaderDecoder.createResampler(CSJ2K.j2k.image.BlkImgDataSrc,CSJ2K.Color.ColorSpace)">createResampler(BlkImgDataSrc, ColorSpace)</h4>
<div class="markdown level1 summary"><p>Creates and returns the Resampler which converts the input
source to one in which all channels have the same number of
samples.  This is required for colorspace conversions.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public virtual BlkImgDataSrc createResampler(BlkImgDataSrc src, ColorSpace csMap)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overridable Function createResampler(src As BlkImgDataSrc, csMap As ColorSpace) As BlkImgDataSrc</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.BlkImgDataSrc.html">BlkImgDataSrc</a></td>
      <td><span class="parametername">src</span></td>
      <td><p>The bit stream reader agent where to get code-block
data from.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="CSJ2K.Color.ColorSpace.html">ColorSpace</a></td>
      <td><span class="parametername">csMap</span></td>
      <td><p>provides color space information from the image file</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.BlkImgDataSrc.html">BlkImgDataSrc</a></td>
      <td><p>The resampled BlkImgDataSrc</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="CSJ2K.Color.ColorSpaceException.html">ColorSpaceException</a></td>
      <td><p>if image contains a bad colorspace box</p>
</td>
    </tr>
  </tbody>
</table>
</div>
