Issue Bug Closed

#17446TypoScript GIFBUILDER change jpg-quality has no effect

Remo Hartwig 07/06/07, 13:34 updated 05/14/08, 10:37

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)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.