Index: phpdoc/en/functions/image.xml diff -u phpdoc/en/functions/image.xml:1.33 phpdoc/en/functions/image.xml:1.34 --- phpdoc/en/functions/image.xml:1.33 Tue Jan 23 16:07:58 2001 +++ phpdoc/en/functions/image.xml Fri Apr 13 17:16:21 2001 @@ -116,6 +116,39 @@ + + + ImageAlphaBlending + Set the blending mode for an image + + + Description + + + int imagealphablending + resource im + bool blendmode + + + + ImageAlphaBlending allows for two different + modes of drawing on truecolor images. In blending mode, the + alpha channel component of the color supplied to all drawing function, + such as ImageSetPixel determines how much of the + underlying color shouldbe allowed to shine through. As a result, gd + automatically blends the existing color at that point with the drawing color, + and stores the result in the image. The resulting pixel is opaque. In + non-blending mode, the drawing color is copied literally with its alpha channel + information, replacing the destination pixel. Blending mode is not available + when drawing on palette images. + If blendmode is true, then blending mode is enabled, otherwise + disabled. + + This function was added in PHP 4.0.6 and requires GD 2.0.1 + + + + ImageArc @@ -148,6 +181,117 @@ + + + ImageArc + Draw a partial ellipse and fill it + + + Description + + + int imagefilledarc + int im + int cx + int cy + int w + int h + int s + int e + int col + int style + + + + ImageFilledArc draws a partial ellipse centered at + cx, cy (top left is + 0, 0) in the image represented by im. W + and h specifies the ellipse's width and + height respectively while the start and end points are specified + in degrees indicated by the s and + e. arguments. + style is a bitwise OR of the following possibilities: + + IMG_ARC_PIE + IMG_ARC_CHORD + IMG_ARC_NOFILL + IMG_ARC_EDGED + + IMG_ARC_PIE and IMG_ARC_CHORD are mutually exclusive; IMG_ARC_CHORD just + connects the starting and ending angles with a straight line, while + IMG_ARC_PIE produces a rounded edge. IMG_ARC_NOFILL indicates that the arc + or chord should be outlined, not filled. IMG_ARC_EDGED, used together with + IMG_ARC_NOFILL, indicates that the beginning and ending angles should be + connected to the center - this is a good way to outline (rather than fill) + a 'pie slice'. + + This function was added in PHP 4.0.6 and requires GD 2.0.1 + + + + + + + + ImageEllipse + Draw an ellipse + + + Description + + + int imageellipse + resource im + int cx + int cy + int w + int h + int col + + + + ImageEllipse draws an ellipse centered at + cx, cy (top left is + 0, 0) in the image represented by im. + W and h specifies the + ellipse's width and height respectively. The color of the ellipse is + specified by color. + + This function was added in PHP 4.0.6 and requires GD 2.0.2 or later + + + + + + + ImageFilledEllipse + Draw a filled ellipse + + + Description + + + int imagefilledellipse + resource im + int cx + int cy + int w + int h + int col + + + + ImageFilledEllipse draws an ellipse centered at + cx, cy (top left is + 0, 0) in the image represented by im. + W and h specifies the + ellipse's width and height respectively. The ellipse is filled using + color + + This function was added in PHP 4.0.6 and requires GD 2.0.1 or later + + + ImageChar @@ -342,6 +486,38 @@ + + + ImageColorClosestAlpha + + Get the index of the closest color to the specified color + alpha + + + + Description + + + int imagecolorclosestalpha + resource im + int red + int green + int blue + int alpha + + + + Returns the index of the color in the palette of the image which + is "closest" to the specified RGB value and alpha level. + + + See also imagecolorexactalpha. + + This function was added in PHP 4.0.6 and requires GD 2.0.1 + + + + + ImageColorExact @@ -372,6 +548,39 @@ + + + ImageColorExactAlpha + Get the index of the specified color + alpha + + + Description + + + int imagecolorexactalpha + resource im + int red + int green + int blue + int alpha + + + + Returns the index of the specified color+alpha in the palette of the + image. + + + If the color does not exist in the image's palette, -1 is + returned. + + + See also imagecolorclosestalpha. + + This function was added in PHP 4.0.6 and requires GD 2.0.1 or later + + + + ImageColorResolve @@ -402,6 +611,40 @@ + + + ImageColorResolveAlpha + + Get the index of the specified color + alpha or its closest possible + alternative + + + + Description + + + int imagecolorresolvealpha + resource im + int red + int green + int blue + int alpha + + + + This function is guaranteed to return a color index for a + requested color, either the exact color or the closest possible + alternative. + + + See also imagecolorclosestalpha. + + This function was added in PHP 4.0.6 and requires GD 2.0.1 + + + + + ImageGammaCorrect @@ -603,6 +846,95 @@ + + + ImageCopyMerge + + Copy and merge part of an image + + + + Description + + + int ImageCopyMerge + 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 pct + + + + 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. + The two images will be merged according to pct + which can range from 0 to 100. When pct = 0, + no action is taken, when 100 this function behaves identically + to ImageCopy. + + + + + + + ImageCopyMergeGray + + Copy and merge part of an image with gray scale + + + + Description + + + int ImageCopyMergeGray + 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 pct + + + + This function is identical to ImageCopyMerge except + that when merging it preservese the hue of the source by converting + the destination pixels to gray scale before the copy operation. + + + 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. + The two images will be merged according to pct + which can range from 0 to 100. When pct = 0, + no action is taken, when 100 this function behaves identically + to ImageCopy. + + + This function is identical to ImageCopyMerge except + that when merging it preservese the hue of the source by converting + the destination pixels to gray scale before the copy operation. + + This function was added in PHP 4.0.6 + + + ImageCopyResized @@ -638,13 +970,62 @@ src_im) but if the regions overlap the results will be unpredictable. + + See also ImageCopyResampled. + + + + ImageCopyResampled + Copy and resize part of an image with resampling + + + Description + + + int imagecopyresampled + resource dst_im + resource src_im + int dstX + int dstY + int srcX + int srcY + int dstW + int dstH + int srcW + int srcH + + + + ImageCopyResampled copies a rectangular + portion of one image to another image, smoothly interpolating pixel + values so that, in particular, reducing the size of an image still + retains a great deal of clarity. + 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. + + + See also ImageCopyResized. + + This function was added in PHP 4.0.6 and requires GD 2.0.1 or later + + + + + ImageCreate - Create a new image + Create a new palette based image Description @@ -679,6 +1060,58 @@ + + + ImageCreateTrueColor + Create a new true color image + + + Description + + + resource imagecreatetruecolor + int x_size + int y_size + + + + ImageCreateTrueColor returns an image identifier + representing a black image of size x_size + by y_size. + + This function was added in PHP 4.0.6 + This function requires GD 2.0.1 or later + + + + + + ImageTrueColorToPalette + Convert a true color image to a palette image + + + Description + + + void imagetruecolortopalette + resource im + + + + ImageTrueColorToPalette converts a truecolor image + to a palette image. The code for this function was originally drawn from + the Independent JPEG Group library code, which is excellent. The code + has been modified to preserve as much alpha channel information as + possible in the resulting palette, in addition to preserving colors as + well as possible. This does not work as well as might be hoped. It is + usually best to simply produce a truecolor output image instead, which + guarantees the highest output quality. + + This function was added in PHP 4.0.6 + This function requires GD 2.0.1 or later + + + ImageCreateFromGIF @@ -1934,6 +2367,97 @@ + + + + ImageSetTile + Set the brush image for line drawing + + + Description + + + int imagesetbrush + resource im + resource brush + + + + ImageSetBrush sets the brush image to be + used by all line drawing functions (such as ImageLine + and ImagePolygon) when drawing with the special + colors IMG_COLOR_BRUSHED or IMG_COLOR_STYLEDBRUSHED. + + + You need not take special action when you are finished with a brush, but if you + destroy the brush image, you must not use the IMG_COLOR_BRUSHED or IMG_COLOR_STYLEDBRUSHED + colors until you have set a new brush image! + + This function was added in PHP 4.0.6 + + + + + + + ImageSetTile + Set the tile image for filling + + + Description + + + int imagesettile + resource im + resource tile + + + + ImageSetTile sets the tile image to be + used by all region filling functions (such as ImageFill + and ImageFilledPolygon) when filling with the special + color IMG_COLOR_TILED. + + + A tile is an image used to fill an area with a repeated pattern. Any + GD image can be used as a tile, and by setting the transparent color index of the tile + image with ImageColorTransparent, a tile allows certain parts + of the underlying area to shine through can be created. + + + You need not take special action when you are finished with a tile, but if you + destroy the tile image, you must not use the IMG_COLOR_TILED color until you have + set a new tile image! + + This function was added in PHP 4.0.6 + + + + + + + + ImageSetThickness + Set the thickness for line drawing + + + Description + + + void imagesetthickness + resource im + int thickness + + + + ImageSetThickness sets the thickness of the lines + drawn when drawing rectangles, polygons, ellipses etc. etc. to + thickness pixels. + + This function was added in PHP 4.0.6 and requires GD 2.0.1 or later + + +