Doc #64468 [Opn->Nab]: error exempel 4

From: Date: Wed, 20 Mar 2013 19:04:59 +0000
Subject: Doc #64468 [Opn->Nab]: error exempel 4
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9671@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64468&edit=1

 ID:                 64468
 Updated by:         aharvey@php.net
 Reported by:        christian dot hess at netplus dot ch
 Summary:            error exempel 4
-Status:             Open
+Status:             Not a bug
 Type:               Documentation Problem
 Package:            imagick
 Operating System:   Ubuntu 12.04
 PHP Version:        5.3.23
 Block user comment: N
 Private report:     N

 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

It works fine for me — my guess is that you have a configuration issue which will 
be better dealt with by going through one of the support channels for PHP than on 
a bug tracker.


Previous Comments:
------------------------------------------------------------------------
[2013-03-20 16:31:07] christian dot hess at netplus dot ch

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 this bug report at https://bugs.php.net/bug.php?id=64468&edit=1


Thread (2 messages)

« previous php.doc.bugs (#9671) next »