src/Provider/GeoTIFF/GeoTIFFReader.php
protected function readIFDEntries()
    {
        $countFormat = $this->isLittleEndian() ? 'vcount' : 'ncount';
        $countData = unpack($countFormat, fread($this->FileResource, 2));
        $ifdFormat = $this->isLittleEndian() ? 'vtag/vtype/Vcount/Voffset' : 'ntag/ntype/Ncount/Noffset';

        for ($i = 0; $i < $countData['count']; ++$i) {
            $constData = unpack($ifdFormat, fread($this->FileResource, static::TIFF_CONST_IFD_ENTRY_BYTES));

            switch ($constData['tag']) {
                case static::TIFF_CONST_IMAGE_WIDTH:
                    $this->NumDataCols = $constData['offset'];
                    break;
                case static::TIFF_CONST_IMAGE_LENGTH:
                    $this->NumDataRows = $constData['offset'];
                    break;
                case static::TIFF_CONST_BITS_PER_SAMPLE:
                    $this->BytesPerSample = (int) ($constData['offset'] / 8);
                    break;
                case static::TIFF_CONST_SAMPLES_PER_PIXEL:
                    $this->SamplesPerPixel = $constData['offset'];
                    break;
                case static::TIFF_CONST_ROWS_PER_STRIP:
                    $this->RowsPerStrip = $constData['offset'];
                    break;
                case static::TIFF_CONST_STRIPOFSETS:
                    $this->StripOffsets = $constData['offset'];
                    break;
            }
        }
    }
protected function readIFDEntries()
    {
        $countFormat = $this->isLittleEndian() ? 'vcount' : 'ncount';
        $countData = unpack($countFormat, fread($this->FileResource, 2));
        $ifdFormat = $this->isLittleEndian() ? 'vtag/vtype/Vcount/Voffset' : 'ntag/ntype/Ncount/Noffset';

        for ($i = 0; $i < $countData['count']; ++$i) {
            $constData = unpack($ifdFormat, fread($this->FileResource, static::TIFF_CONST_IFD_ENTRY_BYTES));

            switch ($constData['tag']) {
                case static::TIFF_CONST_IMAGE_WIDTH:
                    $this->NumDataCols = $constData['offset'];
                    break;
                case static::TIFF_CONST_IMAGE_LENGTH:
                    $this->NumDataRows = $constData['offset'];
                    break;
                case static::TIFF_CONST_BITS_PER_SAMPLE:
                    $this->BytesPerSample = (int) ($constData['offset'] / 8);
                    break;
                case static::TIFF_CONST_SAMPLES_PER_PIXEL:
                    $this->SamplesPerPixel = $constData['offset'];
                    break;
                case static::TIFF_CONST_ROWS_PER_STRIP:
                    $this->RowsPerStrip = $constData['offset'];
                    break;
                case static::TIFF_CONST_STRIPOFSETS:
                    $this->StripOffsets = $constData['offset'];
                    break;
            }
        }
    }
Read IFD entries which (the number of entries in each is in the first two bytes).