Project

General

Profile

Actions

Bug #17446

closed

TypoScript GIFBUILDER change jpg-quality has no effect

Added by Remo Hartwig over 17 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2007-07-06
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

class.t3lib_stdgraphic.php (2.51 KB) class.t3lib_stdgraphic.php Administrator Admin, 2007-07-06 13:34
Actions

Also available in: Atom PDF