[TYPO3-english] Imagemagick images too dark?

Brian Hauge Hansen b.hansen at mobilethink.com
Wed Apr 18 09:51:28 CEST 2012


Thanks for all the answers. The problem is most likely do to a wrong setup
done by my hosting company Hostgator.

This Extension solved it for me:
http://typo3.org/extension-manuals/jb_gd_resize/1.1.5/view/


Want to share this response with you:


#######################
#######################

I've found where you can modify how Typo3 calls ImageMagick. You can edit
line 51 of t3lib/config_default.php.


[root at gator1825 /home/hauge/public_html/test]# grep -n
im_stripProfileCommand t3lib/config_default.php

51:             'im_stripProfileCommand' => '+profile \'*\'', //
String: Specify the command to strip the profile information, which can
reduce thumbnail size up to 60KB. Command can differ in IM/GM, IM also
know the -strip command. See <a
href="http://www.imagemagick.org/Usage/thumbnails/#profiles"
target="_blank">imagemagick.org <http://imagemagick.org></a> for details


This makes Typo3 call ImageMagick like so:

---------------------------------------------------------------------------
----- 

'/usr/bin/convert' -modulate 190,80,90 +profile '*' -geometry
170x136! -colorspace RGB -quality 80
'/home/hauge/public_html/test/typo3/sysext/install/imgs/jesus.jpg'[0]
'/home/hauge/public_html/test/typo3temp/pics/install_read_jpg.jpg'

---------------------------------------------------------------------------
----- 


So I've modified it like so to add a module command (copying the line and
commenting out the original):


[root at gator1825 /home/hauge/public_html/test]# grep -n
'im_stripProfileCommand' t3lib/config_default.php

51:             //'im_stripProfileCommand' => '+profile \'*\'',
// String: Specify the command to strip the profile information, which
can reduce thumbnail size up to 60KB. Command can differ in IM/GM, IM
also know the -strip command. See <a
href="http://www.imagemagick.org/Usage/thumbnails/#profiles"
target="_blank">imagemagick.org <http://imagemagick.org></a> for details

52:             'im_stripProfileCommand' => '-modulate
150,100,100 +profile \'*\'', // String: Specify the command to strip the
 profile information, which can reduce thumbnail size up to 60KB.
Command can differ in IM/GM, IM also know the -strip command. See <a
href="http://www.imagemagick.org/Usage/thumbnails/#profiles"
target="_blank">imagemagick.org <http://imagemagick.org></a> for details

53:             'im_useStripProfileByDefault' => TRUE,  //
Boolean: If set, the im_stripProfileCommand is used with all IM Image
operations by default. See tsRef for setting this parameter explocit for
 IMAGE generation.


Here are the results of running -modulate 150,100,100 to increase
the brightness 50% without changing hue or saturation. As you can see
the results aren't great, but it's a start and it gives you a place to
do some experimenting with how Typo3 calls ImageMagick.

http://test.brianhauge.dk/typo3/install/index.php?TYPO3_INSTALL[type]=image
s&TYPO3_INSTALL[images_type]=read

You might also try this extension:

http://typo3.org/extension-manuals/jb_gd_resize/1.1.5/view/

It switches to use libGD instead of ImageMagick for image resizing, which
might solve the issue for you.




#######################
#######################




Best Regards / Med venlig hilsen
Brian Hauge Hansen

Project Manager

mobilethink-
Ny Banegaardsgade 55
8000 Aarhus C
Denmark
Phone: +45 86 20 78 05
Mobile: +45 25 21 20 02
Email: b.hansen at mobilethink.com
 <mailto:support at mobilethink.com>Web: www.mobilethink.dk
<http://www.mobilethink.dk/>



On 4/12/12 6:00 PM, "Brian Hauge Hansen" <b.hansen at mobilethink.com> wrote:

>Got it CE (content element).
>
>
>My typescript looks like this:
>10 = IMAGE
>	10.file.XY = 200,150
>		10.file.import = uploads/tx_templavoila/
>		10.file.import.current = 1
>		10.file.import.listNum = 0
>		10.file.maxW = 148
>		10.file.minW = 148
>
>But i the problem is for all images generated.
>
>
>
>On 4/12/12 5:51 PM, "Brian Hauge Hansen" <b.hansen at mobilethink.com> wrote:
>
>>Not sure what you mean by that?
>>
>>sure that in the CE there is not set a "darken" effect for the image ???
>>
>>What is CE?
>>
>>
>>On 4/12/12 5:34 PM, "Ralf-Rene Schröder" <ralf.rene at online.de> wrote:
>>
>>>Am 12.04.2012 09:20, schrieb Brian Hauge Hansen:
>>>> I have a problem after moving to version 4.6.4 that the images
>>>>generated by Imagemagick gets very dark?
>>>sure that in the CE there is not set a "darken" effect for the image ???
>>>
>>>-- 
>>>image[FORMAT] - Ralf-René Schröder
>>>http://image-format.eu ... Wir geben Ihrem Image das richtige Format
>>>http://if-20.com  ... YAML templates for TYPO3
>>>_______________________________________________
>>>TYPO3-english mailing list
>>>TYPO3-english at lists.typo3.org
>>>http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>>
>>_______________________________________________
>>TYPO3-english mailing list
>>TYPO3-english at lists.typo3.org
>>http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>
>
>
>
>
>Hi list
>The version if ImageMagick i 6
>
>
>My configuration is like this:
>
>ImageMagick enabled:		1
>ImageMagick path:		/usr/bin/ (6.7.6-1)
>ImageMagick path/LZW:		/usr/bin/ (6.7.6-1)
>Version 5/GraphicsMagick flag:	im6
>
>GDLib enabled:		1
>GDLib using PNG:	1
>IM5 effects enabled:	0 (Blurring/Sharpening with IM 5+)
>Freetype DPI:		96 (Should be 96 for Freetype 2)
>Mask invert: (Should be set for some IM versions approx. 5.4+)
>
>File Formats:		gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai
>
>
>
>$TYPO3_CONF_VARS['GFX']['im_combine_filename'] = 'composite';
>$TYPO3_CONF_VARS['GFX']['gdlib_png'] = '1';
>$TYPO3_CONF_VARS['GFX']['im'] = '1';
>$TYPO3_CONF_VARS['GFX']['im_path'] = '/usr/bin/';
>$TYPO3_CONF_VARS['GFX']['im_path_lzw'] = '/usr/bin/';
>
>
>
>On 4/12/12 3:21 PM, "Oliver Salzburg" <oliver.salzburg at googlemail.com>
>wrote:
>
>>On 2012-04-12 09:20, Brian Hauge Hansen wrote:
>>>Hi List
>>>I have a problem after moving to version 4.6.4 that the images
>>>generated by Imagemagick gets very dark?
>>>http://ghanavenskabsgrupperne.dk/aktiviteter/ghana-sangdag/ (the small
>>>picture beside the text).
>>>Is there a way to configure the brightness/contrast/gamma for the
>>>generated images?
>>>Guess this is called "modulate" in ImageMagick. But how to set this in
>>>Typo3?
>>
>>What version of ImageMagick are you using?
>>
>>Any special settings we should know about?
>>Like [GFX][im_no_effects] or [GFX][im_v5effects]?
>>
>>Cheers
>>Oliver
>>_______________________________________________
>>TYPO3-english mailing list
>>TYPO3-english at lists.typo3.org
>>http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>
>_______________________________________________
>TYPO3-english mailing list
>TYPO3-english at lists.typo3.org
>http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english



More information about the TYPO3-english mailing list