image effects: grayscale in text w/image not working
All image effects are working despite grayscaling images. The command line which TYPO3 tries to execute rusults in the failure message "Bogus input file" because of wrong parameter order.
TYPO3 Version: 4.1.2
ImageMagick: 6.2.4 07/09/07 Q16
OS: Ubuntu 6.06 LTS Server
The following, simple patch works for me. It does not need the command line parameters to be reordered in the TYPO3 sources. I simply switched from grayscaling the image to reducing the color saturation, which should do the same:
< 10 => '-colorspace GRAY',
10 => '-modulate 90,0', // grayscale image
(issue imported from #M6106)
Updated by Valery Romanchev about 13 years ago
I have the problem of same origin on FreeBSD 4.x and 6.x with im6
(I try this on 3 different hosting accounts with FreeBSD):
convert -colorspace GRAY test.jpg test3.gif
convert -colorspace GRAY test.jpg test3.png
does not works (test3.gif test3.png has RGB colors)
But this works fine on Debian and Fedora Core4.
(Please note that "convert -colorspace GRAY test.jpg test3.jpg" works fine on all systems).
The result on this is that GIFBUILDER does not works properly with
EFFECT = gray, because all temporary files have to be gif or png.
The solution is to change option "-colorspace GRAY" to something else.
There are many variants. I use "-type GrayScaleMatte"
The patch shoud be made also for class.t3lib_stdgraphic.php
$commands.=' -colorspace GRAY';
$commands.=' -type GrayScaleMatte';
I think it is good to create $TYPO3_CONF_VARS['GFX']['im_gray_option'] because the behavior on differen systems is really different.
Updated by Joris Willems about 13 years ago
The proposed patch is no good solution as I have checked the recommended version of ImageMagick ( 4.2.9 ) and the patch does not work as expected ( blank images ) on this version.
As Steffen clarifies this is just a bug in 6.2 of ImageMagick.
Use version 6.3 or 4.2.9.
Updated by Christian Kuhn almost 12 years ago
So this could be closed, no change required, because it's not a TYPO3 problem?
The affected Debian 4.0 (oldstable, etch) systems could solve this with:
- Switch to graphicsmagick
- Upgrade to Debian 5.0 (stable, lenny, comes with im 6.3.7)
- Use imagemagick package from backports.org (they have a imagemagick 6.3.7 lenny to etch backport)