From 9d37ce1f9966c8ff2c3c0b74370cb8e61dd11793 Mon Sep 17 00:00:00 2001 From: Egon Schmid Date: Mon, 17 Jul 2000 22:35:58 +0000 Subject: [PATCH] Made a correct indentation. Examples should start with - - ImageColorDeAllocate - - De-allocate a color for an image - - - - Description - + + ImageColorDeAllocate + + De-allocate a color for an image + + + + Description + - int - imagecolordeallocate - - int - im - - int - index - + int + imagecolordeallocate + + int + im + + int + index + - - - The ImageColorDeAllocate function de-allocates a color previously - allocated with the ImageColorAllocate function. - - + + + The ImageColorDeAllocate function + de-allocates a color previously allocated with the + ImageColorAllocate function. + + $white = ImageColorAllocate($im, 255, 255, 255); ImageColorDeAllocate($im, $white); - - - - + + + + @@ -370,37 +371,38 @@ ImageColorDeAllocate($im, $white); - - ImageGammaCorrect - - Apply a gamma correction to a GD image - + + ImageGammaCorrect + + Apply a gamma correction to a GD image + - - Description - + + Description + - int - imagegammacorrect - - int - im - - double - inputgamma - - double - outputgamma - + int + imagegammacorrect + + int + im + + double + inputgamma + + double + outputgamma + - - - The ImageGammaCorrect function applies gamma correction - to a gd image stream (im) given an input gamma, the - parameter inputgamma and an output gamma, the parameter - outputgamma. - - + + + The ImageGammaCorrect function applies gamma + correction to a gd image stream (im) given + an input gamma, the parameter inputgamma + and an output gamma, the parameter + outputgamma. + + @@ -518,53 +520,55 @@ ImageColorDeAllocate($im, $white); - - ImageCopy - - Copy part of an image - - - - Description - + + ImageCopy + + Copy part of an image + + + + Description + - int - ImageCopy - - int - dst_im - - int - src_im - - int - dst_x - - int - dst_y - - int - src_x - - int - src_y - - int - src_w - - int - src_h - + int + ImageCopy + + int + dst_im + + int + src_im + + int + dst_x + + int + dst_y + + int + src_x + + int + src_y + + int + src_w + + int + src_h + - - - Copy a part of src_im onto dst_im - starting at the x,y coordinates src_x, src_y - with a width of src_w and a height of - src_h. The portion defined will be copied onto - the x,y coordinates, dst_x and dst_y. - - + + + Copy a part of src_im onto + dst_im starting at the x,y coordinates + src_x, src_y with + a width of src_w and a height of + src_h. The portion defined will be copied + onto the x,y coordinates, dst_x and + dst_y. + + @@ -590,16 +594,17 @@ ImageColorDeAllocate($im, $white); - ImageCopyResized copies a rectangular portion of one image to - another image. Dst_im is the destination - image, src_im is the source image - identifier. If the source and destination coordinates and width - and heights differ, appropriate stretching or shrinking of the - image fragment will be performed. The coordinates refer to the - upper left corner. This function can be used to copy regions - within the same image (if dst_im is the - same as src_im) but if the regions overlap - the results will be unpredictable. + ImageCopyResized copies a rectangular + portion of one image to another image. + Dst_im is the destination image, + src_im is the source image identifier. If + the source and destination coordinates and width and heights + differ, appropriate stretching or shrinking of the image fragment + will be performed. The coordinates refer to the upper left + corner. This function can be used to copy regions within the + same image (if dst_im is the same as + src_im) but if the regions overlap the + results will be unpredictable. @@ -622,15 +627,15 @@ ImageColorDeAllocate($im, $white); ImageCreate returns an image identifier representing a blank image of size x_size by y_size. - - - Creating a new GD image stream and outputting an image. - + + + Creating a new GD image stream and outputting an image. + -<? +<?php header ("Content-type: image/png"); $im = @ImageCreate (50, 100) - or die ("Cannot Initialize new GD image stream"); + or die ("Cannot Initialize new GD image stream"); $background_color = ImageColorAllocate ($im, 255, 255, 255); $text_color = ImageColorAllocate ($im, 233, 14, 91); ImageString ($im, 1, 5, 5, "A Simple Text String", $text_color); @@ -772,7 +777,7 @@ function LoadJpeg ($imgname) { function LoadPNG ($imgname) { $im = @ImageCreateFromPNG ($imgname); /* Attempt to open */ if (!$im) { /* See if it failed */ - $im = ImageCreate (150, 30); /* Create a blank image */ + $im = ImageCreate (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); @@ -1040,37 +1045,38 @@ function LoadPNG ($imgname) { - - ImagePNG - - Output a PNG image to either the browser or a file - - - - Description - + + ImagePNG + + Output a PNG image to either the browser or a file + + + + Description + - int - imagepng - - int im - string filename + int + imagepng + + int im + string filename - - - The ImagePng outputs a GD image stream (im) - in PNG format to standard output (usually the browser) or, if a filename is given by the - filename it outputs the image to the file. - - -<? + + + The ImagePng outputs a GD image stream + (im) in PNG format to standard output + (usually the browser) or, if a filename is given by the + filename it outputs the image to the file. + + +<?php $im = ImageCreateFromPng("test.png"); ImagePng($im); ?> - - - - + + + + @@ -1489,62 +1495,63 @@ permits to find a solution. - - ImagePsExtendFont - - Extend or condense a font - - - - Description - + + ImagePsExtendFont + + Extend or condense a font + + + + Description + - bool - imagepsextendfont - - int - font_index - - double - extend - + bool + imagepsextendfont + + int + font_index + + double + extend + - - - Extend or condense a font (font_index), if the value of - the extend parameter is less than one you will be condensing - the font. - - + + + Extend or condense a font (font_index), if + the value of the extend parameter is less + than one you will be condensing the font. + + - - ImagePsSlantFont - - Slant a font - - - - Description - + + ImagePsSlantFont + + Slant a font + + + + Description + - bool - imagepsslantfont - - int - font_index - - double - slant - + bool + imagepsslantfont + + int + font_index + + double + slant + - - - Slant a font given by the font_index parameter with a slant of - the value of the slant parameter. - - + + + Slant a font given by the font_index + parameter with a slant of the value of the + slant parameter. + + @@ -2053,7 +2060,7 @@ ImageDestroy ($im); ImageTypes - Return the image types supported by this PHP build + Return the image types supported by this PHP build @@ -2065,21 +2072,21 @@ ImageDestroy ($im); - This function returns a bit-field corresponding to the image formats - supported by the version of GD linked into PHP. The following bits - are returned, IMG_GIF | IMG_JPG | IMG_PNG | IMG_WBMP. To check for PNG - support, for example, do this: + This function returns a bit-field corresponding to the image + formats supported by the version of GD linked into PHP. The + following bits are returned, IMG_GIF | IMG_JPG | IMG_PNG | + IMG_WBMP. To check for PNG support, for example, do this: ImageTypes <?php -if(ImageTypes() & IMG_PNG) { - echo "PNG Support is enabled"; +if (ImageTypes() & IMG_PNG) { + echo "PNG Support is enabled"; } ?> - +