GraphicsMagick und ImageMagick skalieren in den aktuellen Versionen transparente Bilder nicht sehr schön (die Ecken sehen ausgefranst aus). Zumindest GraphicsMagick konnte das früher schonmal besser: Version 1.1.11 produziert ein wunderschönes Ergebnis.
Um das vorhandene CentOS-Setup nicht unnötig zu verändern und eine einigermaßen portable Lösung zu bekommen, habe ich ein statisches Binary von GraphicsMagic in Version 1.1.11 gebaut:
[root@example.com bin]# ./gm version GraphicsMagick 1.1.11 2008-02-23 Q8 http://www.GraphicsMagick.org/ Copyright (C) 2002-2007 GraphicsMagick Group. Additional copyrights and licenses apply to this software. See http://www.GraphicsMagick.org/www/Copyright.html for details. Feature Support: Thread Safe no Large Files (> 32 bit) yes Large Memory (> 32 bit) yes BZIP no DPS no FlashPix no Ghostscript (Library) no JBIG no JPEG-2000 no JPEG no Little CMS no Loadable Modules no PNG no TIFF no TRIO no FreeType no WMF no X11 no XML no ZLIB no Host type: x86_64-unknown-linux-gnu Configured using the command: ./configure '--enable-static' '--disable-shared' '--without-perl' '--without-magick-plus-plus' '--without-x' '--without-fpx' '--without-threads' '--without-dps' '--without-LCMS' '--without-trio' '--without-wmf' '--disable-installed' '--enable-ltdl-convenience' '--prefix=/usr/local/graphicsmagik-1.1.11' Final Build Parameters: CC = gcc -std=gnu99 CFLAGS = -g -O2 -Wall CPPFLAGS = CXX = g++ CXXFLAGS = -g -O2 LDFLAGS = LIBS = -lm
Leider war auf dem Server auch ImageMagick installiert, welches von einem anderen Kunden benötigt wurde. Das Typo3 Install Tool zieht dieses dann immer dem GraphicsMagick vor, auch wenn man ihm den Ordner der das gm-Binary enthält extra vorgibt. Damit gm von Typo3 nun auch wirklich verwendet wird, muss man in der typo3conf/localconf.php die $TYPO3_CONF_VARS['GFX'] Einstellungen manuell abändern:
$TYPO3_CONF_VARS['GFX']['gdlib_2'] = '1'; $TYPO3_CONF_VARS['GFX']['im_path'] = '/var/www/vhosts/example.com/bin/'; $TYPO3_CONF_VARS['GFX']['im_version_5'] = 'gm'; $TYPO3_CONF_VARS['GFX']['im_path_lzw'] = ''; $TYPO3_CONF_VARS['GFX']['jpg_quality'] = '90';