Project

General

Profile

Feature #17729 » 6604_4.1.3.patch

Administrator Admin, 2007-10-28 14:35

View differences:

class.t3lib_stdgraphic.php 2007-10-28 14:25:06.000000000 +0100
if (@is_file($origName)) {
$tmpImg = $this->imageCreateFromFile($origName);
}
} elseif (t3lib_div::intInRange($closest,1,99)) {
// parameter closest is set, but no color array is provided:
// treat closest not as boolean, but as percentage value for -fuzz parameter
$origName = $preName = $this->randomName().'.png';
$postName = $this->randomName().'.png';
$this->imageWrite($img, $preName);
$color = $this->hexColor($firstColArr);
$cmd = '-fuzz '.intval($closest).'% -fill "'.$color.'" -opaque "'.$color.'"';
$this->imageMagickExec($preName, $postName, $cmd);
$preName = $postName;
$this->imageMagickExec($postName, $origName, '');
if (@is_file($origName)) {
$tmpImg = $this->imageCreateFromFile($origName);
}
} else {
$tmpImg = $img;
}
(1-1/3)