Home Tutorial Php Phpgd PHP GD imagesetbrush() Function

 
 

Share on Google+Share on Google+
PHP GD imagesetbrush() Function
Posted on: November 17, 2009 at 12:00 AM
Advertisement
This example shows how to imagesetbrush() Function works in php gd.

<?php

$php = imagecreatefromjpeg('im.jpg');

$im = imagecreatetruecolor(100, 100);

$white = imagecolorallocate($im, 255, 255, 255);

imagefilledrectangle($im, 0, 0, 299, 99, $white);

imagesetbrush($im, $php);

imageline($im, 50, 50, 50, 60, IMG_COLOR_BRUSHED);

header('Content-type: image/jpeg');

imagejpeg($im);

imagedestroy($im);

imagedestroy($php);

?>

After running the program you will get the following output

Advertisement

Related Tags for PHP GD imagesetbrush() Function:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 17, 2009

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com