<<

. 110
( 132 .)



>>

imagecolorstotal(int im)
colors in an image™s palette
int Defines a color as
imagecolortransparent(int
transparent
im [, int col])

int Enables or disables interlace
imageinterlace(int im
[, int interlace])

int Draws a polygon
imagepolygon(int im, array
point, int num_points, int col)

int Draws a filled polygon
imagefilledpolygon(int im,
array point, int num_points,
int col)

int Gets the font width
imagefontwidth(int font)

int Gets the font height
imagefontheight(int font)

int Draws a character
imagechar(int im, int font,
int x, int y, string c,
int col)

int Draws a character rotated
imagecharup(int im, int font,
90 degrees counter-clockwise
int x, int y, string c, int col)

int Draws a string horizontally
imagestring(int im, int font,
int x, int y, string str,
int col)

int Draws a string vertically
imagestringup(int im, int font,
(rotated 90 degrees
int x, int y, string str, int
counter-clockwise)
col)
Appendix F: PHP Function Reference 649



Function Return Value Action

int Copies part of an image
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 Merges one part of an image
imagecopymerge(int src_im,
with another
int dst_im, int dst_x, int
dst_y, int src_x, int src_y,
int src_w, int src_h, int pct

int Merges one part of an image
imagecopymergegray(int src_im,
with another, converting the
int dst_im, int dst_x, int
pixels of the destination
dst_y, int src_x, int src_y,
image to grayscale before
int src_w, int src_h, int pct)
copying from the source
image
int Copies and resizes part of an
imagecopyresized(int dst_im,
image
int src_im, int dst_x, int
dst_y, int src_x, int src_y,
int dst_w, int dst_h, int
src_w, int src_h)

int Gets the image width
imagesx(int im)

int Gets the image height
imagesy(int im)

array Gives the bounding box of a
imageftbbox(int size, int
text using fonts via
angle, string font_file,
FreeType2
string text[, array extrainfo])

array Writes text to the image
imagefttext(int im, int size,
using fonts via FreeType2
int angle, int x, int y, int
col, string font_file, string
text, [array extrainfo])

array Gives the bounding box of a
imagettfbbox(int size, int
text using TrueType fonts
angle, string font_file,
string text)

array Writes text to the image
imagettftext(int im, int size,
using a TrueType font
int angle, int x, int y, int
col, string font_file, string
text)

Continued
650 Part V: Appendixes


TABLE F-26 GD FUNCTIONS (Continued)

Function Return Value Action

int Loads a new font from the
imagepsloadfont(string pathname)
specified file
int Makes a copy of a font for
imagepscopyfont(int font_index)
purposes such as extending
or re-encoding
bool Frees memory used by a font
imagepsfreefont(int font_index)

bool Changes a font™s character-
imagepsencodefont(int
encoding vector
font_index, string filename)

bool Extends or condenses (if
imagepsextendfont(int
extend is greater than 1)
font_index, float extend)
a font
bool Slants a font
imagepsslantfont(int
font_index, float slant)

array Rasterizes a string over an
imagepstext(int image,
image
string text, int font, int
size, int xcoord, int ycoord
[, int space, int tightness,
float angle, int antialias])

array Returns the bounding box
imagepsbbox(string text,
needed by a string if
int font, int size [, int
rasterized
space, int tightness, int
angle])

int Outputs a WBMP image to a
image2wbmp(int im [, string
browser or file
filename [, int threshold]])

void Converts a JPEG image to a
jpeg2wbmp (string f_org,
WBMP image
string f_dest, int d_height,
int d_width, int threshold)

void Converts a PNG image to a
png2wbmp (string f_org, string
WBMP image
f_dest, int d_height, int
d_width, int threshold)
Appendix F: PHP Function Reference 651


TABLE F-27 PAYFLOW PRO FUNCTIONS

Function Return Value Action

string Returns the version of the
pfpro_version()
Payflow Pro library
void Initializes the Payflow Pro
pfpro_init()
library
void Shuts down the Payflow Pro
pfpro_cleanup()
library
string Raw Payflow Pro transaction
pfpro_process_raw(string
processing
parmlist [, string hostaddress
[, int port, [, int timeout
[, string proxyAddress [, int
proxyPort [, string proxyLogon
[, string proxyPassword]]]]]]])

array Payflow Pro transaction
pfpro_process(array parmlist
processing using arrays
[, string hostaddress [, int
port, [, int timeout [, string
proxyAddress [, int proxyPort
[, string proxyLogon [, string
proxyPassword]]]]]]])




TABLE F-28 PDF FUNCTIONS

Function Return Value Action

bool Fills an info field of the
pdf_set_info(int pdfdoc, string
document
fieldname, string value)

bool Fills the creator field of
pdf_set_info_creator(int pdfdoc,
the document
string creator)

bool Fills the title field of the
pdf_set_info_title(int pdfdoc,
document
string title)

bool Fills the subject field of
pdf_set_info_subject(int pdfdoc,
the document
string subject)

Continued
652 Part V: Appendixes


TABLE F-28 PDF FUNCTIONS (Continued)

Function Return Value Action

bool Fills the author field of the
pdf_set_info_author(int pdfdoc,
document
string author)

bool Fills the keywords field of
pdf_set_info_keywords(int
the document
pdfdoc, string keywords)

void Closes the PDF document
pdf_close(int pdfdoc)

void Starts a page
pdf_begin_page(int pdfdoc,
float width, float height)

void Ends a page
pdf_end_page(int pdfdoc)

<<

. 110
( 132 .)



>>