Issue Feature Closed

#14269Bug when using images_frames, jpg images and quality settings

old_hoang 08/12/04, 11:50 updated 10/19/05, 18:58

Description

Problem was that when using jpg images and images_frames the image quality
was very poor in T3.6.1

My solution:

1. there is bug in function getImgResource($file,$fileArray) of
class.tslib_content.php when using mask and jpg. I added the lines

function getImgResource($file,$fileArray) {
…
{ // If ImageMagick version 5+
$temp_ext=$gifCreator->gifExtension;
}

// here comes my changes… because otherwise jpg would become gif
if ($fI[‘fileext’] ===‘jpg’) {
$temp_ext=‘jpg’;
}
}
…

}

2. Unfortunately the image quality setting is not passed to function
combineExec($input,$overlay,$mask,$output) in class.t3lib_stdgraphic.php,
so I did harcoded it (which is bad, but I cant do better atm):

function combineExec($input,$overlay,$mask,$output) {
if (!$this->NO_IMAGE_MAGICK) {
$cmd = $this->imageMagickPath.$this->combineScript.’ -compose
over -quality 100 ‘.$this->wrapFileName($input).‘
’.$this->wrapFileName($overlay).’ ‘.$this->wrapFileName($mask).‘
’.$this->wrapFileName($output);
$this->IM_commands[] = Array ($output,$cmd);
exec($cmd);
}
}

Look at -quality 100.

(issue imported from #M285)

Reviews 0

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