(PHP 4 >= 4.0.7, PHP 5, PHP 7)
imagegd2 — 锟斤拷 GD2 图锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟侥硷拷
$image
[, string $filename
[, int $chunk_size
[, int $type
= IMG_GD2_RAW
]]] ) : bool
imagegd2() 锟斤拷一锟斤拷 GD 图锟斤拷锟斤拷锟斤拷锟�
filename
锟斤拷image
image
锟斤拷图锟襟创斤拷锟斤拷锟斤拷(锟斤拷锟斤拷imagecreatetruecolor())锟斤拷锟截碉拷图锟斤拷锟斤拷源锟斤拷
filename
锟侥硷拷锟斤拷锟斤拷锟铰凤拷锟斤拷锟斤拷锟斤拷未锟斤拷锟矫伙拷为 NULL
锟斤拷锟斤拷锟斤拷直锟斤拷锟斤拷锟皆纪硷拷锟斤拷锟斤拷锟�
chunk_size
Chunk size.
type
锟斤拷锟斤拷锟斤拷
IMG_GD2_RAW
锟斤拷 IMG_GD2_COMPRESSED
锟斤拷默锟斤拷为
IMG_GD2_RAW
锟斤拷
锟缴癸拷时锟斤拷锟斤拷 TRUE
锟斤拷 锟斤拷锟斤拷锟斤拷失锟斤拷时锟斤拷锟斤拷 FALSE
锟斤拷
Example #1 锟斤拷锟揭伙拷锟� GD2 图锟斤拷
<?php
// Create a blank image and add some text
$im = imagecreatetruecolor(120, 20);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, "A Simple Text String", $text_color);
// Output the image
imagegd2($im);
// Free up memory
imagedestroy($im);
?>
Example #2 锟斤拷锟斤拷 GD2 图锟斤拷
<?php
// Create a blank image and add some text
$im = imagecreatetruecolor(120, 20);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, "A Simple Text String", $text_color);
// Save the gd2 image
// The file format for GD2 images is .gd2, see http://www.libgd.org/GdFileFormats
imagegd2($im, 'simple.gd2');
// Free up memory
imagedestroy($im);
?>
Note: 锟剿猴拷锟斤拷锟斤拷要 GD 2.0.1 锟斤拷锟斤拷甙姹�(锟狡硷拷 2.0.28 锟斤拷锟斤拷锟竭版本)锟斤拷
Note:
GD2 锟斤拷式一锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷图锟斤拷锟叫碉拷一锟斤拷锟斤拷时锟斤拷锟届。注锟斤拷 GD2 锟斤拷式只锟斤拷锟斤拷锟节硷拷锟斤拷锟斤拷 GD2 锟斤拷应锟矫筹拷锟斤拷
锟芥本 | 说锟斤拷 |
---|---|
4.3.2 |
锟斤拷锟斤拷瞬锟斤拷锟� chunk_size 锟斤拷 type 锟斤拷
|