[TYPO3-english] ImageMagick 6.8.0-10 2012-12-16 Q16 + TYPO3 V6.X too dark images

BVB Media (Bas van Beek) bvbmedia at gmail.com
Wed Feb 6 22:30:04 CET 2013

Alright, it's clear to me that the cause of the issue started at the time we are using a newer ImageMagick version.

But what I don't understand. Multishop also uses ImageMagick for resizing, stripping of profiles and for adding watermarks. But the results are always okay, never noticed too dark images issues. So for Multishop it does not matter if we use a newer version of ImageMagick.

If I upload an image to a TYPO3 content element and I specify a width (to create a thumbnail of the image) than the image is way too dark.

This indicates to me that ImageMagick is being executed with some extra parameters that perhaps are not necessary for creating just a simple thumbnail. That way the dark image problem would possibly be bypassed in 95% of the cases that we need ImageMagick to resize images.

Here is the command that Multishop executes for resizing a category image:

if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5']=='im6') $params.='-strip';
$commands[] = t3lib_div::imageMagickCommand('convert', $params.' -quality '.$GLOBALS['TYPO3_CONF_VARS']['GFX']['jpg_quality'].' -resize "'.$maxwidth.'x'.$maxheight.'>" "'.$target .'" "'.$target .'"', $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw']);
Met innovatieve groet / With best regards,

Bas van Beek

BVB Media B.V.

Maasdijk 62
5308 JD  Aalst gld
The Netherlands

/ algemeen: +31(0)418 82 02 11 : +31(0)418 82 02 12
+ : bas at bvbmedia.nl
 :  www.bvbmedia.nl / www.bvbmedia.com

Recentelijk opgeleverd:
db2u.com / parfumoutlet.nl / prijsvechter.nl / totaalzoeker.nl / wattcher.nl / bbms.nl / www.anacgroep.nl / www.verkeerslantaarn.nl / www.degamobiel.nl

-----Original Message-----
From: typo3-english-bounces at lists.typo3.org [mailto:typo3-english-bounces at lists.typo3.org] On Behalf Of Jigal van Hemert
Sent: dinsdag 5 februari 2013 08:47
To: typo3-english at lists.typo3.org
Subject: Re: [TYPO3-english] ImageMagick 6.8.0-10 2012-12-16 Q16 + TYPO3 V6.X too dark images


On 5-2-2013 1:14, Christian Kuhn wrote:
> * I don't like that some additional setting needs to be done to get it 
> right again. imho, the code should handle it internally (read: take 
> correct path by checking im version). But, if its done internally and 
> released as bugfix, this means that all images will change during 
> upgrading (they are technically more correct than before, but they 
> *do* change). This might not be exactly cool for some people, 
> especially if released as bugfix for 4.5.

The problem with automagically determining the right setting is that this is usually done by checking a version number. If the authors of IM see the light and revert the default behaviour in  6.8.2 we have the same problem and need to release a bugfix for that version.

Having a setting will at least let an administrator make the changes himself/herself.

If any automatic handling is done it should be a test with an image. 
We've done this kind of magic before with dpi-settings for Freetype versions (before we dropped support for GD < 2).
This is typically a task for the Install Tool and it may still be necessary to have a manual setting if for some reason the test may give incorrect resultats.

> * We might release the patch for 6.1 only (and *maybe* 6.0), but then 
> there will be no good choice for instances of 4.7 and below ...
> * If there is an additional config setting, there should be logic to 
> at least choose some sane default during install process.

We could split the solution in two cases:
- 6.1 (maybe 6.0) : automatic detection in Install Tool, with possibility to set it manually
- lower versions, for the sake of stability and because it is more likely that older IM versions are used: manual setting with default to RGB (as it was hardcoded before)

For now I would go with Anja's patch. As a follow up for newer releases try to implement an automatic check; RMs can decide if they will allow this in their releases. At least the issue will be fixed and if the RM allows it even with an automatic solution.

(For 6.2 LTS I would really like to build a new graphics library. Maybe it can be started soon and have it completely ready for 6.2-alpha1.)

Jigal van Hemert
TYPO3 Core Team member

TYPO3 .... inspiring people to share!
Get involved: typo3.org
TYPO3-english mailing list
TYPO3-english at lists.typo3.org

More information about the TYPO3-english mailing list