This example shows how to make tilled filled colors in php gd.
This example shows how to make tilled filled colors in php gd.<?php
define(
"WIDTH", 200);define(
"HEIGHT", 200);define(
"T_WIDTH", 20);define(
"T_HEIGHT",20); $img = imagecreate(WIDTH, HEIGHT);imagefilledrectangle(
$tile, 0, 0, T_WIDTH/2, T_HEIGHT/2, $t_black);imagefilledrectangle(
$tile, T_WIDTH/2, T_HEIGHT/2, T_WIDTH-1, T_HEIGHT-1, $t_black);imagerectangle(
$img, 0, 0, WIDTH-1, HEIGHT-1, $black);imagesettile(
$img, $tile);imagefilledrectangle(
$img, 1, 1, WIDTH-2, HEIGHT-2, IMG_COLOR_TILED);header(
"Content-Type: image/png");imagepng(
$img);?>
After running the program you will get the following output