# CSJ2K.j2k.image.input.ImgReader

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="CSJ2K_j2k_image_input_ImgReader" data-uid="CSJ2K.j2k.image.input.ImgReader" class="text-break">ImgReader Class
</h1>
  <div class="markdown level0 summary"><p>This is the generic interface to be implemented by all image file (or other
resource) readers for different image file formats.</p>
<pre><code>       &lt;p&gt;An ImgReader behaves as an ImgData object. Whenever image data is
       requested through the getInternCompData() or getCompData() methods, the
       image data will be read (if it is not buffered) and returned. Implementing
       classes should not buffer large amounts of data, so as to reduce memory
       usage.&lt;/p&gt;

       &lt;p&gt;This class sets the image origin to (0,0). All default implementations
       of the methods assume this.&lt;/p&gt;

       &lt;p&gt;This class provides default implementations of many methods. These
       default implementations assume that there is no tiling (i.e., the only tile
       is the entire image), that the image origin is (0,0) in the canvas system
       and that there is no component subsampling (all components are the same
       size), but they can be overloaded by the implementating class if need
       be.&lt;/p&gt;
</code></pre>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">ImgReader</span></div>
      <div class="level2"><a class="xref" href="CSJ2K.j2k.image.input.ImgReaderPGM.html">ImgReaderPGM</a></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="CSJ2K.j2k.image.BlkImgDataSrc.html">BlkImgDataSrc</a></div>
    <div><a class="xref" href="CSJ2K.j2k.image.ImgData.html">ImgData</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="CSJ2K.j2k.image.input.html">CSJ2K.j2k.image.input</a></h6>
  <h6><strong>Assembly</strong>: C1.C1Pdf.4.8.dll</h6>
  <h5 id="CSJ2K_j2k_image_input_ImgReader_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public abstract class ImgReader : BlkImgDataSrc, ImgData</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public MustInherit Class ImgReader
    Implements BlkImgDataSrc, ImgData</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader__ctor" data-uid="CSJ2K.j2k.image.input.ImgReader.#ctor">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.-ctor.html#CSJ2K_j2k_image_input_ImgReader__ctor">ImgReader()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
    </tbody>
  </table>
  <h3 id="fields">Fields
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_h" data-uid="CSJ2K.j2k.image.input.ImgReader.h">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.h.html">h</a>
        </td>
        <td class="markdown level1 summary"><p>The height of the image</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_nc" data-uid="CSJ2K.j2k.image.input.ImgReader.nc">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.nc.html">nc</a>
        </td>
        <td class="markdown level1 summary"><p>The number of components in the image</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_w" data-uid="CSJ2K.j2k.image.input.ImgReader.w">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.w.html">w</a>
        </td>
        <td class="markdown level1 summary"><p>The width of the image</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_ImgHeight" data-uid="CSJ2K.j2k.image.input.ImgReader.ImgHeight">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.ImgHeight.html#CSJ2K_j2k_image_input_ImgReader_ImgHeight">ImgHeight</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the overall height of the image in pixels. This is the image's
height without accounting for any component subsampling or tiling. The
value of <tt>h</tt> is returned.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_ImgULX" data-uid="CSJ2K.j2k.image.input.ImgReader.ImgULX">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.ImgULX.html#CSJ2K_j2k_image_input_ImgReader_ImgULX">ImgULX</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the horizontal coordinate of the image origin, the top-left
corner, in the canvas system, on the reference grid.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_ImgULY" data-uid="CSJ2K.j2k.image.input.ImgReader.ImgULY">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.ImgULY.html#CSJ2K_j2k_image_input_ImgReader_ImgULY">ImgULY</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the vertical coordinate of the image origin, the top-left
corner, in the canvas system, on the reference grid.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_ImgWidth" data-uid="CSJ2K.j2k.image.input.ImgReader.ImgWidth">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.ImgWidth.html#CSJ2K_j2k_image_input_ImgReader_ImgWidth">ImgWidth</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the overall width of the image in pixels. This is the image's
width without accounting for any component subsampling or tiling. The
value of <tt>w</tt> is returned.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_NomTileHeight" data-uid="CSJ2K.j2k.image.input.ImgReader.NomTileHeight">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.NomTileHeight.html#CSJ2K_j2k_image_input_ImgReader_NomTileHeight">NomTileHeight</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the nominal tiles height</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_NomTileWidth" data-uid="CSJ2K.j2k.image.input.ImgReader.NomTileWidth">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.NomTileWidth.html#CSJ2K_j2k_image_input_ImgReader_NomTileWidth">NomTileWidth</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the nominal tiles width</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_NumComps" data-uid="CSJ2K.j2k.image.input.ImgReader.NumComps">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.NumComps.html#CSJ2K_j2k_image_input_ImgReader_NumComps">NumComps</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the number of components in the image. The value of <tt>nc</tt>
is returned.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_TileHeight" data-uid="CSJ2K.j2k.image.input.ImgReader.TileHeight">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.TileHeight.html#CSJ2K_j2k_image_input_ImgReader_TileHeight">TileHeight</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the overall height of the current tile in pixels, assuming
there is no-tiling. Since no-tiling is assumed this is the same as the
width of the image. The value of <tt>h</tt> is returned.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_TileIdx" data-uid="CSJ2K.j2k.image.input.ImgReader.TileIdx">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.TileIdx.html#CSJ2K_j2k_image_input_ImgReader_TileIdx">TileIdx</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the index of the current tile, relative to a standard scan-line
order. This default implementations assumes no tiling, so 0 is always
returned.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_TilePartULX" data-uid="CSJ2K.j2k.image.input.ImgReader.TilePartULX">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.TilePartULX.html#CSJ2K_j2k_image_input_ImgReader_TilePartULX">TilePartULX</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the horizontal tile partition offset in the reference grid</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_TilePartULY" data-uid="CSJ2K.j2k.image.input.ImgReader.TilePartULY">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.TilePartULY.html#CSJ2K_j2k_image_input_ImgReader_TilePartULY">TilePartULY</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the vertical tile partition offset in the reference grid</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_TileWidth" data-uid="CSJ2K.j2k.image.input.ImgReader.TileWidth">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.TileWidth.html#CSJ2K_j2k_image_input_ImgReader_TileWidth">TileWidth</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the width of the current tile in pixels, assuming there is
no-tiling. Since no-tiling is assumed this is the same as the width of
the image. The value of <tt>w</tt> is returned.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_close" data-uid="CSJ2K.j2k.image.input.ImgReader.close">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.close.html#CSJ2K_j2k_image_input_ImgReader_close">close()</a>
        </td>
        <td class="markdown level1 summary"><p>Closes the underlying file or network connection from where the
image data is being read.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_getCompData_CSJ2K_j2k_image_DataBlk_System_Int32_" data-uid="CSJ2K.j2k.image.input.ImgReader.getCompData(CSJ2K.j2k.image.DataBlk,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.getCompData.html#CSJ2K_j2k_image_input_ImgReader_getCompData_CSJ2K_j2k_image_DataBlk_System_Int32_">getCompData(DataBlk, int)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_getCompImgHeight_System_Int32_" data-uid="CSJ2K.j2k.image.input.ImgReader.getCompImgHeight(System.Int32)">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.getCompImgHeight.html#CSJ2K_j2k_image_input_ImgReader_getCompImgHeight_System_Int32_">getCompImgHeight(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the height in pixels of the specified component in the overall
image. This default implementation assumes no component, or component,
subsampling (i.e. all components have the same dimensions in pixels).</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_getCompImgWidth_System_Int32_" data-uid="CSJ2K.j2k.image.input.ImgReader.getCompImgWidth(System.Int32)">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.getCompImgWidth.html#CSJ2K_j2k_image_input_ImgReader_getCompImgWidth_System_Int32_">getCompImgWidth(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the width in pixels of the specified component in the overall
image. This default implementation assumes no component, or component,
subsampling (i.e. all components have the same dimensions in pixels).</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_getCompSubsX_System_Int32_" data-uid="CSJ2K.j2k.image.input.ImgReader.getCompSubsX(System.Int32)">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.getCompSubsX.html#CSJ2K_j2k_image_input_ImgReader_getCompSubsX_System_Int32_">getCompSubsX(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the component subsampling factor in the horizontal direction,
for the specified component. This is, approximately, the ratio of
dimensions between the reference grid and the component itself, see the
'ImgData' interface desription for details.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_getCompSubsY_System_Int32_" data-uid="CSJ2K.j2k.image.input.ImgReader.getCompSubsY(System.Int32)">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.getCompSubsY.html#CSJ2K_j2k_image_input_ImgReader_getCompSubsY_System_Int32_">getCompSubsY(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the component subsampling factor in the vertical direction, for
the specified component. This is, approximately, the ratio of
dimensions between the reference grid and the component itself, see the
'ImgData' interface desription for details.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_getCompULX_System_Int32_" data-uid="CSJ2K.j2k.image.input.ImgReader.getCompULX(System.Int32)">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.getCompULX.html#CSJ2K_j2k_image_input_ImgReader_getCompULX_System_Int32_">getCompULX(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the horizontal coordinate of the upper-left corner of the
specified component in the current tile.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_getCompULY_System_Int32_" data-uid="CSJ2K.j2k.image.input.ImgReader.getCompULY(System.Int32)">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.getCompULY.html#CSJ2K_j2k_image_input_ImgReader_getCompULY_System_Int32_">getCompULY(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the vertical coordinate of the upper-left corner of the
specified component in the current tile.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_getFixedPoint_System_Int32_" data-uid="CSJ2K.j2k.image.input.ImgReader.getFixedPoint(System.Int32)">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.getFixedPoint.html#CSJ2K_j2k_image_input_ImgReader_getFixedPoint_System_Int32_">getFixedPoint(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the position of the fixed point in the specified component, or
equivalently the number of fractional bits. This is the position of the
least significant integral (i.e. non-fractional) bit, which is
equivalent to the number of fractional bits. For instance, for
fixed-point values with 2 fractional bits, 2 is returned. For
floating-point data this value does not apply and 0 should be
returned. Position 0 is the position of the least significant bit in
the data.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_getInternCompData_CSJ2K_j2k_image_DataBlk_System_Int32_" data-uid="CSJ2K.j2k.image.input.ImgReader.getInternCompData(CSJ2K.j2k.image.DataBlk,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.getInternCompData.html#CSJ2K_j2k_image_input_ImgReader_getInternCompData_CSJ2K_j2k_image_DataBlk_System_Int32_">getInternCompData(DataBlk, int)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_getNomRangeBits_System_Int32_" data-uid="CSJ2K.j2k.image.input.ImgReader.getNomRangeBits(System.Int32)">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.getNomRangeBits.html#CSJ2K_j2k_image_input_ImgReader_getNomRangeBits_System_Int32_">getNomRangeBits(int)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_getNumTiles" data-uid="CSJ2K.j2k.image.input.ImgReader.getNumTiles">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.getNumTiles.html#CSJ2K_j2k_image_input_ImgReader_getNumTiles">getNumTiles()</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the total number of tiles in the image. This default
implementation assumes no tiling, so 1 is always returned.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_getNumTiles_CSJ2K_j2k_image_Coord_" data-uid="CSJ2K.j2k.image.input.ImgReader.getNumTiles(CSJ2K.j2k.image.Coord)">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.getNumTiles.html#CSJ2K_j2k_image_input_ImgReader_getNumTiles_CSJ2K_j2k_image_Coord_">getNumTiles(Coord)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the number of tiles in the horizontal and vertical
directions. This default implementation assumes no tiling, so (1,1) is
always returned.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_getTile_CSJ2K_j2k_image_Coord_" data-uid="CSJ2K.j2k.image.input.ImgReader.getTile(CSJ2K.j2k.image.Coord)">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.getTile.html#CSJ2K_j2k_image_input_ImgReader_getTile_CSJ2K_j2k_image_Coord_">getTile(Coord)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the coordinates of the current tile. This default
implementation assumes no-tiling, so (0,0) is returned.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_getTileCompHeight_System_Int32_System_Int32_" data-uid="CSJ2K.j2k.image.input.ImgReader.getTileCompHeight(System.Int32,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.getTileCompHeight.html#CSJ2K_j2k_image_input_ImgReader_getTileCompHeight_System_Int32_System_Int32_">getTileCompHeight(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the height in pixels of the specified tile-component. This
default implementation assumes no tiling and no component subsampling
(i.e., all components, or components, have the same dimensions in
pixels).</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_getTileCompWidth_System_Int32_System_Int32_" data-uid="CSJ2K.j2k.image.input.ImgReader.getTileCompWidth(System.Int32,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.getTileCompWidth.html#CSJ2K_j2k_image_input_ImgReader_getTileCompWidth_System_Int32_System_Int32_">getTileCompWidth(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the width in pixels of the specified tile-component. This
default implementation assumes no tiling and no component subsampling
(i.e., all components, or components, have the same dimensions in
pixels).</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_isOrigSigned_System_Int32_" data-uid="CSJ2K.j2k.image.input.ImgReader.isOrigSigned(System.Int32)">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.isOrigSigned.html#CSJ2K_j2k_image_input_ImgReader_isOrigSigned_System_Int32_">isOrigSigned(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns true if the data read was originally signed in the specified
component, false if not.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_nextTile" data-uid="CSJ2K.j2k.image.input.ImgReader.nextTile">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.nextTile.html#CSJ2K_j2k_image_input_ImgReader_nextTile">nextTile()</a>
        </td>
        <td class="markdown level1 summary"><p>Advances to the next tile, in standard scan-line order (by rows then
columns). A NoNextElementException is thrown if the current tile is the
last one (i.e. there is no next tile). This default implementation
assumes no tiling, so NoNextElementException() is always thrown.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_input_ImgReader_setTile_System_Int32_System_Int32_" data-uid="CSJ2K.j2k.image.input.ImgReader.setTile(System.Int32,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.image.input.ImgReader.setTile.html#CSJ2K_j2k_image_input_ImgReader_setTile_System_Int32_System_Int32_">setTile(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Changes the current tile, given the new coordinates. An
IllegalArgumentException is thrown if the coordinates do not correspond
to a valid tile. This default implementation assumes no tiling so the
only valid arguments are x=0, y=0.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
