From 98510adbdf9e20df8234accf592c9ed7baab9c1d Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Wed, 10 Aug 2005 04:48:11 +0000 Subject: [PATCH] Refer to and use imagecreatetruecolor() instead of imagecreate(). git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@192905 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/image/functions/image2wbmp.xml | 5 +++-- reference/image/functions/imagearc.xml | 4 ++-- reference/image/functions/imagechar.xml | 4 ++-- reference/image/functions/imagecharup.xml | 4 ++-- reference/image/functions/imagecolorallocate.xml | 5 +++-- reference/image/functions/imagecolortransparent.xml | 4 ++-- reference/image/functions/imagecreatefromgif.xml | 4 ++-- reference/image/functions/imagecreatefromjpeg.xml | 4 ++-- reference/image/functions/imagecreatefrompng.xml | 4 ++-- reference/image/functions/imagecreatefromstring.xml | 4 ++-- reference/image/functions/imagecreatefromwbmp.xml | 4 ++-- reference/image/functions/imagedestroy.xml | 6 +++--- reference/image/functions/imageellipse.xml | 4 ++-- reference/image/functions/imagefilledarc.xml | 4 ++-- reference/image/functions/imagefilledellipse.xml | 4 ++-- reference/image/functions/imagefilledpolygon.xml | 4 ++-- reference/image/functions/imagegd.xml | 4 ++-- reference/image/functions/imagegd2.xml | 4 ++-- reference/image/functions/imagegif.xml | 4 ++-- reference/image/functions/imagejpeg.xml | 4 ++-- reference/image/functions/imageline.xml | 4 ++-- reference/image/functions/imageloadfont.xml | 4 ++-- reference/image/functions/imagepolygon.xml | 4 ++-- reference/image/functions/imagepsloadfont.xml | 4 ++-- reference/image/functions/imagesetpixel.xml | 4 ++-- reference/image/functions/imagesetstyle.xml | 4 ++-- reference/image/functions/imagestring.xml | 4 ++-- reference/image/functions/imagesx.xml | 6 +++--- reference/image/functions/imagesy.xml | 6 +++--- reference/image/functions/imagettftext.xml | 6 +++--- reference/image/functions/imagewbmp.xml | 4 ++-- 31 files changed, 68 insertions(+), 66 deletions(-) diff --git a/reference/image/functions/image2wbmp.xml b/reference/image/functions/image2wbmp.xml index ffe8af692b..a3a30cd696 100644 --- a/reference/image/functions/image2wbmp.xml +++ b/reference/image/functions/image2wbmp.xml @@ -1,5 +1,5 @@ - + @@ -18,7 +18,8 @@ image2wbmp creates the WBMP file in filename from the image image. The image argument - is the return from imagecreate. + is the return from one of the image create functions, such as + imagecreatetruecolor. The filename argument is optional, and if left off, the raw image diff --git a/reference/image/functions/imagearc.xml b/reference/image/functions/imagearc.xml index d84314ecd9..262f75a2db 100644 --- a/reference/image/functions/imagearc.xml +++ b/reference/image/functions/imagearc.xml @@ -1,5 +1,5 @@ - + @@ -37,7 +37,7 @@ - + @@ -33,7 +33,7 @@ - + @@ -33,7 +33,7 @@ - + @@ -19,7 +19,7 @@ imagecolorallocate returns a color identifier representing the color composed of the given RGB components. The image - argument is the return from the imagecreate + argument is the return from the imagecreatetruecolor function. red, green and blue are the values of the red, green and blue component of the requested color respectively. These parameters are @@ -40,6 +40,7 @@ - + @@ -17,7 +17,7 @@ imagecolortransparent sets the transparent color in the image image to color. image is the - image identifier returned by imagecreate and + image identifier returned by imagecreatetruecolor and color is a color identifier returned by imagecolorallocate. diff --git a/reference/image/functions/imagecreatefromgif.xml b/reference/image/functions/imagecreatefromgif.xml index daa1eacae0..994c01366f 100644 --- a/reference/image/functions/imagecreatefromgif.xml +++ b/reference/image/functions/imagecreatefromgif.xml @@ -1,5 +1,5 @@ - + @@ -33,7 +33,7 @@ function LoadGif ($imgname) { $im = @imagecreatefromgif ($imgname); /* Attempt to open */ if (!$im) { /* See if it failed */ - $im = imagecreate (150, 30); /* Create a blank image */ + $im = imagecreatetruecolor (150, 30); /* Create a blank image */ $bgc = imagecolorallocate ($im, 255, 255, 255); $tc = imagecolorallocate ($im, 0, 0, 0); imagefilledrectangle ($im, 0, 0, 150, 30, $bgc); diff --git a/reference/image/functions/imagecreatefromjpeg.xml b/reference/image/functions/imagecreatefromjpeg.xml index b7f3ae90eb..def740ad14 100644 --- a/reference/image/functions/imagecreatefromjpeg.xml +++ b/reference/image/functions/imagecreatefromjpeg.xml @@ -1,5 +1,5 @@ - + @@ -33,7 +33,7 @@ function LoadJpeg($imgname) { $im = @imagecreatefromjpeg($imgname); /* Attempt to open */ if (!$im) { /* See if it failed */ - $im = imagecreate(150, 30); /* Create a blank image */ + $im = imagecreatruecolor(150, 30); /* Create a blank image */ $bgc = imagecolorallocate($im, 255, 255, 255); $tc = imagecolorallocate($im, 0, 0, 0); imagefilledrectangle($im, 0, 0, 150, 30, $bgc); diff --git a/reference/image/functions/imagecreatefrompng.xml b/reference/image/functions/imagecreatefrompng.xml index 94ed177f46..3f3f2db8af 100644 --- a/reference/image/functions/imagecreatefrompng.xml +++ b/reference/image/functions/imagecreatefrompng.xml @@ -1,5 +1,5 @@ - + @@ -33,7 +33,7 @@ function LoadPNG($imgname) { $im = @imagecreatefrompng($imgname); /* Attempt to open */ if (!$im) { /* See if it failed */ - $im = imagecreate(150, 30); /* Create a blank image */ + $im = imagecreatetruecolor(150, 30); /* Create a blank image */ $bgc = imagecolorallocate($im, 255, 255, 255); $tc = imagecolorallocate($im, 0, 0, 0); imagefilledrectangle($im, 0, 0, 150, 30, $bgc); diff --git a/reference/image/functions/imagecreatefromstring.xml b/reference/image/functions/imagecreatefromstring.xml index deea873fc6..077b72be28 100644 --- a/reference/image/functions/imagecreatefromstring.xml +++ b/reference/image/functions/imagecreatefromstring.xml @@ -1,5 +1,5 @@ - + @@ -33,7 +33,7 @@ imagecreatefromjpeg, imagecreatefrompng, imagecreatefromgif&listendand; - imagecreate + imagecreatetruecolor diff --git a/reference/image/functions/imagecreatefromwbmp.xml b/reference/image/functions/imagecreatefromwbmp.xml index ac98d4fdf6..e9b09b1abb 100644 --- a/reference/image/functions/imagecreatefromwbmp.xml +++ b/reference/image/functions/imagecreatefromwbmp.xml @@ -1,5 +1,5 @@ - + @@ -33,7 +33,7 @@ function LoadWBMP($imgname) { $im = @imagecreatefromwbmp($imgname); /* Attempt to open */ if (!$im) { /* See if it failed */ - $im = imagecreate (20, 20); /* Create a blank image */ + $im = imagecreatetruecolor (20, 20); /* Create a blank image */ $bgc = imagecolorallocate($im, 255, 255, 255); $tc = imagecolorallocate($im, 0, 0, 0); imagefilledrectangle($im, 0, 0, 10, 10, $bgc); diff --git a/reference/image/functions/imagedestroy.xml b/reference/image/functions/imagedestroy.xml index caa8437558..33b14551ed 100644 --- a/reference/image/functions/imagedestroy.xml +++ b/reference/image/functions/imagedestroy.xml @@ -1,5 +1,5 @@ - + @@ -15,8 +15,8 @@ imagedestroy frees any memory associated with image image. image - is the image identifier returned by the - imagecreate function. + is the image identifier returned by one of the image create functions, + such as imagecreatetruecolor. diff --git a/reference/image/functions/imageellipse.xml b/reference/image/functions/imageellipse.xml index 8443a03946..06a7b38cb4 100644 --- a/reference/image/functions/imageellipse.xml +++ b/reference/image/functions/imageellipse.xml @@ -1,5 +1,5 @@ - + @@ -37,7 +37,7 @@ - + @@ -57,7 +57,7 @@ // this example is provided by poxy at klam dot is // create image -$image = imagecreate(100, 100); +$image = imagecreatetruecolor(100, 100); // allocate some solors $white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF); diff --git a/reference/image/functions/imagefilledellipse.xml b/reference/image/functions/imagefilledellipse.xml index 6a14b72ce5..e096e70d2c 100644 --- a/reference/image/functions/imagefilledellipse.xml +++ b/reference/image/functions/imagefilledellipse.xml @@ -1,5 +1,5 @@ - + @@ -38,7 +38,7 @@ - + @@ -45,7 +45,7 @@ $values = array( ); // create image -$image = imagecreate(250, 250); +$image = imagecreatetruecolor(250, 250); // some colors $bg = imagecolorallocate($image, 200, 200, 200); diff --git a/reference/image/functions/imagegd.xml b/reference/image/functions/imagegd.xml index f14c77f18d..f0240c8884 100644 --- a/reference/image/functions/imagegd.xml +++ b/reference/image/functions/imagegd.xml @@ -1,5 +1,5 @@ - + @@ -16,7 +16,7 @@ imagegd outputs a GD image to filename. The image - argument is the return from the imagecreate + argument is the return from the imagecreatetruecolor function. diff --git a/reference/image/functions/imagegd2.xml b/reference/image/functions/imagegd2.xml index f026f41275..955e4a3202 100644 --- a/reference/image/functions/imagegd2.xml +++ b/reference/image/functions/imagegd2.xml @@ -1,5 +1,5 @@ - + @@ -19,7 +19,7 @@ imagegd2 outputs a GD2 image to filename. The image parameter is the return from the - imagecreate function. + imagecreatetruecolor function. The filename parameter is optional, and if left diff --git a/reference/image/functions/imagegif.xml b/reference/image/functions/imagegif.xml index cbdaea5dd8..db1b0469fd 100644 --- a/reference/image/functions/imagegif.xml +++ b/reference/image/functions/imagegif.xml @@ -1,5 +1,5 @@ - + @@ -17,7 +17,7 @@ imagegif creates the GIF file in filename from the image image. The image argument is the return from the - imagecreate function. + imagecreatetruecolor function. The image format will be GIF87a unless the diff --git a/reference/image/functions/imagejpeg.xml b/reference/image/functions/imagejpeg.xml index f29dd0330f..85448cad36 100644 --- a/reference/image/functions/imagejpeg.xml +++ b/reference/image/functions/imagejpeg.xml @@ -1,5 +1,5 @@ - + @@ -18,7 +18,7 @@ imagejpeg creates the JPEG file in filename from the image image. The image argument - is the return from the imagecreate function. + is the return from the imagecreatetruecolor function. The filename argument is optional, and if left off, the raw image diff --git a/reference/image/functions/imageline.xml b/reference/image/functions/imageline.xml index 7f33e1e20d..07772f00a7 100644 --- a/reference/image/functions/imageline.xml +++ b/reference/image/functions/imageline.xml @@ -1,5 +1,5 @@ - + @@ -59,7 +59,7 @@ function imagelinethick($image, $x1, $y1, $x2, $y2, $color, $thick = 1) - See also imagecreate and + See also imagecreatetruecolor and imagecolorallocate. diff --git a/reference/image/functions/imageloadfont.xml b/reference/image/functions/imageloadfont.xml index c61d8fdd4f..cb03b7514d 100644 --- a/reference/image/functions/imageloadfont.xml +++ b/reference/image/functions/imageloadfont.xml @@ -1,5 +1,5 @@ - + @@ -75,7 +75,7 @@ - + @@ -29,7 +29,7 @@ - + @@ -25,7 +25,7 @@ - + @@ -22,7 +22,7 @@ color. - See also imagecreate and + See also imagecreatetruecolor and imagecolorallocate. diff --git a/reference/image/functions/imagesetstyle.xml b/reference/image/functions/imagesetstyle.xml index 1e5f3dce36..0d96358b9f 100644 --- a/reference/image/functions/imagesetstyle.xml +++ b/reference/image/functions/imagesetstyle.xml @@ -1,5 +1,5 @@ - + @@ -30,7 +30,7 @@ - + @@ -32,7 +32,7 @@ - + @@ -23,7 +23,7 @@ - See also imagecreate, + See also imagecreatetruecolor, getimagesize and imagesy. diff --git a/reference/image/functions/imagesy.xml b/reference/image/functions/imagesy.xml index 2bacad5741..75fbb23862 100644 --- a/reference/image/functions/imagesy.xml +++ b/reference/image/functions/imagesy.xml @@ -1,5 +1,5 @@ - + @@ -23,7 +23,7 @@ - See also imagecreate, + See also imagecreatetruecolor, getimagesize and imagesx. diff --git a/reference/image/functions/imagettftext.xml b/reference/image/functions/imagettftext.xml index f6ed09a396..a55495a8b2 100644 --- a/reference/image/functions/imagettftext.xml +++ b/reference/image/functions/imagettftext.xml @@ -1,5 +1,5 @@ - + @@ -25,7 +25,7 @@ image - The image resource. See imagecreate. + The image resource. See imagecreatetruecolor. @@ -159,7 +159,7 @@ $font = 'SomeFont'; header("Content-type: image/png"); // Create the image -$im = imagecreate(400, 30); +$im = imagecreatetruecolor(400, 30); // Create some colors $white = imagecolorallocate($im, 255, 255, 255); diff --git a/reference/image/functions/imagewbmp.xml b/reference/image/functions/imagewbmp.xml index 8856305445..2698afb5f7 100644 --- a/reference/image/functions/imagewbmp.xml +++ b/reference/image/functions/imagewbmp.xml @@ -1,5 +1,5 @@ - + @@ -18,7 +18,7 @@ imagewbmp creates the WBMP file in filename from the image image. The image argument - is the return from the imagecreate function. + is the return from the imagecreatetruecolor function. The filename argument is optional, and if left off, the raw image