[CLEANUP] Move functions to GraphicalFunctions 67/36367/6
authorZbigniew Jacko <z.jacko@macopedia.pl>
Thu, 29 Jan 2015 16:04:09 +0000 (17:04 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 31 Jan 2015 18:33:47 +0000 (19:33 +0100)
Clean up the code by moving IM related function
from GeneralUtility to GraphicalFunctions class.

Change-Id: I714435ad76e542e9aff297cad779964fd543a2c5
Resolves: #46589
Releases: master
Reviewed-on: http://review.typo3.org/36367
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/backend/Classes/Utility/IconUtility.php
typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Configuration/DefaultConfiguration.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/ContentObject/Menu/GraphicalMenuContentObject.php
typo3/sysext/frontend/Classes/ContentObject/Menu/ImageMenuContentObject.php
typo3/sysext/frontend/Classes/ContentObject/Menu/TextMenuContentObject.php
typo3/sysext/install/Classes/Controller/Action/Tool/TestSetup.php
typo3/sysext/install/Resources/Private/Partials/Action/Tool/TestSetup/WriteGifAndPng.html

index 5371660..b236a08 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Backend\Utility;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Imaging\GraphicalFunctions;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Versioning\VersionState;
 
@@ -37,7 +38,7 @@ use TYPO3\CMS\Core\Versioning\VersionState;
 class IconUtility {
 
        /**
-        * @var array
+        * @var string[]
         */
        static public $fileSpriteIconNames = array(
                'htm' => 'mimetypes-text-html',
@@ -104,7 +105,7 @@ class IconUtility {
                'potx' => 'mimetypes-powerpoint',
                'mount' => 'apps-filetree-mount',
                'folder' => 'apps-filetree-folder-default',
-               'default' => 'mimetypes-other-other'
+               'default' => 'mimetypes-other-other',
        );
 
        /**
@@ -446,7 +447,7 @@ class IconUtility {
                                        }
                                        // Create the image as file, destroy GD image and return:
                                        @self::imagemake($im, $path);
-                                       GeneralUtility::gif_compress($path, 'IM');
+                                       GraphicalFunctions::gifCompress($path, 'IM');
                                        ImageDestroy($im);
                                        return $mainpath;
                                } else {
@@ -488,20 +489,20 @@ class IconUtility {
        }
 
        /**
-        * Create new image pointer from input file (either gif/png, in case the wrong format it is converted by \TYPO3\CMS\Core\Utility\GeneralUtility::read_png_gif())
+        * Create new image pointer from input file (either gif/png, in case the wrong format it is converted by \TYPO3\CMS\Core\Imaging\GraphicalFunctions::readPngGif())
         *
         * @param string $file Absolute filename of the image file from which to start the icon creation.
-        * @return mixed If success, image pointer, otherwise "-1
+        * @return resource|int If success, image pointer, otherwise -1
         * @access private
-        * @see \TYPO3\CMS\Core\Utility\GeneralUtility::read_png_gif
+        * @see \TYPO3\CMS\Core\Imaging\GraphicalFunctions::readPngGif
         */
        static public function imagecreatefrom($file) {
-               $file = GeneralUtility::read_png_gif($file, $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png']);
-               if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png']) {
-                       return $file ? imagecreatefrompng($file) : -1;
-               } else {
-                       return $file ? imagecreatefromgif($file) : -1;
+               $file = GraphicalFunctions::readPngGif($file, $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png']);
+               if (!$file) {
+                       return -1;
                }
+
+               return $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png'] ? imagecreatefrompng($file) : imagecreatefromgif($file);
        }
 
        /**
index 23f0cf6..fd2a82e 100644 (file)
@@ -171,7 +171,7 @@ class GraphicalFunctions {
        public $dontCheckForExistingTempFile = 0;
 
        /**
-        * Prevents imageMagickConvert() from compressing the gif-files with \TYPO3\CMS\Core\Utility\GeneralUtility::gif_compress()
+        * Prevents imageMagickConvert() from compressing the gif-files with self::gifCompress()
         *
         * @var bool
         */
@@ -2240,7 +2240,7 @@ class GraphicalFunctions {
                                        }
                                        if ($info[2] == $this->gifExtension && !$this->dontCompress) {
                                                // Compress with IM (lzw) or GD (rle)  (Workaround for the absence of lzw-compression in GD)
-                                               GeneralUtility::gif_compress($info[3], '');
+                                               self::gifCompress($info[3], '');
                                        }
                                        return $info;
                                }
@@ -2551,6 +2551,117 @@ class GraphicalFunctions {
                }
        }
 
+       /**
+        * Compressing a GIF file if not already LZW compressed.
+        * This function is a workaround for the fact that ImageMagick and/or GD does not compress GIF-files to their minimun size (that is RLE or no compression used)
+        *
+        * The function takes a file-reference, $theFile, and saves it again through GD or ImageMagick in order to compress the file
+        * GIF:
+        * If $type is not set, the compression is done with ImageMagick (provided that $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw'] is pointing to the path of a lzw-enabled version of 'convert') else with GD (should be RLE-enabled!)
+        * If $type is set to either 'IM' or 'GD' the compression is done with ImageMagick and GD respectively
+        * PNG:
+        * No changes.
+        *
+        * $theFile is expected to be a valid GIF-file!
+        * The function returns a code for the operation.
+        *
+        * @param string $theFile Filepath
+        * @param string $type See description of function
+        * @return string Returns "GD" if GD was used, otherwise "IM" if ImageMagick was used. If nothing done at all, it returns empty string.
+        */
+       static public function gifCompress($theFile, $type) {
+               $gfxConf = $GLOBALS['TYPO3_CONF_VARS']['GFX'];
+               if (!$gfxConf['gif_compress'] || strtolower(substr($theFile, -4, 4)) !== '.gif') {
+                       return '';
+               }
+
+               if (($type === 'IM' || !$type) && $gfxConf['im'] && $gfxConf['im_path_lzw']) {
+                       // Use temporary file to prevent problems with read and write lock on same file on network file systems
+                       $temporaryName = dirname($theFile) . '/' . md5(uniqid('', TRUE)) . '.gif';
+                       // Rename could fail, if a simultaneous thread is currently working on the same thing
+                       if (@rename($theFile, $temporaryName)) {
+                               $cmd = GeneralUtility::imageMagickCommand('convert', '"' . $temporaryName . '" "' . $theFile . '"', $gfxConf['im_path_lzw']);
+                               CommandUtility::exec($cmd);
+                               unlink($temporaryName);
+                       }
+                       $returnCode = 'IM';
+                       if (@is_file($theFile)) {
+                               GeneralUtility::fixPermissions($theFile);
+                       }
+               } elseif (($type === 'GD' || !$type) && $gfxConf['gdlib'] && !$gfxConf['gdlib_png']) {
+                       $tempImage = imageCreateFromGif($theFile);
+                       imageGif($tempImage, $theFile);
+                       imageDestroy($tempImage);
+                       $returnCode = 'GD';
+                       if (@is_file($theFile)) {
+                               GeneralUtility::fixPermissions($theFile);
+                       }
+               } else {
+                       $returnCode = '';
+               }
+
+               return $returnCode;
+       }
+
+       /**
+        * Converts a png file to gif.
+        * This converts a png file to gif IF the FLAG $GLOBALS['TYPO3_CONF_VARS']['FE']['png_to_gif'] is set TRUE.
+        *
+        * @param string $theFile The filename with path
+        * @return string|NULL New filename
+        */
+       static public function pngToGifByImagemagick($theFile) {
+               if (!$GLOBALS['TYPO3_CONF_VARS']['FE']['png_to_gif']
+                       || !$GLOBALS['TYPO3_CONF_VARS']['GFX']['im']
+                       || !$GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw']
+                       || strtolower(substr($theFile, -4, 4)) !== '.png'
+                       || !@is_file($theFile)
+               ) {
+                       return NULL;
+               }
+
+               $newFile = substr($theFile, 0, -4) . '.gif';
+               $cmd = GeneralUtility::imageMagickCommand(
+                       'convert', '"' . $theFile . '" "' . $newFile . '"', $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw']
+               );
+               CommandUtility::exec($cmd);
+               $theFile = $newFile;
+               if (@is_file($newFile)) {
+                       GeneralUtility::fixPermissions($newFile);
+               }
+
+               return $theFile;
+       }
+
+       /**
+        * Returns filename of the png/gif version of the input file (which can be png or gif).
+        * If input file type does not match the wanted output type a conversion is made and temp-filename returned.
+        *
+        * @param string $theFile Filepath of image file
+        * @param bool $output_png If TRUE, then input file is converted to PNG, otherwise to GIF
+        * @return string|NULL If the new image file exists, its filepath is returned
+        */
+       static public function readPngGif($theFile, $output_png = FALSE) {
+               if (!$GLOBALS['TYPO3_CONF_VARS']['GFX']['im'] || !@is_file($theFile)) {
+                       return NULL;
+               }
+
+               $ext = strtolower(substr($theFile, -4, 4));
+               if ((string)$ext == '.png' && $output_png || (string)$ext == '.gif' && !$output_png) {
+                       return $theFile;
+               }
+
+               $newFile = PATH_site . 'typo3temp/readPG_' . md5(($theFile . '|' . filemtime($theFile))) . ($output_png ? '.png' : '.gif');
+               $cmd = GeneralUtility::imageMagickCommand(
+                       'convert', '"' . $theFile . '" "' . $newFile . '"', $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path']
+               );
+               CommandUtility::exec($cmd);
+               if (@is_file($newFile)) {
+                       GeneralUtility::fixPermissions($newFile);
+                       return $newFile;
+               }
+       }
+
        /***********************************
         *
         * Various IO functions
@@ -2659,7 +2770,7 @@ class GraphicalFunctions {
                                                }
                                                // Compress with IM! (adds extra compression, LZW from ImageMagick)
                                                // (Workaround for the absence of lzw-compression in GD)
-                                               GeneralUtility::gif_compress($file, 'IM');
+                                               self::gifCompress($file, 'IM');
                                        }
                                        break;
                                case 'jpg':
index 17d5a5e..a2bec98 100755 (executable)
@@ -16,6 +16,7 @@ namespace TYPO3\CMS\Core\Utility;
 
 use TYPO3\CMS\Core\Core\ApplicationContext;
 use TYPO3\CMS\Core\Core\ClassLoader;
+use TYPO3\CMS\Core\Imaging\GraphicalFunctions;
 use TYPO3\CMS\Core\SingletonInterface;
 use TYPO3\CMS\Frontend\Page\PageRepository;
 
@@ -277,37 +278,11 @@ class GeneralUtility {
         * @param string $theFile Filepath
         * @param string $type See description of function
         * @return string Returns "GD" if GD was used, otherwise "IM" if ImageMagick was used. If nothing done at all, it returns empty string.
+        * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8. Use \TYPO3\CMS\Core\Imaging\GraphicalFunctions::gifCompress() instead.
         */
        static public function gif_compress($theFile, $type) {
-               $gfxConf = $GLOBALS['TYPO3_CONF_VARS']['GFX'];
-               $returnCode = '';
-               // GIF...
-               if ($gfxConf['gif_compress'] && strtolower(substr($theFile, -4, 4)) == '.gif') {
-                       // IM
-                       if (($type == 'IM' || !$type) && $gfxConf['im'] && $gfxConf['im_path_lzw']) {
-                               // Use temporary file to prevent problems with read and write lock on same file on network file systems
-                               $temporaryName = dirname($theFile) . '/' . md5(uniqid('', TRUE)) . '.gif';
-                               // Rename could fail, if a simultaneous thread is currently working on the same thing
-                               if (@rename($theFile, $temporaryName)) {
-                                       $cmd = self::imageMagickCommand('convert', '"' . $temporaryName . '" "' . $theFile . '"', $gfxConf['im_path_lzw']);
-                                       CommandUtility::exec($cmd);
-                                       unlink($temporaryName);
-                               }
-                               $returnCode = 'IM';
-                               if (@is_file($theFile)) {
-                                       self::fixPermissions($theFile);
-                               }
-                       } elseif (($type == 'GD' || !$type) && $gfxConf['gdlib'] && !$gfxConf['gdlib_png']) {
-                               // GD
-                               $tempImage = imageCreateFromGif($theFile);
-                               imageGif($tempImage, $theFile);
-                               imageDestroy($tempImage);
-                               $returnCode = 'GD';
-                               if (@is_file($theFile)) {
-                                       self::fixPermissions($theFile);
-                               }
-                       }
-               }
+               static::logDeprecatedFunction();
+               $returnCode = GraphicalFunctions::gifCompress($theFile, $type);
                return $returnCode;
        }
 
@@ -317,19 +292,12 @@ class GeneralUtility {
         *
         * @param string $theFile The filename with path
         * @return string New filename
+        * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8. Use \TYPO3\CMS\Core\Imaging\GraphicalFunctions::pngToGifByImagemagick() instead.
         */
        static public function png_to_gif_by_imagemagick($theFile) {
-               if ($GLOBALS['TYPO3_CONF_VARS']['FE']['png_to_gif'] && $GLOBALS['TYPO3_CONF_VARS']['GFX']['im'] && $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw'] && strtolower(substr($theFile, -4, 4)) == '.png' && @is_file($theFile)) {
-                       // IM
-                       $newFile = substr($theFile, 0, -4) . '.gif';
-                       $cmd = self::imageMagickCommand('convert', '"' . $theFile . '" "' . $newFile . '"', $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw']);
-                       CommandUtility::exec($cmd);
-                       $theFile = $newFile;
-                       if (@is_file($newFile)) {
-                               self::fixPermissions($newFile);
-                       }
-               }
-               return $theFile;
+               static::logDeprecatedFunction();
+               $newFile = GraphicalFunctions::pngToGifByImagemagick($theFile);
+               return $newFile;
        }
 
        /**
@@ -339,22 +307,12 @@ class GeneralUtility {
         * @param string $theFile Filepath of image file
         * @param bool $output_png If set, then input file is converted to PNG, otherwise to GIF
         * @return string If the new image file exists, its filepath is returned
+        * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8. Use \TYPO3\CMS\Core\Imaging\GraphicalFunctions::readPngGif() instead.
         */
        static public function read_png_gif($theFile, $output_png = FALSE) {
-               if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['im'] && @is_file($theFile)) {
-                       $ext = strtolower(substr($theFile, -4, 4));
-                       if ((string)$ext == '.png' && $output_png || (string)$ext == '.gif' && !$output_png) {
-                               return $theFile;
-                       } else {
-                               $newFile = PATH_site . 'typo3temp/readPG_' . md5(($theFile . '|' . filemtime($theFile))) . ($output_png ? '.png' : '.gif');
-                               $cmd = self::imageMagickCommand('convert', '"' . $theFile . '" "' . $newFile . '"', $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path']);
-                               CommandUtility::exec($cmd);
-                               if (@is_file($newFile)) {
-                                       self::fixPermissions($newFile);
-                                       return $newFile;
-                               }
-                       }
-               }
+               static::logDeprecatedFunction();
+               $newFile = GraphicalFunctions::readPngGif($theFile, $output_png);
+               return $newFile;
        }
 
        /*************************
index 4441e65..b2a78c4 100644 (file)
@@ -24,7 +24,7 @@ return array(
                'image_processing' => TRUE,                                             // Boolean: Enables image processing features. Disabling this means NO image processing with either GD or IM!
                'thumbnails' => TRUE,                                                   // Boolean: Enables the use of thumbnails in the backend interface. Thumbnails are generated by IM/partly GD in the file typo3/thumbs.php
                'thumbnails_png' => 0,                                                  // Bits. Bit0: If set, thumbnails from non-jpegs will be 'png', otherwise 'gif' (0=gif/1=png). Bit1: Even JPG's will be converted to png or gif (2=gif/3=png)
-               'gif_compress' => TRUE,                                                 // Boolean: Enables the use of the \TYPO3\CMS\Core\Utility\GeneralUtility::gif_compress() workaround function for compressing giffiles made with GD or IM, which probably use only RLE or no compression at all.
+               'gif_compress' => TRUE,                                                 // Boolean: Enables the use of the \TYPO3\CMS\Core\Utility\GeneralUtility::gifCompress() workaround function for compressing giffiles made with GD or IM, which probably use only RLE or no compression at all.
                'imagefile_ext' => 'gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai',// Commalist of file extensions perceived as images by TYPO3. List should be set to 'gif,png,jpeg,jpg' if IM is not available. Lowercase and no spaces between!
                'gdlib' => TRUE,                                                                // Boolean: Enables the use of GD.
                'gdlib_png' => FALSE,                                                   // Boolean: Enables the use of GD, with PNG only. This means that all items normally generated as gif-files will be png-files instead!
index 21c0006..39ddd7e 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Frontend\ContentObject;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Imaging\GraphicalFunctions;
 use TYPO3\CMS\Core\Utility\ArrayUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Versioning\VersionState;
@@ -1408,7 +1409,7 @@ class ContentObjectRenderer {
                        return '';
                }
                if (is_file(PATH_site . $info['3'])) {
-                       $source = GeneralUtility::rawUrlEncodeFP(GeneralUtility::png_to_gif_by_imagemagick($info[3]));
+                       $source = GeneralUtility::rawUrlEncodeFP(GraphicalFunctions::pngToGifByImagemagick($info[3]));
                        $source = $GLOBALS['TSFE']->absRefPrefix . $source;
                } else {
                        $source = $info[3];
index 1d36bb2..c6f3ac5 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Frontend\ContentObject\Menu;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Imaging\GraphicalFunctions;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -250,7 +251,7 @@ class GraphicalMenuContentObject extends AbstractMenuContentObject {
                                $gifCreator->output($this->result[$resKey][$key]['output_file']);
                                $gifCreator->destroy();
                        }
-                       $this->result[$resKey][$key]['output_file'] = GeneralUtility::png_to_gif_by_imagemagick($this->result[$resKey][$key]['output_file']);
+                       $this->result[$resKey][$key]['output_file'] = GraphicalFunctions::pngToGifByImagemagick($this->result[$resKey][$key]['output_file']);
                        // counter is increased
                        $Hcounter += $this->result[$resKey][$key]['output_h'];
                        // counter is increased
index 7a66e35..46d69a8 100644 (file)
@@ -14,6 +14,8 @@ namespace TYPO3\CMS\Frontend\ContentObject\Menu;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Imaging\GraphicalFunctions;
+
 /**
  * ImageMap based menus
  *
@@ -209,7 +211,7 @@ class ImageMenuContentObject extends AbstractMenuContentObject {
                                        $this->sys_page->storeHash($imgHash, $imgMap, 'MENUIMAGEMAP');
                                }
                                $imgMap .= $this->mconf['imgMapExtras'];
-                               $gifFileName = \TYPO3\CMS\Core\Utility\GeneralUtility::png_to_gif_by_imagemagick($gifFileName);
+                               $gifFileName = GraphicalFunctions::pngToGifByImagemagick($gifFileName);
                                $this->result = array('output_file' => $gifFileName, 'output_w' => $w, 'output_h' => $h, 'imgMap' => $imgMap);
                        }
                }
index 1ff28a7..5150057 100644 (file)
@@ -14,6 +14,8 @@ namespace TYPO3\CMS\Frontend\ContentObject\Menu;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Imaging\GraphicalFunctions;
+
 /**
  * Extension class creating text based menus
  *
@@ -170,7 +172,7 @@ class TextMenuContentObject extends AbstractMenuContentObject {
        public function getBeforeAfter($pref) {
                $res = '';
                if ($imgInfo = $this->WMcObj->getImgResource($this->I['val'][$pref . 'Img'], $this->I['val'][$pref . 'Img.'])) {
-                       $imgInfo[3] = \TYPO3\CMS\Core\Utility\GeneralUtility::png_to_gif_by_imagemagick($imgInfo[3]);
+                       $imgInfo[3] = GraphicalFunctions::pngToGifByImagemagick($imgInfo[3]);
                        $theName = $this->imgNamePrefix . $this->I['uid'] . $this->I['INPfix'] . $pref;
                        $name = ' ' . $this->nameAttribute . '="' . $theName . '"';
                        $GLOBALS['TSFE']->imagesOnPage[] = $imgInfo[3];
index cecf41c..9723d46 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Install\Controller\Action\Tool;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Imaging\GraphicalFunctions;
 use TYPO3\CMS\Install\Controller\Action;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
@@ -273,7 +274,7 @@ class TestSetup extends Action\AbstractAction {
                        if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gif_compress']) {
                                clearstatcache();
                                $previousSize = GeneralUtility::formatSize(filesize($imResult[3]));
-                               $methodUsed = GeneralUtility::gif_compress($imResult[3], '');
+                               $methodUsed = GraphicalFunctions::gifCompress($imResult[3], '');
                                clearstatcache();
                                $compressedSize = GeneralUtility::formatSize(filesize($imResult[3]));
                                /** @var \TYPO3\CMS\Install\Status\StatusInterface $message */
@@ -633,11 +634,11 @@ class TestSetup extends Action\AbstractAction {
        /**
         * Initialize image processor
         *
-        * @return \TYPO3\CMS\Core\Imaging\GraphicalFunctions Initialized image processor
+        * @return GraphicalFunctions Initialized image processor
         */
        protected function initializeImageProcessor() {
-               /** @var \TYPO3\CMS\Core\Imaging\GraphicalFunctions $imageProcessor */
-               $imageProcessor = $this->objectManager->get(\TYPO3\CMS\Core\Imaging\GraphicalFunctions::class);
+               /** @var GraphicalFunctions $imageProcessor */
+               $imageProcessor = $this->objectManager->get(GraphicalFunctions::class);
                $imageProcessor->init();
                $imageProcessor->tempPath = PATH_site . 'typo3temp/';
                $imageProcessor->dontCheckForExistingTempFile = 1;
index fd35c2b..30ccca9 100644 (file)
@@ -16,7 +16,7 @@
                        <p>
                                This verifies that ImageMagick is able to write GIF and PNG files.
                                The GIF-file is attempted compressed with LZW by the
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::gif_compress() function.
+                               \TYPO3\CMS\Core\Imaging\GraphicalFunctions::gifCompress() function.
                        </p>
 
                        <f:for each="{testResults}" as="test">