[Typo3-dev] Bug when using images_frames, jpg images and quality settings
Michael Stucki
mundaun at gmx.ch
Fri Sep 10 18:21:37 CEST 2004
Hello Chi,
this is a reply to an old mail.
I think this bug is still open but I can currently not fix this. Can you
please submit a bug on bugs.typo3.org or tell me the bug ID if you already
did this?
Regards, michael
Fullquote because you might not remember the topic anymore ;-)
> 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 (!@file_exists($dest)) {
>
> $temp_ext='png';
> if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_mask_temp_ext_gif'])
> { // 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.
>
>
> My image quality is now awesome when using image_frames. I hope it might
> be some help to you.
>
> Greetings,
>
> Chi
--
Want support? Please read the list rules first: http://typo3.org/1438.0.html
More information about the TYPO3-dev
mailing list