First of al imagick is cool stuff!
I want to create an image with text.
That's simple. But i want to have a reflextion from that image.
Like "on the fly".
I can not find very much on goolge, so i hope that anyone can help here.
On php.net i found how to create a reflextion, but i want it from this code.
Code: Select all
<?php
/* Create a new imagick object */
$im = new Imagick();
/* Create new image. This will be used as fill pattern */
$im->newPseudoImage(50, 50, "gradient:red-black");
/* Create imagickdraw object */
$draw = new ImagickDraw();
/* Start a new pattern called "gradient" */
$draw->pushPattern('gradient', 0, 0, 50, 50);
/* Composite the gradient on the pattern */
$draw->composite(Imagick::COMPOSITE_OVER, 0, 0, 50, 50, $im);
/* Close the pattern */
$draw->popPattern();
/* Use the pattern called "gradient" as the fill */
$draw->setFillPatternURL('#gradient');
$draw->setFont('./ExplosiveBold.ttf');
/* Set font size to 40 */
$draw->setFontSize(40);
/* Annotate some text */
$draw->annotation(5, 50, 'Hello World');
/* Create a new canvas object and a white image */
$canvas = new Imagick();
$canvas->newImage(350, 70, "white");
/* Draw the ImagickDraw on to the canvas */
$canvas->drawImage($draw);
/* 1px black border around the image */
$canvas->borderImage('black', 1, 1);
/* Set the format to PNG */
$canvas->setImageFormat('png');
/* Output the image */
header("Content-Type: image/png");
echo $canvas;
?>
How can i do that?
Sorry for my bad English, it's a long time i wrote in it.
Thanks for the help.