Bug #17446
closedTypoScript GIFBUILDER change jpg-quality has no effect
0%
Description
lib.headerimg = IMAGE
lib.headerimg {
file = GIFBUILDER
file {
XY = 628, 148
format = jpg
#quality = 20
quality = 100
10 = IMAGE
10 {
file = fileadmin/templates/bilder/top_ueberschrift.jpg
}
}
}
change from quality = 100 to quality = 20 has no effect
If I want to change the quality of a JPG within GIFBUILDER, I have to set the value to
$TYPO3_CONF_VARS['GFX']['jpg_quality']
The cause of this behavior was found in typo3/t3lib/class.t3lib_stdgraphic.php.
In
function output($file)
for case:jpg
there is the codeline
if ($this->ImageWrite($this->im, $file, $quality));
The
function ImageWrite($destImg, $theImage)
has no quality param
Workaround:
function ImageWrite($destImg, $theImage, $quality = 0)
and then in case jpeg:
case 'jpeg':
if (function_exists('imageJpeg')) {
if($quality == 0)
$quality = $this->jpegQuality;
return imageJpeg($destImg, $theImage, $quality);
}
(issue imported from #M5911)
Files