PhpOffice\PhpPresentation\Reader\PowerPoint97::readRecordOfficeArtBlip PHP Метод

readRecordOfficeArtBlip() приватный Метод

The OfficeArtBlip record specifies BLIP file data.
private readRecordOfficeArtBlip ( string $stream, integer $pos )
$stream string
$pos integer
    private function readRecordOfficeArtBlip($stream, $pos)
    {
        $arrayReturn = array('length' => 0, 'picture' => null);
        $data = $this->loadRecordHeader($stream, $pos);
        if ($data['recVer'] == 0x0 && ($data['recType'] >= 0xf018 && $data['recType'] <= 0xf117)) {
            // Record Header
            $arrayReturn['length'] += 8;
            // Datas
            switch ($data['recType']) {
                case self::OFFICEARTBLIPJPG:
                case self::OFFICEARTBLIPPNG:
                    // rgbUid1
                    $arrayReturn['length'] += 16;
                    $data['recLen'] -= 16;
                    if ($data['recInstance'] == 0x6e1) {
                        // rgbUid2
                        $arrayReturn['length'] += 16;
                        $data['recLen'] -= 16;
                    }
                    // tag
                    $arrayReturn['length'] += 1;
                    $data['recLen'] -= 1;
                    // BLIPFileData
                    $arrayReturn['picture'] = substr($this->streamPictures, $pos + $arrayReturn['length'], $data['recLen']);
                    $arrayReturn['length'] += $data['recLen'];
                    break;
                default:
                    throw new \Exception('Feature not implemented (l.' . __LINE__ . ' : ' . dechex($data['recType'] . ')'));
            }
        }
        return $arrayReturn;
    }
PowerPoint97