‪TYPO3CMS  ‪main
GraphicalFunctions.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
25 
33 {
39  public ‪$addFrameSelection = true;
40 
46  public ‪$gifExtension = 'gif';
47 
53  protected ‪$colorspace = 'RGB';
54 
60  protected ‪$allowedColorSpaceNames = [
61  'CMY',
62  'CMYK',
63  'Gray',
64  'HCL',
65  'HSB',
66  'HSL',
67  'HWB',
68  'Lab',
69  'LCH',
70  'LMS',
71  'Log',
72  'Luv',
73  'OHTA',
74  'Rec601Luma',
75  'Rec601YCbCr',
76  'Rec709Luma',
77  'Rec709YCbCr',
78  'RGB',
79  'sRGB',
80  'Transparent',
81  'XYZ',
82  'YCbCr',
83  'YCC',
84  'YIQ',
85  'YCbCr',
86  'YUV',
87  ];
88 
93  protected array ‪$imageFileExt = ['gif', 'jpg', 'jpeg', 'png', 'tif', 'bmp', 'tga', 'pcx', 'ai', 'pdf', 'webp'];
94 
98  protected array ‪$webImageExt = ['gif', 'jpg', 'jpeg', 'png'];
99 
103  public ‪$cmds = [
104  'jpg' => '',
105  'jpeg' => '',
106  'gif' => '',
107  'png' => '',
108  ];
109 
114  protected ‪$processorEnabled;
115 
119  protected ‪$mayScaleUp = true;
120 
126  public ‪$filenamePrefix = '';
127 
134 
140  public ‪$dontCheckForExistingTempFile = false;
141 
149  public ‪$alternativeOutputKey = '';
150 
156  public ‪$IM_commands = [];
157 
163  public ‪$scalecmd = '-auto-orient -geometry';
164 
170  protected ‪$im5fx_blurSteps = '1x2,2x2,3x2,4x3,5x3,5x4,6x4,7x5,8x5,9x5';
171 
177  protected ‪$im5fx_sharpenSteps = '1x2,2x2,3x2,2x3,3x3,4x3,3x4,4x4,4x5,5x5';
178 
184  protected ‪$pixelLimitGif = 10000;
185 
189  protected int ‪$jpegQuality = 85;
190 
195  public function ‪__construct()
196  {
197  $gfxConf = ‪$GLOBALS['TYPO3_CONF_VARS']['GFX'];
198  if ($gfxConf['processor_colorspace'] && in_array($gfxConf['processor_colorspace'], $this->allowedColorSpaceNames, true)) {
199  $this->colorspace = $gfxConf['processor_colorspace'];
200  }
201 
202  $this->processorEnabled = (bool)$gfxConf['processor_enabled'];
203  // Setting default JPG parameters:
204  $this->jpegQuality = ‪MathUtility::forceIntegerInRange($gfxConf['jpg_quality'], 10, 100, 85);
205  $this->addFrameSelection = (bool)$gfxConf['processor_allowFrameSelection'];
206  if ($gfxConf['gdlib_png']) {
207  $this->gifExtension = 'png';
208  }
209  $this->imageFileExt = GeneralUtility::trimExplode(',', $gfxConf['imagefile_ext']);
210 
211  // Boolean. This is necessary if using ImageMagick 5+.
212  // Effects in Imagemagick 5+ tends to render very slowly!!
213  // - therefore must be disabled in order not to perform sharpen, blurring and such.
214  $this->cmds['jpg'] = $this->cmds['jpeg'] = '-colorspace ' . $this->colorspace . ' -quality ' . ‪$this->jpegQuality;
215 
216  // ... but if 'processor_effects' is set, enable effects
217  if ($gfxConf['processor_effects']) {
218  $this->cmds['jpg'] .= $this->‪v5_sharpen(10);
219  $this->cmds['jpeg'] .= $this->‪v5_sharpen(10);
220  }
221  // Secures that images are not scaled up.
222  $this->mayScaleUp = (bool)$gfxConf['processor_allowUpscaling'];
223  }
224 
235  public function ‪v5_sharpen($factor)
236  {
237  $factor = ‪MathUtility::forceIntegerInRange((int)ceil($factor / 10), 0, 10);
238  $sharpenArr = explode(',', ',' . $this->im5fx_sharpenSteps);
239  $sharpenF = trim($sharpenArr[$factor]);
240  if ($sharpenF) {
241  return ' -sharpen ' . $sharpenF;
242  }
243  return '';
244  }
245 
256  public function ‪v5_blur($factor)
257  {
258  $factor = ‪MathUtility::forceIntegerInRange((int)ceil($factor / 10), 0, 10);
259  $blurArr = explode(',', ',' . $this->im5fx_blurSteps);
260  $blurF = trim($blurArr[$factor]);
261  if ($blurF) {
262  return ' -blur ' . $blurF;
263  }
264  return '';
265  }
266 
273  public function ‪randomName()
274  {
276  return ‪Environment::getVarPath() . '/transient/' . md5(‪StringUtility::getUniqueId());
277  }
278 
279  /***********************************
280  *
281  * Scaling, Dimensions of images
282  *
283  ***********************************/
302  public function ‪imageMagickConvert($imagefile, $newExt = '', $w = '', $h = '', $params = '', $frame = '', $options = [], $mustCreate = false)
303  {
304  if (!$this->processorEnabled) {
305  // Returning file info right away
306  return $this->‪getImageDimensions($imagefile);
307  }
308  $info = $this->‪getImageDimensions($imagefile);
309  if (!$info) {
310  return null;
311  }
312 
313  $newExt = strtolower(trim($newExt));
314  // If no extension is given the original extension is used
315  if (!$newExt) {
316  $newExt = $info[2];
317  }
318  if ($newExt === 'web') {
319  if (in_array($info[2], $this->webImageExt, true)) {
320  $newExt = $info[2];
321  } else {
322  $newExt = $this->‪gif_or_jpg($info[2], $info[0], $info[1]);
323  if (!$params) {
324  $params = $this->cmds[$newExt];
325  }
326  }
327  }
328  if (!in_array($newExt, $this->imageFileExt, true)) {
329  return null;
330  }
331 
332  $data = $this->‪getImageScale($info, $w, $h, $options);
333  $w = $data['origW'];
334  $h = $data['origH'];
335  // If no conversion should be performed
336  // this flag is TRUE if the width / height does NOT dictate
337  // the image to be scaled!! (that is if no width / height is
338  // given or if the destination w/h matches the original image
339  // dimensions or if the option to not scale the image is set)
340  $noScale = !$w && !$h || $data[0] == $info[0] && $data[1] == $info[1] || !empty($options['noScale']);
341  if ($noScale && !$data['crs'] && !$params && !$frame && $newExt == $info[2] && !$mustCreate) {
342  // Set the new width and height before returning,
343  // if the noScale option is set
344  if (!empty($options['noScale'])) {
345  $info[0] = $data[0];
346  $info[1] = $data[1];
347  }
348  $info[3] = $imagefile;
349  return $info;
350  }
351  $info[0] = $data[0];
352  $info[1] = $data[1];
353  $frame = $this->addFrameSelection ? (int)$frame : 0;
354  if (!$params) {
355  $params = $this->cmds[$newExt] ?? '';
356  }
357  // Cropscaling:
358  if ($data['crs']) {
359  if (!$data['origW']) {
360  $data['origW'] = $data[0];
361  }
362  if (!$data['origH']) {
363  $data['origH'] = $data[1];
364  }
365  $offsetX = (int)(($data[0] - $data['origW']) * ($data['cropH'] + 100) / 200);
366  $offsetY = (int)(($data[1] - $data['origH']) * ($data['cropV'] + 100) / 200);
367  $params .= ' -crop ' . $data['origW'] . 'x' . $data['origH'] . '+' . $offsetX . '+' . $offsetY . '! +repage';
368  }
369  // start with the default scale command
370 
371  // check if we should use -sample or -geometry
372  if ($options['sample'] ?? false) {
373  $command = '-auto-orient -sample';
374  } else {
375  $command = ‪$this->scalecmd;
376  }
377  $command .= ' ' . $info[0] . 'x' . $info[1] . '! ' . $params . ' ';
378  // re-apply colorspace-setting for the resulting image so colors don't appear to dark (sRGB instead of RGB)
379  $command .= ' -colorspace ' . ‪$this->colorspace;
380  $cropscale = $data['crs'] ? 'crs-V' . $data['cropV'] . 'H' . $data['cropH'] : '';
381  if ($this->alternativeOutputKey) {
382  $theOutputName = md5($command . $cropscale . ‪PathUtility::basename($imagefile) . $this->alternativeOutputKey . '[' . $frame . ']');
383  } else {
384  $theOutputName = md5($command . $cropscale . $imagefile . filemtime($imagefile) . '[' . $frame . ']');
385  }
386  if ($this->imageMagickConvert_forceFileNameBody) {
388  $this->imageMagickConvert_forceFileNameBody = '';
389  }
390  // Making the temporary filename
391  ‪GeneralUtility::mkdir_deep(‪Environment::getPublicPath() . '/typo3temp/assets/images/');
392  ‪$output = ‪Environment::getPublicPath() . '/typo3temp/assets/images/' . $this->filenamePrefix . $theOutputName . '.' . $newExt;
393  if ($this->dontCheckForExistingTempFile || !file_exists(‪$output)) {
394  $this->‪imageMagickExec($imagefile, ‪$output, $command, $frame);
395  }
396  if (file_exists(‪$output)) {
397  $info[3] = ‪$output;
398  $info[2] = $newExt;
399  // params might change some image data!
400  if ($params) {
401  $info = $this->‪getImageDimensions($info[3]);
402  }
403  return $info;
404  }
405  return null;
406  }
407 
411  public function ‪crop(string $imageFile, string $targetFileExtension, string $cropInformation): ?array
412  {
413  // check if it is a json object
414  $cropData = json_decode($cropInformation);
415  if ($cropData) {
416  $offsetLeft = (int)($cropData->x ?? 0);
417  $offsetTop = (int)($cropData->y ?? 0);
418  $newWidth = (int)($cropData->width ?? 0);
419  $newHeight = (int)($cropData->height ?? 0);
420  } else {
421  [$offsetLeft, $offsetTop, $newWidth, $newHeight] = explode(',', $cropInformation, 4);
422  }
423 
424  return $this->‪imageMagickConvert(
425  $imageFile,
426  $targetFileExtension,
427  '',
428  '',
429  sprintf('-crop %dx%d+%d+%d +repage -quality %d', $newWidth, $newHeight, $offsetLeft, $offsetTop, $this->jpegQuality),
430  '',
431  ['noScale' => true],
432  true
433  );
434  }
435 
440  public function ‪mask(string $inputFile, string $outputFile, string $maskImage, string $maskBackgroundImage, string $params)
441  {
442  $tmpStr = $this->‪randomName();
443  // m_mask
444  $intermediateMaskFile = $tmpStr . '_mask.png';
445  $this->‪imageMagickExec($maskImage, $intermediateMaskFile, $params);
446  // m_bgImg
447  $intermediateMaskBackgroundFile = $tmpStr . '_bgImg.miff';
448  $this->‪imageMagickExec($maskBackgroundImage, $intermediateMaskBackgroundFile, $params);
449  // The image onto the background
450  $this->‪combineExec($intermediateMaskBackgroundFile, $inputFile, $intermediateMaskFile, $outputFile);
451  // Unlink the temp-images...
452  @unlink($intermediateMaskFile);
453  @unlink($intermediateMaskBackgroundFile);
454  }
455 
464  public function ‪getImageDimensions($imageFile)
465  {
466  preg_match('/([^\\.]*)$/', $imageFile, $reg);
467  if (!file_exists($imageFile)) {
468  return null;
469  }
470  // @todo: check if we actually need this, ass ImageInfo deals with this much more professionally
471  if (!in_array(strtolower($reg[0]), $this->imageFileExt, true)) {
472  return null;
473  }
474  $imageInfoObject = GeneralUtility::makeInstance(ImageInfo::class, $imageFile);
475  if ($imageInfoObject->isFile() && $imageInfoObject->getWidth()) {
476  return [
477  $imageInfoObject->getWidth(),
478  $imageInfoObject->getHeight(),
479  $imageInfoObject->getExtension(),
480  $imageFile,
481  ];
482  }
483  return null;
484  }
485 
497  public function ‪getImageScale($info, $w, $h, $options)
498  {
499  $out = [];
500  $max = str_contains($w . $h, 'm') ? 1 : 0;
501  if (str_contains($w . $h, 'c')) {
502  $out['cropH'] = (int)substr((string)strstr((string)$w, 'c'), 1);
503  $out['cropV'] = (int)substr((string)strstr((string)$h, 'c'), 1);
504  $crs = true;
505  } else {
506  $crs = false;
507  }
508  $out['crs'] = $crs;
509  $w = (int)$w;
510  $h = (int)$h;
511  // If there are max-values...
512  if (!empty($options['maxW'])) {
513  // If width is given...
514  if ($w) {
515  if ($w > $options['maxW']) {
516  $w = $options['maxW'];
517  // Height should follow
518  $max = 1;
519  }
520  } else {
521  if ($info[0] > $options['maxW']) {
522  $w = $options['maxW'];
523  // Height should follow
524  $max = 1;
525  }
526  }
527  }
528  if (!empty($options['maxH'])) {
529  // If height is given...
530  if ($h) {
531  if ($h > $options['maxH']) {
532  $h = $options['maxH'];
533  // Height should follow
534  $max = 1;
535  }
536  } else {
537  // Changed [0] to [1] 290801
538  if ($info[1] > $options['maxH']) {
539  $h = $options['maxH'];
540  // Height should follow
541  $max = 1;
542  }
543  }
544  }
545  $out['origW'] = $w;
546  $out['origH'] = $h;
547  $out['max'] = $max;
548  if (!$this->mayScaleUp) {
549  if ($w > $info[0]) {
550  $w = $info[0];
551  }
552  if ($h > $info[1]) {
553  $h = $info[1];
554  }
555  }
556  // If scaling should be performed. Check that input "info" array will not cause division-by-zero
557  if (($w || $h) && $info[0] && $info[1]) {
558  if ($w && !$h) {
559  $info[1] = (int)ceil($info[1] * ($w / $info[0]));
560  $info[0] = $w;
561  }
562  if (!$w && $h) {
563  $info[0] = (int)ceil($info[0] * ($h / $info[1]));
564  $info[1] = $h;
565  }
566  if ($w && $h) {
567  if ($max) {
568  $ratio = $info[0] / $info[1];
569  if ($h * $ratio > $w) {
570  $h = (int)round($w / $ratio);
571  } else {
572  $w = (int)round($h * $ratio);
573  }
574  }
575  if ($crs) {
576  $ratio = $info[0] / $info[1];
577  if ($h * $ratio < $w) {
578  $h = (int)round($w / $ratio);
579  } else {
580  $w = (int)round($h * $ratio);
581  }
582  }
583  $info[0] = $w;
584  $info[1] = $h;
585  }
586  }
587  $out[0] = $info[0];
588  $out[1] = $info[1];
589  // Set minimum-measures!
590  if (isset($options['minW']) && $out[0] < $options['minW']) {
591  if (($max || $crs) && $out[0]) {
592  $out[1] = (int)round($out[1] * $options['minW'] / $out[0]);
593  }
594  $out[0] = $options['minW'];
595  }
596  if (isset($options['minH']) && $out[1] < $options['minH']) {
597  if (($max || $crs) && $out[1]) {
598  $out[0] = (int)round($out[0] * $options['minH'] / $out[1]);
599  }
600  $out[1] = $options['minH'];
601  }
602  return $out;
603  }
604 
605  /***********************************
606  *
607  * ImageMagick API functions
608  *
609  ***********************************/
616  public function ‪imageMagickIdentify($imagefile)
617  {
618  if (!$this->processorEnabled) {
619  return null;
620  }
621 
622  $result = $this->‪executeIdentifyCommandForImageFile($imagefile);
623  if ($result) {
624  [$width, $height, $fileExtension, $fileType] = explode(' ', $result);
625  if ((int)$width && (int)$height) {
626  return [$width, $height, strtolower($fileExtension), $imagefile, strtolower($fileType)];
627  }
628  }
629  return null;
630  }
631 
638  protected function ‪executeIdentifyCommandForImageFile(string $imageFile): ?string
639  {
640  $frame = $this->addFrameSelection ? 0 : null;
642  'identify',
643  '-format "%w %h %e %m" ' . ‪ImageMagickFile::fromFilePath($imageFile, $frame)
644  );
645  $returnVal = [];
646  ‪CommandUtility::exec($cmd, $returnVal);
647  $result = array_pop($returnVal);
648  $this->IM_commands[] = ['identify', $cmd, $result];
649  return $result;
650  }
651 
662  public function ‪imageMagickExec($input, ‪$output, $params, $frame = 0)
663  {
664  if (!$this->processorEnabled) {
665  return '';
666  }
667  // If addFrameSelection is set in the Install Tool, a frame number is added to
668  // select a specific page of the image (by default this will be the first page)
669  $frame = $this->addFrameSelection ? (int)$frame : null;
671  'convert',
672  $params
673  . ' ' . ‪ImageMagickFile::fromFilePath($input, $frame)
674  . ' ' . CommandUtility::escapeShellArgument(‪$output)
675  );
676  $this->IM_commands[] = [‪$output, $cmd];
678  // Change the permissions of the file
680  return $ret;
681  }
682 
693  public function ‪combineExec($input, $overlay, $mask, ‪$output)
694  {
695  if (!$this->processorEnabled) {
696  return '';
697  }
698  $theMask = $this->‪randomName() . '.' . ‪$this->gifExtension;
699  // +matte = no alpha layer in output
700  $this->‪imageMagickExec($mask, $theMask, '-colorspace GRAY +matte');
701 
702  $parameters = '-compose over'
703  . ' -quality ' . $this->jpegQuality
704  . ' +matte '
705  . ‪ImageMagickFile::fromFilePath($input) . ' '
706  . ‪ImageMagickFile::fromFilePath($overlay) . ' '
707  . ‪ImageMagickFile::fromFilePath($theMask) . ' '
708  . CommandUtility::escapeShellArgument(‪$output);
709  $cmd = ‪CommandUtility::imageMagickCommand('combine', $parameters);
710  $this->IM_commands[] = [‪$output, $cmd];
711  $ret = ‪CommandUtility::exec($cmd);
712  // Change the permissions of the file
714  if (is_file($theMask)) {
715  @unlink($theMask);
716  }
717  return $ret;
718  }
719 
720  /***********************************
721  *
722  * Various IO functions
723  *
724  ***********************************/
725 
735  public function ‪gif_or_jpg($type, $w, $h)
736  {
737  if ($type === 'ai' || $w * $h < $this->pixelLimitGif) {
739  }
740  return 'jpg';
741  }
742 
746  public function ‪setImageFileExt(array ‪$imageFileExt): void
747  {
748  $this->imageFileExt = ‪$imageFileExt;
749  }
750 
754  public function ‪getImageFileExt(): array
755  {
756  return ‪$this->imageFileExt;
757  }
758 }
‪TYPO3\CMS\Core\Imaging
Definition: Dimension.php:16
‪TYPO3\CMS\Core\Utility\PathUtility
Definition: PathUtility.php:27
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\crop
‪crop(string $imageFile, string $targetFileExtension, string $cropInformation)
Definition: GraphicalFunctions.php:395
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\$alternativeOutputKey
‪string $alternativeOutputKey
Definition: GraphicalFunctions.php:138
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\$scalecmd
‪string $scalecmd
Definition: GraphicalFunctions.php:150
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\mask
‪mask(string $inputFile, string $outputFile, string $maskImage, string $maskBackgroundImage, string $params)
Definition: GraphicalFunctions.php:424
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\$allowedColorSpaceNames
‪array $allowedColorSpaceNames
Definition: GraphicalFunctions.php:56
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\$webImageExt
‪array $webImageExt
Definition: GraphicalFunctions.php:94
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\__construct
‪__construct()
Definition: GraphicalFunctions.php:179
‪TYPO3\CMS\Core\Core\Environment\getPublicPath
‪static getPublicPath()
Definition: Environment.php:187
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\setImageFileExt
‪setImageFileExt(array $imageFileExt)
Definition: GraphicalFunctions.php:730
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\$dontCheckForExistingTempFile
‪bool $dontCheckForExistingTempFile
Definition: GraphicalFunctions.php:130
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\$IM_commands
‪array $IM_commands
Definition: GraphicalFunctions.php:144
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\$imageMagickConvert_forceFileNameBody
‪string $imageMagickConvert_forceFileNameBody
Definition: GraphicalFunctions.php:124
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\getImageFileExt
‪getImageFileExt()
Definition: GraphicalFunctions.php:738
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\$mayScaleUp
‪bool $mayScaleUp
Definition: GraphicalFunctions.php:112
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\$processorEnabled
‪bool $processorEnabled
Definition: GraphicalFunctions.php:108
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\$addFrameSelection
‪bool $addFrameSelection
Definition: GraphicalFunctions.php:38
‪TYPO3\CMS\Core\Core\Environment\getVarPath
‪static getVarPath()
Definition: Environment.php:197
‪TYPO3\CMS\Core\Utility\PathUtility\basename
‪static basename(string $path)
Definition: PathUtility.php:219
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\$jpegQuality
‪int $jpegQuality
Definition: GraphicalFunctions.php:173
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\getImageDimensions
‪array null getImageDimensions($imageFile)
Definition: GraphicalFunctions.php:448
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions
Definition: GraphicalFunctions.php:33
‪TYPO3\CMS\Core\Utility\GeneralUtility\fixPermissions
‪static mixed fixPermissions($path, $recursive=false)
Definition: GeneralUtility.php:1479
‪TYPO3\CMS\Core\Utility\GeneralUtility\mkdir_deep
‪static mkdir_deep($directory)
Definition: GeneralUtility.php:1638
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\combineExec
‪string combineExec($input, $overlay, $mask, $output)
Definition: GraphicalFunctions.php:677
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\getImageScale
‪array getImageScale($info, $w, $h, $options)
Definition: GraphicalFunctions.php:481
‪TYPO3\CMS\Core\Utility\CommandUtility\exec
‪static exec(string $command, ?array &$output=null, int &$returnValue=0)
Definition: CommandUtility.php:85
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\$colorspace
‪string $colorspace
Definition: GraphicalFunctions.php:50
‪TYPO3\CMS\Core\Imaging\ImageMagickFile\fromFilePath
‪static fromFilePath(string $filePath, int $frame=null)
Definition: ImageMagickFile.php:111
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\$filenamePrefix
‪string $filenamePrefix
Definition: GraphicalFunctions.php:118
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\$pixelLimitGif
‪int $pixelLimitGif
Definition: GraphicalFunctions.php:168
‪TYPO3\CMS\Core\Type\File\ImageInfo
Definition: ImageInfo.php:28
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\$cmds
‪array $cmds
Definition: GraphicalFunctions.php:98
‪$output
‪$output
Definition: annotationChecker.php:119
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\v5_blur
‪string v5_blur($factor)
Definition: GraphicalFunctions.php:240
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageMagickIdentify
‪array null imageMagickIdentify($imagefile)
Definition: GraphicalFunctions.php:600
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageMagickConvert
‪array null imageMagickConvert($imagefile, $newExt='', $w='', $h='', $params='', $frame='', $options=[], $mustCreate=false)
Definition: GraphicalFunctions.php:286
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\$gifExtension
‪string $gifExtension
Definition: GraphicalFunctions.php:44
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Core\Core\Environment
Definition: Environment.php:41
‪TYPO3\CMS\Core\Utility\CommandUtility\imageMagickCommand
‪static string imageMagickCommand(string $command, string $parameters, string $path='')
Definition: CommandUtility.php:98
‪TYPO3\CMS\Core\Utility\MathUtility
Definition: MathUtility.php:24
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\v5_sharpen
‪string v5_sharpen($factor)
Definition: GraphicalFunctions.php:219
‪TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange
‪static int forceIntegerInRange(mixed $theInt, int $min, int $max=2000000000, int $defaultValue=0)
Definition: MathUtility.php:34
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:51
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\randomName
‪string randomName()
Definition: GraphicalFunctions.php:257
‪TYPO3\CMS\Core\Utility\StringUtility
Definition: StringUtility.php:24
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\$im5fx_sharpenSteps
‪string $im5fx_sharpenSteps
Definition: GraphicalFunctions.php:162
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\executeIdentifyCommandForImageFile
‪string null executeIdentifyCommandForImageFile(string $imageFile)
Definition: GraphicalFunctions.php:622
‪TYPO3\CMS\Core\Utility\CommandUtility
Definition: CommandUtility.php:54
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\gif_or_jpg
‪string gif_or_jpg($type, $w, $h)
Definition: GraphicalFunctions.php:719
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageMagickExec
‪string imageMagickExec($input, $output, $params, $frame=0)
Definition: GraphicalFunctions.php:646
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\$im5fx_blurSteps
‪string $im5fx_blurSteps
Definition: GraphicalFunctions.php:156
‪TYPO3\CMS\Core\Utility\StringUtility\getUniqueId
‪static getUniqueId(string $prefix='')
Definition: StringUtility.php:57
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\$imageFileExt
‪array $imageFileExt
Definition: GraphicalFunctions.php:89