|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-02-18 09:57 UTC] svn@php.net
[2010-02-18 09:58 UTC] degeberg@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 23:00:01 2026 UTC |
Description: ------------ Example of Imagick::annotateImage is incorrect Instead of /* Black text */ $pixel->setColor('black'); It should be /* Bluse text */ $draw->setFillColor('blue'); The function selects BLACK as the default and the setColor is working on the image not the text Reproduce code: --------------- --- From manual page: http://www.php.net/function.imagick-annotateimage#See Also --- <?php /* Create some objects */ $image = new Imagick(); $draw = new ImagickDraw(); $pixel = new ImagickPixel( 'gray' ); /* New image */ $image->newImage(800, 75, $pixel); /* Font properties */ $draw->setFont('Bookman-DemiItalic'); $draw->setFontSize( 30 ); $draw->setFillColor('black' ); /* Create text */ $image->annotateImage($draw, 10, 45, 0, 'The quick brown fox jumps over the lazy dog'); /* Give image a format */ $image->setImageFormat('png'); /* Output the image with headers */ header('Content-type: image/png'); echo $image; ?> Expected result: ---------------- See Above Actual result: -------------- See Above