Lines Matching refs:bpc

414 				$info = ['w' => $a[0], 'h' => $a[1], 'cs' => $a[2], 'bpc' => $a[3], 'f' => 'DCTDecode', 'data' => $data, 'type' => 'jpg', 'ch' => $channels, 'icc' => $icc];
448 $bpc = ord(substr($data, 24, 1));
453 // if($bpc>8) { $errpng = 'not 8-bit depth'; } // mPDF 6 Allow through to be handled as native PNG
634 $trns = [$this->translateValue(substr($t, 0, 2), $bpc)];
637 $trns[0] = $this->translateValue(substr($t, 0, 2), $bpc);
638 $trns[1] = $this->translateValue(substr($t, 2, 2), $bpc);
639 $trns[2] = $this->translateValue(substr($t, 4, 2), $bpc);
800 } else { // PNG image with no need to convert alph channels, bpc <> 8 etc.
802 $parms = '/DecodeParms <</Predictor 15 /Colors ' . $channels . ' /BitsPerComponent ' . $bpc . ' /Columns ' . $w . '>>';
880 $info = ['w' => $w, 'h' => $h, 'cs' => $colspace, 'bpc' => $bpc, 'f' => 'FlateDecode', 'parms' => $parms, 'pal' => $pal, 'trns' => $trns, 'data' => $pngdata, 'ch' => $channels, 'icc' => $icc];
996 $info = ['w' => $w, 'h' => $h, 'cs' => $colspace, 'bpc' => 8, 'f' => 'FlateDecode', 'pal' => $pal, 'trns' => $trns, 'data' => $gifdata];
998 $info = ['w' => $w, 'h' => $h, 'cs' => $colspace, 'bpc' => 8, 'pal' => $pal, 'trns' => $trns, 'data' => $gifdata];
1112 $bpc = ord(substr($data, 24, 1));
1152 $trns = [$this->translateValue(substr($t, 0, 2), $bpc)];
1155 $trns[0] = $this->translateValue(substr($t, 0, 2), $bpc);
1156 $trns[1] = $this->translateValue(substr($t, 2, 2), $bpc);
1157 $trns[2] = $this->translateValue(substr($t, 4, 2), $bpc);
1208 $trns = [$this->translateValue(substr($t, 0, 2), $bpc)];
1210 $trns[0] = $this->translateValue(substr($t, 0, 2), $bpc);
1211 $trns[1] = $this->translateValue(substr($t, 2, 2), $bpc);
1212 $trns[2] = $this->translateValue(substr($t, 4, 2), $bpc);
1308 $info = ['w' => $w, 'h' => $h, 'cs' => $targetcs, 'bpc' => 8, 'f' => 'FlateDecode', 'data' => $imgdata, 'type' => 'png',
1315 $minfo = ['w' => $w, 'h' => $h, 'cs' => 'DeviceGray', 'bpc' => 8, 'f' => 'FlateDecode', 'data' => $mimgdata, 'type' => 'png',
1354 $bpc = ord(substr($hdr, 2, 1));
1356 if (!$bpc) {
1357 $bpc = 8;
1373 return [$w, $h, $colspace, $bpc, $channels];
1378 * If original image is bpc != 8, tRNS will be in this bpc
1379 * $im from imagecreatefromstring will always be in bpc=8
1382 private function translateValue($s, $bpc)
1386 if ($bpc == 16) {
1390 //elseif ($bpc==4) { $n = ($n << 2); }
1391 //elseif ($bpc==2) { $n = ($n << 4); }