note 105711 added to function.imagickdraw-settextundercolor

From: Date: Thu, 08 Sep 2011 16:01:08 +0000
Subject: note 105711 added to function.imagickdraw-settextundercolor
Groups: php.notes 
Request: Send a blank email to php-notes+get-183035@lists.php.net to get a copy of this message
When wishing to print some text on a photograph and make that text sufficiently contrasting to the background image, use a 4 byte code for colour and transparency. It is the same 4 byte code using by the parameter '-undercolor' in ImageMagick's command lime instruction 'convert'. The first 3 bytes are the RGB colour code and the fourth byte is the transparency byte. <?php $draw = new ImagickDraw(); $draw->setFillColor('#ffff00'); $draw->setFont('Eurostile'); $draw->setFontSize(21); $draw->setTextUnderColor('#ff000088'); $picin->annotateImage($draw,40,$height-10,0,"Hallo"); ?> The example code produces yellow text on a semi-transparent red background. ---- Server IP: 69.147.83.197 Probable Submitter: 195.149.57.196 ---- Manual Page -- http://www.php.net/manual/en/function.imagickdraw-settextundercolor.php Edit -- https://master.php.net/note/edit/105711 Del: integrated -- https://master.php.net/note/delete/105711/integrated Del: useless -- https://master.php.net/note/delete/105711/useless Del: bad code -- https://master.php.net/note/delete/105711/bad+code Del: spam -- https://master.php.net/note/delete/105711/spam Del: non-english -- https://master.php.net/note/delete/105711/non-english Del: in docs -- https://master.php.net/note/delete/105711/in+docs Del: other reasons-- https://master.php.net/note/delete/105711 Reject -- https://master.php.net/note/reject/105711 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#183035) next »