The imagefilltoborder function will flood-fill an area bounded by the border_color
argument. The flood fill will begin at the given coordinate. See imagecolorallocate for an
example.
integer imagefontheight(integer font)
The imagefontheight function returns the height in pixels of the specified font, which
may be a built-in font (1–5) or a font loaded with imagefontload.
<?
/*
* Create image just the right size for text
/
$Text = "Core PHP Programming";
$Font = 5;
$Width = imagefontwidth($Font) * strlen($Text);
$Height = imagefontheight($Font);
//create green square
$image = imagecreate($Width, $Height);
$colorGreen = imagecolorallocate($image, 128, 255, 128);
$colorBlack = imagecolorallocate($image, 0, 0, 0);
imagefill($image, 0, 0, $colorRed);
//add text in black
imagestring($image, $Font, 0, 0, $Text, $colorBlack);
//send image
header("Content-type: image/jpeg");
imagejpeg($image);
?>
integer imagefontwidth(integer font)
The imagefontwidth function returns the width in pixels of the specified font, which
may be a built-in font (1–5) or a font loaded with imagefontload. See
imagefontheight for an example.
boolean imagegammacorrect(integer image, double original,
double new)
The imagegammacorrect function changes the gamma for an image. Video display
hardware is given a gamma rating that describes relatively how bright images appear.
Identical images appear lighter on Macintosh hardware than on the typical Wintel clone.
Each color in the palette of the image will be adjusted to the new gamma.