private function PHPExcel_Reader_Excel5_Escher::_readBlipJPEG in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/Escher.php \PHPExcel_Reader_Excel5_Escher::_readBlipJPEG()
* Read BlipJPEG record. Holds raw JPEG image data
1 call to PHPExcel_Reader_Excel5_Escher::_readBlipJPEG()
- PHPExcel_Reader_Excel5_Escher::load in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Reader/ Excel5/ Escher.php - * Load Escher stream data. May be a partial Escher stream. * *
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Reader/ Excel5/ Escher.php, line 278
Class
- PHPExcel_Reader_Excel5_Escher
- PHPExcel_Reader_Excel5_Escher
Code
private function _readBlipJPEG() {
// offset: 0; size: 2; recVer and recInstance
// bit: 4-15; mask: 0xFFF0; recInstance
$recInstance = (0xfff0 & PHPExcel_Reader_Excel5::_GetInt2d($this->_data, $this->_pos)) >> 4;
$length = PHPExcel_Reader_Excel5::_GetInt4d($this->_data, $this->_pos + 4);
$recordData = substr($this->_data, $this->_pos + 8, $length);
// move stream pointer to next record
$this->_pos += 8 + $length;
$pos = 0;
// offset: 0; size: 16; rgbUid1 (MD4 digest of)
$rgbUid1 = substr($recordData, 0, 16);
$pos += 16;
// offset: 16; size: 16; rgbUid2 (MD4 digest), only if $recInstance = 0x46B or 0x6E3
if (in_array($recInstance, array(
0x46b,
0x6e3,
))) {
$rgbUid2 = substr($recordData, 16, 16);
$pos += 16;
}
// offset: var; size: 1; tag
$tag = ord($recordData[$pos]);
$pos += 1;
// offset: var; size: var; the raw image data
$data = substr($recordData, $pos);
$blip = new PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip();
$blip
->setData($data);
$this->_object
->setBlip($blip);
}