Doc #64468 [NEW]: error exempel 4
From: christian dot hess at netplus dot ch
Operating system: Ubuntu 12.04
PHP version: 5.3.23
Package: imagick
Bug Type: Documentation Problem
Bug description:error exempel 4
Description:
------------
---
From manual page: http://www.php.net/imagick.examples-1
---
I copy exempel 4 and it give an error when i run it on a php page.
Can you help me please.
Best regards
Christian HESS
Test script:
---------------
<?php
/* Création d'un nouvel objet imagick */
$im = new Imagick();
/* Création d'une nouvelle image. Elle sera utilisée comme masque de
remplissage */
$im->newPseudoImage(50, 50, "gradient:red-black");
/* Création d'un nouvel objet imagickdraw */
$draw = new ImagickDraw();
/* On commence un nouveau masque nommé "gradient" */
$draw->pushPattern('gradient', 0, 0, 50, 50);
/* Ajout du dégradé sur le masque */
$draw->composite(Imagick::COMPOSITE_OVER, 0, 0, 50, 50, $im);
/* Fermeture du masque */
$draw->popPattern();
/* Utilisation du masque nommé "gradient" comme remplissage */
$draw->setFillPatternURL('#gradient');
/* Définition de la taille du texte à 52 */
$draw->setFontSize(52);
/* Ajout d'un texte */
$draw->annotation(20, 50, "Bonjour le monde !");
/* Création d'un nouvel objet et d'une image blanche */
$canvas = new Imagick();
$canvas->newImage(350, 70, "white");
/* Dessine le ImagickDraw sur la nouvelle image */
$canvas->drawImage($draw);
/* Une bordure noire d'un pixel autour de l'image */
$canvas->borderImage('black', 1, 1);
/* Définition du format à PNG */
$canvas->setImageFormat('png');
/* Affiche l'image */
header("Content-Type: image/png");
echo $canvas;
?>
--
Edit bug report at https://bugs.php.net/bug.php?id=64468&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64468&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64468&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64468&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=64468&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=64468&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=64468&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=64468&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=64468&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=64468&r=support
Expected behavior: https://bugs.php.net/fix.php?id=64468&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=64468&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=64468&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=64468&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64468&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=64468&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=64468&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=64468&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64468&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=64468&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=64468&r=mysqlcfg
Thread (2 messages)
- christian dot hess at netplus dot ch