Bug #17508
closedimage effects: grayscale in text w/image not working
0%
Description
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:
typo3_src-4.1.2/typo3/sysext/cms/tslib/class.tslib_content.php
305c305
< 10 => '-colorspace GRAY',
---
10 => '-modulate 90,0', // grayscale image
(issue imported from #M6106)
Files
Updated by Joris Willems over 16 years ago
The same problem is still present on TYPO3 4.1.3. I also experienced it on Debian GNU/Linux 4.0.
Updated by Valery Romanchev over 16 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
to change:
case 'gray':
$commands.=' -colorspace GRAY';
break;
to
case 'gray':
$commands.=' -type GrayScaleMatte';
break;
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 Steffen Kamper over 16 years ago
looking to IM this is a bug from versions 6.2.xxx and was fixed with 6.3, so it should work without patch using any version of IM except 6.2.xxx
Updated by Joris Willems over 16 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 over 15 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)
Updated by Jigal van Hemert over 13 years ago
It is indeed a bug in this specific version of ImageMagick. Closed because it has to be fixed outside TYPO3 (i.e. use any other version or GraphicsMagick)