Project

General

Profile

Actions

Feature #14269

closed

Bug when using images_frames, jpg images and quality settings

Added by old_hoang almost 20 years ago. Updated over 18 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2004-08-12
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

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)


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #14537: gifbuilder jpgs are 256 colorsClosedBernhard Kraft2005-02-08

Actions

No data to display

Actions

Also available in: Atom PDF