note 86035 added to function.imagick-drawimage
| From: | sualkatlednewdotde at osu1 dot php dot net | Date: | Tue, 30 Sep 2008 11:34:12 +0000 |
| Subject: | note 86035 added to function.imagick-drawimage | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-144901@lists.php.net to get a copy of this message | ||
the ImagickDraw (v 2.2.0) seems to disharmonise with PHP-GTK2 (v 2.0.1).
The rendering of an ImagickDraw object on the current image fails (resp. results in a flat image
without drawings), if php_gtk2.so is loaded.
Code to reproduce the failure:
-----8<----------8<----------8<----------8<----------8<-----
#!/usr/bin/php5
<?php
dl("php_gtk2.so"); // comment this for a second try
$string = "Hello world!";
$im = new Imagick();
$draw = new ImagickDraw();
$draw->setFillColor(new ImagickPixel('blue'));
$draw->setFontSize(28);
$metrix = $im->queryFontMetrics($draw, $string);
$draw->annotation(0,25,$string);
$im->newImage($metrix['textWidth'],$metrix['textHeight'], new
ImagickPixel('white'));
$im->drawImage($draw);
$im->borderImage(new ImagickPixel('black'), 1, 1);
$im->setImageFormat('png');
$im->writeImage("./test.png");
----->8---------->8---------->8---------->8---------->8-----
----
Server IP: 217.13.201.10
Probable Submitter: 93.132.158.79
----
Manual Page -- http://www.php.net/manual/en/function.imagick-drawimage.php
Edit -- https://master.php.net/note/edit/86035
Del: integrated -- https://master.php.net/note/delete/86035/integrated
Del: useless -- https://master.php.net/note/delete/86035/useless
Del: bad code -- https://master.php.net/note/delete/86035/bad+code
Del: spam -- https://master.php.net/note/delete/86035/spam
Del: non-english -- https://master.php.net/note/delete/86035/non-english
Del: in docs -- https://master.php.net/note/delete/86035/in+docs
Del: other reasons-- https://master.php.net/note/delete/86035
Reject -- https://master.php.net/note/reject/86035
Search -- https://master.php.net/manage/user-notes.php