https://t.me/RX1948
Server : Apache
System : Linux server.lienzindia.com 4.18.0-348.7.1.el8_5.x86_64 #1 SMP Wed Dec 22 13:25:12 UTC 2021 x86_64
User : plutus ( 1007)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /usr/share/doc/perl-GD/demos/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/doc/perl-GD/demos/brushes.pl
#!/usr/bin/perl

use GD;

$im = new GD::Image(300,300);

# allocate white
$white = $im->colorAllocate(255, 255, 255);        

# allocate black
$black = $im->colorAllocate(0, 0, 0);

# allocate red
$red = $im->colorAllocate(255, 0, 0);      

# allocate green
$green = $im->colorAllocate(0,255,0);

# allocate yellow
$yellow = $im->colorAllocate(255,250,205);

# Get an image from a png file
open (TILE,"./tile.png") || die;
$tile = newFromPng GD::Image(TILE);
close TILE;

# use it as a paintbrush
$im->setBrush($tile);
$im->arc(100,100,100,150,0,360,gdBrushed);

# use it as a tiling pattern to fill a rectangle
$im->setTile($tile);
$im->filledRectangle(150,150,250,250,gdTiled);
$im->rectangle(150,150,250,250,$black);

# Draw a dotted line 
$im->setStyle($green,$green,$green,gdTransparent,$red,$red,$red,gdTransparent);
$im->line(0,280,300,280,gdStyled);

binmode STDOUT;

# print the image to stdout
print $im->png;


https://t.me/RX1948 - 2025