Lines Matching refs:firsttime

142 	public function getImage(&$file, $firsttime = true, $allowvector = true, $orig_srcpath = false, $interpolation = false)
151 return $this->imageError($file, $firsttime, 'File contains an invalid stream. Only ' . implode(', ', $wrapperChecker->getWhitelistedStreamWrappers()) . ' streams are allowed.');
154 return $this->imageError($orig_srcpath, $firsttime, 'File contains an invalid stream. Only ' . implode(', ', $wrapperChecker->getWhitelistedStreamWrappers()) . ' streams are allowed.');
158 // firsttime i.e. whether to add to this->images - use false when calling iteratively
166 return $this->imageError($file, $firsttime, 'Unknown image variable');
179 if ($firsttime && $file && strpos($file, 'data:') !== 0) {
182 if ($firsttime && $orig_srcpath) {
211 if ($firsttime && isset($this->failedImages[$file])) { // Save re-trying image URL's which have already failed
212 return $this->imageError($file, $firsttime, '');
250 return $this->imageError($file, $firsttime, 'Could not find image file');
258 return $this->imageError($file, $firsttime, 'WMF or SVG image file not supported in this context');
273 return $this->imageError($file, $firsttime, 'Error parsing SVG file');
287 return $this->imageError($file, $firsttime, 'Missing GD support for WEBP images.');
295 return $this->imageError($file, $firsttime, 'Error creating temporary file (' . $tempfile . ') when using GD library to parse WEBP image');
312 return $this->imageError($file, $firsttime, 'Error parsing JPG header');
348 return $this->imageError($file, $firsttime, 'Error creating temporary file (' . $tempfile . ') when using GD library to parse JPG(CMYK) image');
352 return $this->imageError($file, $firsttime, 'Error parsing temporary file (' . $tempfile . ') created with GD library to parse JPG(CMYK) image');
357 if ($firsttime) {
365 return $this->imageError($file, $firsttime, 'Error creating GD image file from JPG(CMYK) image');
421 return $this->imageError($file, $firsttime, 'Error parsing or converting JPG image');
424 if ($firsttime) {
438 return $this->imageError($file, $firsttime, 'Error parsing PNG identifier');
443 return $this->imageError($file, $firsttime, 'Incorrect PNG file (no IHDR block found)');
543 // $firsttime added mPDF 6 so when PNG Grayscale with alpha using resrtictcolorspace to CMYK
545 if ($firsttime && ($colspace === 'DeviceRGB' || $colspace === 'Indexed') && ($this->mpdf->PDFX || $this->mpdf->restrictColorSpace === 3)) {
553 } elseif ($firsttime && ($colspace === 'DeviceRGB' || $colspace === 'Indexed') && $this->mpdf->restrictColorSpace === 1) {
555 // $firsttime added mPDF 6 so when PNG Grayscale with alpha using resrtictcolorspace to CMYK
574 } elseif ($firsttime && ($errpng || $pngalpha || $gamma)) { // mPDF 5.7.2 Gamma correction
578 return $this->imageError($file, $firsttime, sprintf('GD library with PNG support required for image (%s)', $errpng));
583 return $this->imageError($file, $firsttime, sprintf('Error creating GD image from PNG file (%s)', $errpng));
685 return $this->imageError($file, $firsttime, 'Failed to create temporary image file (' . $tempfile_alpha . ') parsing PNG image with alpha channel (' . $errpng . ')');
697 return $this->imageError($file, $firsttime, 'Failed to create temporary image file (' . $tempfile . ') parsing PNG image with alpha channel (' . $errpng . ')');
705 return $this->imageError($file, $firsttime, 'Error parsing temporary file (' . $tempfile_alpha . ') created with GD library to parse PNG image');
717 return $this->imageError($file, $firsttime, 'Error parsing temporary file (' . $tempfile . ') created with GD library to parse PNG image');
725 if ($firsttime) {
775 return $this->imageError($file, $firsttime, 'Failed to create temporary image file (' . $tempfile . ') parsing PNG image (' . $errpng . ')');
781 return $this->imageError($file, $firsttime, 'Error parsing temporary file (' . $tempfile . ') created with GD library to parse PNG image');
788 if ($firsttime) {
863 return $this->imageError($file, $firsttime, 'Error parsing PNG image data');
869 return $this->imageError($file, $firsttime, 'Error parsing PNG image data - no IDAT data found');
873 return $this->imageError($file, $firsttime, 'Error parsing PNG image data - missing colour palette');
888 return $this->imageError($file, $firsttime, 'Error parsing or converting PNG image');
891 if ($firsttime) {
917 return $this->imageError($file, $firsttime, 'Error creating temporary image object when using GD library to parse GIF image');
924 return $this->imageError($file, $firsttime, 'Error parsing temporary file image object created with GD library to parse GIF image');
930 return $this->imageError($file, $firsttime, 'Error creating temporary file (' . $tempfile . ') when using GD library to parse GIF image');
934 return $this->imageError($file, $firsttime, 'Error parsing temporary file (' . $tempfile . ') created with GD library to parse GIF image');
940 if ($firsttime) {
948 return $this->imageError($file, $firsttime, 'Error creating GD image file from GIF image');
991 return $this->imageError($file, $firsttime, 'Error parsing GIF image - missing colour palette');
1002 if ($firsttime) {
1018 return $this->imageError($file, $firsttime, $info['error']);
1021 if ($firsttime) {
1039 return $this->imageError($file, $firsttime, $wmfres[1]);
1041 return $this->imageError($file, $firsttime, 'Error parsing WMF image');
1062 return $this->imageError($file, $firsttime, 'Error parsing image file - image type not recognised, and not supported by GD imagecreate');
1074 return $this->imageError($file, $firsttime, 'Error creating temporary file (' . $tempfile . ') when using GD library to parse unknown image type');
1083 return $this->imageError($file, $firsttime, 'Error parsing temporary file (' . $tempfile . ') created with GD library to parse unknown image type');
1087 if ($firsttime) {
1097 return $this->imageError($file, $firsttime, 'Error parsing image file - image type not recognised');
1103 return $this->imageError($file, $firsttime, 'GD library needed to parse image files');
1425 private function imageError($file, $firsttime, $msg)
1429 if ($firsttime && ($this->mpdf->showImageErrors || $this->mpdf->debug)) {