Project

General

Profile

Bug #24313 » 16707_4-3.patch

Administrator Admin, 2010-12-12 10:10

View differences:

t3lib/class.t3lib_div.php (working copy)
$returnCode='';
if ($gfxConf['gif_compress'] && strtolower(substr($theFile,-4,4))=='.gif') { // GIF...
if (($type=='IM' || !$type) && $gfxConf['im'] && $gfxConf['im_path_lzw']) { // IM
$cmd = self::imageMagickCommand('convert', '"'.$theFile.'" "'.$theFile.'"', $gfxConf['im_path_lzw']);
// use temporary file to prevent problems with read and write lock on same file on network file systems
$temporaryName = substr($theFile, 0, strrpos($theFile, basename($theFile))) . md5(uniqid()) . '.gif';
@rename($theFile, $temporaryName);
$cmd = self::imageMagickCommand('convert', '"' . $temporaryName . '" "' . $theFile . '"', $gfxConf['im_path_lzw']);
exec($cmd);
@unlink($temporaryName);
$returnCode='IM';
} elseif (($type=='GD' || !$type) && $gfxConf['gdlib'] && !$gfxConf['gdlib_png']) { // GD
$tempImage = imageCreateFromGif($theFile);
(1-1/3)