php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #64468 error exempel 4
Submitted: 2013-03-20 16:31 UTC Modified: 2013-03-20 19:04 UTC
From: christian dot hess at netplus dot ch Assigned:
Status: Not a bug Package: imagick (PECL)
PHP Version: 5.3.23 OS: Ubuntu 12.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: christian dot hess at netplus dot ch
New email:
PHP Version: OS:

 

 [2013-03-20 16:31 UTC] 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;
?>



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-03-20 19:04 UTC] aharvey@php.net
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.
 [2013-03-20 19:04 UTC] aharvey@php.net
-Status: Open +Status: Not a bug
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 02:01:28 2024 UTC