CSS Style Choice Dark Text on Light Background
CSS Style Choice Light Text on Dark Background 
Avatar: Old Photo of Gary's Face
[M] Gary
Vollink.com
9 November 2005

GD Lightning Talk

Working with existing images is also possible.  Even working with multiple images at once.

use GD;

MAIN: {
	...

	# Use the existing image of my Head...
	$img = "../../img/gv_head_48.png";
	$head = GD::Image->newFromPng($img, 1);

	# Allocate the same red color, for new image.
	$red2 = $head->colorAllocate(255,0,0);

	# Draw a frame on the image...
	$head->rectangle(5,5,42,42,$red2);

	# Create result temp...
	open($fh, '>', "bn_t.png");
	print $fh $head->png();
	close($fh);

	# Copy part of my head (including my red frame) onto my banner
	# $image->copy($sourceImage, $dstX, $dstY,
	#                    $srcX, $srcY, $width, $height);
	$banner->copy($head, 335, 13, 5, 5, 38, 38);

	# Create result 7...
	open($fh, '>', "bn_7.png");
	print $fh $banner->png();
	close($fh);
}

Result temp:
Gary's avatar shown with a red square drawn over it, 5 px from each edge

Result 7:
Finished banner with blue, green and red filled squares, sample text, and the red bordered portion of Result temp above.