Changes adopted from version 0.4
This commit is contained in:
16
image.php
Normal file
16
image.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
// get desired color
|
||||
$color = $_GET['color'];
|
||||
|
||||
// create base image
|
||||
$image = imagecreatetruecolor(6, 6);
|
||||
|
||||
// fill image with color
|
||||
$color = imagecolorallocate($image, hexdec(substr($color,0,2)), hexdec(substr($color,2,2)), hexdec(substr($color,4,2)));
|
||||
imagefill($image, 0, 0, $color);
|
||||
|
||||
// display image
|
||||
header('Content-type: image/png');
|
||||
imagepng($image);
|
||||
imagedestroy($image);
|
||||
?>
|
||||
Reference in New Issue
Block a user