Image Functions

FunctionReturnsDescription
GetImageSize(filename, [imageinfo])Array Returns the size of the image.
ImageArc(img, x, y, width, height, start, end, col)IntegerDraws a partial ellipse in the specified image, centered at x, y with a specific width and height.
ImageChar(img, font, x, y, character, color)IntegerDraws the specified character at x, y in the image.
ImageCharUp(img, font, x, y, character, color)IntegerDraws the specified character facing upwards in the image.
ImageColorAllocate(img, red, green, blue)IntegerAllocates the specified RGB color value for the image.
ImageColorAt(img, x, y)IntegerReturns the index of the color at x, y.
ImageColorClosest(img, red, green, blue)IntegerReturns the index to the closest color in the color palette for the image.
ImageColorExact(img, red, green, blue)IntegerReturns the index of the specified color in the color palette of the image.
ImageColorResolve(img, red, green, blue)IntegerFinds the specified color in the palette; if it doesn’t exist then it returns the index to the closest color in the palette.
ImageColorSet(img, index, red, green, blue)BooleanSets the specified index to the RGB color value.
ImageColorsForIndex(img, index)ArrayReturns an array containing the RGB values for the specified index in the color palette.
ImageColorsTotal(img)IntegerReturns the number of colors in the specified images color palette.
ImageColorTransparent(img, [color])IntegerSets color as the transparent color in the palette.
ImageCopyResized(dest_img, src_img, destX, destY, srcX, srcY, destWidth, destHeight, srcWidth, srcHeight)IntegerCopies an area from the source image to an array of the destination image. If the heights are different then the destination image is resized.
ImageCreate(width, height)IntegerCreates a new image.
ImageCreateFromGif(filename)IntegerCreates a new image from the specified file.
ImageDashedLine(img, x1, y1, x2, y2, color)IntegerDraws a dashed line in the image from point x1, y1 to point x2, y2.
ImageDestroy(img)IntegerDestroys the specified image.
ImageFill(img, x, y, color)IntegerFills the image starting at point x, y.
ImageFilledPolygon(img, points, num_points, color)IntegerDraws a filled polygon in the image between the points.
ImageFilledRectangle(img, x1, y1, x2, y2, color)IntegerDraws a filled rectangle in the specified image.
ImageFillToBorder(img, x, y, border,color)IntegerPerforms a flood fill between the specified border color starting at point x, y.
ImageFontHeight(font)IntegerReturns the height of the specified font in pixels.
ImageFontWidth(font)IntegerReturns the width of the specified font in pixels.
ImageGif(img, [filename])IntegerSends the image to a file or to the browser.
ImageInterlace(img, [interlace])IntegerTurns interlacing on or off in the image.
ImageLine(img, x1, y1, x2, y2, color)Integer Draws a line in the image from point x1, y1 to point x2, y2.
ImageLoadFont(filename)IntegerLoads a bitmap font from the file.
ImagePolygon(img, points, num_points, color)IntegerDraws a polygon in the image, much like polygon fill but it doesn’t fill the image.
ImagePSBBox(text, font, size, space, width, angle)ArrayCalculates the coordinates for the bounding box of text area using a PostScript font.
ImagePSEncodeFont(filename)IntegerLoads a specific character-encoding vector for a PostScript font.
ImagePSFreeFont(fontindex)voidReleases the PostScript font from memory.
ImagePSLoadFont(filename)IntegerLoads a PostScript font into memory.
ImagePSText(img, text, font, size, foreground, background, x, y, [space],[tightness], [angle], [antialias_steps])ArrayDraws the text to the image using a PostScript font.
ImageRectangle(img, x1, y1, x2, y2, color)IntegerDraws a rectangle to the image. Acts much like ImageRectangleFill() but the rectangle is not filled when it is drawn.
ImageSetPixel(img, x, y, color)IntegerSets the pixel at point x, y to a color.
ImageString(img, font, x, y, size, color)Integer Draws a string starting at x, y to the image.
ImageStringUp(img, font, x, y, size, color)Integer Draws a string starting at point x, y facing upwards.
ImageSX(img)Integer Gets the width of the image.
ImageSY(img) Integer Gets the height of the image.
ImageTTFBBox(size, angle, font, text)Array Returns a bounding box for a TrueType font.
ImageTTFText(img, text, size, angle, x, y, color)Array Draws the text in the image using the specified TrueType font.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset