public class ImageModule extends AbstractQuercusModule
PHP_INI_ALL, PHP_INI_PERDIR, PHP_INI_SYSTEM, PHP_INI_USER
Constructor and Description |
---|
ImageModule() |
Modifier and Type | Method and Description |
---|---|
static Value |
gd_info()
Retrieve information about the currently installed GD library
|
static Value |
getimagesize(Env env,
Path file,
ArrayValue imageArray)
Returns the environment value.
|
java.lang.String[] |
getLoadedExtensions()
Returns the extensions loaded by the module.
|
static java.awt.geom.AffineTransform |
image_get_transform(QuercusImage image)
Returns a copy of the current transform
|
static boolean |
image_set_transform(QuercusImage image,
java.awt.geom.AffineTransform transform)
Returns a copy of the current transform
|
static boolean |
image_transform_scale(QuercusImage image,
double sx,
double sy)
scaling transformation
|
static boolean |
image_transform_shear(QuercusImage image,
double shx,
double shy)
shearing transformation
|
static boolean |
image_transform_translate(QuercusImage image,
double x,
double y)
translation transformation
|
static boolean |
image_transform(QuercusImage image,
double m00,
double m10,
double m01,
double m11,
double m02,
double m12)
general affine transformation
|
static Value |
image_type_to_extension(int imageType,
boolean dot)
Get file extension for image type
|
static Value |
image_type_to_mime_type(int imageType)
Get Mime-Type for image-type returned by getimagesize, exif_read_data,
exif_thumbnail, exif_imagetype
|
static boolean |
imagealphablending(QuercusImage image,
boolean useAlphaBlending)
Set the blending mode for an image
|
static boolean |
imageantialias(QuercusImage image,
boolean useAntiAliasing)
Should antialias functions be used or not
|
static boolean |
imagearc(QuercusImage image,
double cx,
double cy,
double width,
double height,
double start,
double end,
int color)
Draw a partial ellipse
|
static boolean |
imagechar(QuercusImage image,
int font,
int x,
int y,
java.lang.String c,
int color)
Draw a character horizontally
|
static boolean |
imagecharup(QuercusImage image,
int font,
int x,
int y,
java.lang.String c,
int color)
Draw a character vertically
|
static long |
imagecolorallocate(QuercusImage image,
int r,
int g,
int b)
Allocate a color for an image
|
static long |
imagecolorallocatealpha(QuercusImage image,
int r,
int g,
int b,
int a)
Allocate a color for an image
|
static Value |
imagecolorat(Env env,
QuercusImage image,
int x,
int y)
Get the index of the color of a pixel
|
static long |
imagecolorclosest(QuercusImage image,
int r,
int g,
int b)
Get the index of the closest color to the specified color
|
static long |
imagecolorclosestalpha(QuercusImage image,
int r,
int g,
int b,
int a)
Get the index of the closest color to the specified color + alpha
|
static long |
imagecolorclosesthwb(QuercusImage image,
int r,
int g,
int b)
Get the index of the color which has the hue, white and blackness
nearest to the given color
|
static boolean |
imagecolordeallocate(QuercusImage image,
int rgb)
De-allocate a color for an image
|
static long |
imagecolorexact(QuercusImage image,
int r,
int g,
int b)
Get the index of the specified color
|
static long |
imagecolorexactalpha(QuercusImage image,
int r,
int g,
int b,
int a)
Get the index of the specified color + alpha
|
static boolean |
imagecolormatch(QuercusImage image1,
QuercusImage image2)
Makes the colors of the palette version of an image more closely
match the true color version
|
static long |
imagecolorresolve(QuercusImage image,
int r,
int g,
int b)
Get the index of the specified color or its closest possible alternative
|
static long |
imagecolorresolvealpha(QuercusImage image,
int r,
int g,
int b,
int a)
Get the index of the specified color + alpha or its closest possible
alternative
|
static boolean |
imagecolorset(QuercusImage image,
int index,
int r,
int g,
int b)
Set the color for the specified palette index
|
static ArrayValue |
imagecolorsforindex(QuercusImage image,
int argb)
Get the colors for an index
|
static Value |
imagecolorstotal()
Find out the number of colors in an image's palette
|
static long |
imagecolortransparent(QuercusImage image,
int color)
Define a color as transparent
|
static boolean |
imageconvolution(QuercusImage image,
ArrayValue matrix,
double div,
double offset)
Apply a 3x3 convolution matrix, using coefficient div and offset
|
static boolean |
imagecopy(QuercusImage dest,
QuercusImage src,
int dx,
int dy,
int sx,
int sy,
int w,
int h)
Copy part of an image
|
static boolean |
imagecopymerge(QuercusImage dest,
QuercusImage src,
int dx,
int dy,
int sx,
int sy,
int w,
int h,
int pct)
Copy and merge part of an image
|
static boolean |
imagecopymergegray(QuercusImage dest,
QuercusImage src,
int dx,
int dy,
int sx,
int sy,
int w,
int h,
int pct)
Copy and merge part of an image with gray scale
|
static boolean |
imagecopyresampled(QuercusImage dest,
QuercusImage src,
int dx,
int dy,
int sx,
int sy,
int dw,
int dh,
int sw,
int sh)
Copy and resize part of an image with resampling
|
static boolean |
imagecopyresized(QuercusImage dest,
QuercusImage src,
int dx,
int dy,
int sx,
int sy,
int dw,
int dh,
int sw,
int sh)
Copy and resize part of an image
|
static Value |
imagecreate(int width,
int height)
Create a new palette based image
|
static void |
imagecreatefromgd(Path file)
Create a new image from GD file or URL
|
static void |
imagecreatefromgd2(Path file)
Create a new image from GD2 file or URL
|
static void |
imagecreatefromgd2part(Path file,
int srcX,
int srcY,
int width,
int height)
Create a new image from a given part of GD2 file or URL
|
static QuercusImage |
imagecreatefromgif(Env env,
Path filename)
Create a new image from file or URL
|
static QuercusImage |
imagecreatefromjpeg(Env env,
Path filename)
Create a new image from file or URL
|
static QuercusImage |
imagecreatefrompng(Env env,
Path filename)
Create a new image from file or URL
|
static QuercusImage |
imagecreatefromstring(Env env,
java.io.InputStream data)
Create a new image from the image stream in the string
|
static QuercusImage |
imagecreatefromwbmp(Env env,
Path filename)
Create a new image from file or URL
|
static Value |
imagecreatefromxbm(Env env,
Path filename)
Create a new image from file or URL
|
static QuercusImage |
imagecreatefromxpm(Env env,
Path filename)
Create a new image from file or URL
|
static Value |
imagecreatetruecolor(int width,
int height)
Create a new true color image
|
static boolean |
imagedashedline(QuercusImage image,
int x1,
int y1,
int x2,
int y2,
int color)
Draw a dashed line
|
static boolean |
imagedestroy(QuercusImage image)
Destroy an image
|
static boolean |
imageellipse(QuercusImage image,
double cx,
double cy,
double width,
double height,
int color)
Draw an ellipse
|
static boolean |
imagefill(QuercusImage image,
int x,
int y,
int color)
Flood fill
|
static boolean |
imagefilledarc(QuercusImage image,
double cx,
double cy,
double width,
double height,
double start,
double end,
int color,
int style)
Draw a partial ellipse and fill it
|
static boolean |
imagefilledellipse(QuercusImage image,
double cx,
double cy,
double width,
double height,
int color)
Draw a filled ellipse
|
static boolean |
imagefilledpolygon(Env env,
QuercusImage image,
ArrayValue points,
int numPoints,
int color)
Draw a filled polygon
|
static boolean |
imagefilledrectangle(QuercusImage image,
int x1,
int y1,
int x2,
int y2,
int color)
Draw a filled rectangle
|
static boolean |
imagefilltoborder(QuercusImage image,
int x,
int y,
int border,
int color)
Flood fill to specific color
|
static boolean |
imagefilter(Env env,
QuercusImage image,
int filterType,
int arg1,
int arg2,
int arg3)
Applies a filter to an image
|
static int |
imagefontheight(int font)
Get font height.
|
static int |
imagefontwidth(int font)
Get font width.
|
static Value |
imageftbbox(Env env,
double size,
double angle,
StringValue fontFile,
java.lang.String text,
ArrayValue extra)
draws a true type font image
|
static Value |
imagefttext(Env env,
QuercusImage image,
double size,
double angle,
int x,
int y,
int color,
StringValue fontFile,
java.lang.String text,
ArrayValue extra)
draws a true type font image
|
static boolean |
imagegammacorrect(QuercusImage image,
float gammaBefore,
float gammaAfter)
Apply a gamma correction to a GD image
|
static void |
imagegd(QuercusImage image,
Path file)
Output GD image to browser or file
|
static void |
imagegd2(QuercusImage image,
Path file)
Output GD2 image to browser or file
|
static boolean |
imagegif(Env env,
QuercusImage image,
Path path)
Output image to browser or file
|
static boolean |
imageinterlace(QuercusImage image,
java.lang.Boolean enable)
Enable or disable interlace
|
static boolean |
imageistruecolor(QuercusImage image)
Finds whether an image is a truecolor image
|
static boolean |
imagejpeg(Env env,
QuercusImage image,
Path path,
int quality)
Output image to browser or file
|
static boolean |
imagelayereffect(QuercusImage image,
int effect)
Set the alpha blending flag to use the bundled libgd layering effects
|
static boolean |
imageline(QuercusImage image,
int x1,
int y1,
int x2,
int y2,
int color)
Draw a line
|
static long |
imageloadfont(Path file)
Load a new font
|
static boolean |
imagepalettecopy(QuercusImage source,
QuercusImage dest)
Copy the palette from one image to another
|
static boolean |
imagepng(Env env,
QuercusImage image,
Path path)
Output a PNG image to either the browser or a file
|
static boolean |
imagepolygon(Env env,
QuercusImage image,
ArrayValue points,
int numPoints,
int color)
Draw a polygon
|
static ArrayValue |
imagepsbbox(java.lang.String text,
int font,
int size,
int space,
int tightness,
float angle)
Give the bounding box of a text rectangle using PostScript Type1 fonts
|
static int |
imagepscopyfont(Value fontIndex)
Make a copy of an already loaded font for further modification
|
static boolean |
imagepsencodefont(Value fontIndex,
Path encodingFile)
Change the character encoding vector of a font
|
static boolean |
imagepsextendfont(int fontIndex,
float extend)
Extend or condense a font
|
static boolean |
imagepsfreefont(Value fontIndex)
Free memory used by a PostScript Type 1 font
|
static Value |
imagepsloadfont(Path fontFile)
Load a PostScript Type 1 font from file
|
static boolean |
imagepsslantfont(Value fontIndex,
float slant)
Slant a font
|
static ArrayValue |
imagepstext(QuercusImage image,
java.lang.String text,
Value fontIndex,
int size,
int fg,
int bg,
int x,
int y,
int space,
int tightness,
float angle,
int antialias_steps)
To draw a text string over an image using PostScript Type1 fonts
|
static boolean |
imagerectangle(QuercusImage image,
int x1,
int y1,
int x2,
int y2,
int color)
Draw a rectangle
|
static boolean |
imagerotate(QuercusImage image,
float angle,
int backgroundColor,
int ignoreTransparent)
Rotate an image with a given angle
|
static boolean |
imagesavealpha(QuercusImage image,
boolean set)
Set the flag to save full alpha channel information (as opposed to
single-color transparency) when saving PNG images
|
static boolean |
imagesetbrush(QuercusImage image,
QuercusImage brush)
Set the brush image for line drawing
|
static boolean |
imagesetpixel(QuercusImage image,
int x,
int y,
int color)
Set a single pixel
|
static boolean |
imagesetstyle(Env env,
QuercusImage image,
ArrayValue style)
Set the style for line drawing
|
static boolean |
imagesetthickness(QuercusImage image,
int thickness)
Set the thickness for line
|
static boolean |
imagestring(QuercusImage image,
int font,
int x,
int y,
java.lang.String s,
int color)
Draw a string horizontally
|
static boolean |
imagestringup(QuercusImage image,
int font,
int x,
int y,
java.lang.String s,
int color)
Draw a string vertically
|
static int |
imagesx(QuercusImage image)
Returns the width of the image.
|
static int |
imagesy(QuercusImage image)
Returns the height of the image.
|
static Value |
imagettfbbox(Env env,
double size,
double angle,
StringValue fontFile,
java.lang.String text)
draws a true type font image
|
static Value |
imagettftext(Env env,
QuercusImage image,
double size,
double angle,
int x,
int y,
int color,
StringValue fontFile,
java.lang.String text)
draws a true type font image
|
static long |
imagetypes()
Returns the imagetypes.
|
static void |
imagewbmp(QuercusImage image,
Path filename,
int threshhold)
Output image to browser or file
|
static boolean |
iptcembed(java.lang.String iptcdata,
java.lang.String jpegFileName,
int spool)
Embed into single tags.
|
static Value |
iptcparse(Env env,
StringValue block)
Parses IPTC metadata.
|
static void |
jpeg2wbmp(java.lang.String jpegFilename,
java.lang.String wbmpName,
int d_height,
int d_width,
int threshhold)
Convert JPEG image file to WBMP image file
|
static void |
png2wbmp(java.lang.String pngFilename,
java.lang.String wbmpName,
int d_height,
int d_width,
int threshhold)
Convert PNG image file to WBM
|
addConstant, addConstant, addConstant, getConstMap, getIniDefinitions
public static final long IMG_GIF
public static final long IMG_JPG
public static final long IMG_JPEG
public static final long IMG_PNG
public static final long IMG_WBMP
public static final long IMG_XPM
public static final int IMAGETYPE_GIF
public static final int IMAGETYPE_JPG
public static final int IMAGETYPE_JPEG
public static final int IMAGETYPE_PNG
public static final int IMAGETYPE_SWF
public static final int IMAGETYPE_PSD
public static final int IMAGETYPE_BMP
public static final int IMAGETYPE_TIFF_II
public static final int IMAGETYPE_TIFF_MM
public static final int IMAGETYPE_JPC
public static final int IMAGETYPE_JP2
public static final int IMAGETYPE_JPX
public static final int IMAGETYPE_JB2
public static final int IMAGETYPE_SWC
public static final int IMAGETYPE_IFF
public static final int IMAGETYPE_WBMP
public static final int IMAGETYPE_XBM
public static final int IMG_COLOR_STYLED
public static final int IMG_COLOR_BRUSHED
public static final int IMG_ARC_PIE
public static final int IMG_ARC_CHORD
public static final int IMG_ARC_NOFILL
public static final int IMG_ARC_EDGED
public static final int IMG_FILTER_NEGATE
public static final int IMG_FILTER_GRAYSCALE
public static final int IMG_FILTER_BRIGHTNESS
public static final int IMG_FILTER_CONTRAST
public static final int IMG_FILTER_COLORIZE
public static final int IMG_FILTER_EDGEDETECT
public static final int IMG_FILTER_EMBOSS
public static final int IMG_FILTER_GAUSSIAN_BLUR
public static final int IMG_FILTER_SELECTIVE_BLUR
public static final int IMG_FILTER_MEAN_REMOVAL
public static final int IMG_FILTER_SMOOTH
public java.lang.String[] getLoadedExtensions()
AbstractQuercusModule
getLoadedExtensions
in interface QuercusModule
getLoadedExtensions
in class AbstractQuercusModule
public static Value gd_info()
public static Value getimagesize(Env env, Path file, ArrayValue imageArray)
public static Value image_type_to_extension(int imageType, boolean dot)
public static Value image_type_to_mime_type(int imageType)
public static java.awt.geom.AffineTransform image_get_transform(QuercusImage image)
public static boolean image_set_transform(QuercusImage image, java.awt.geom.AffineTransform transform)
public static boolean imagealphablending(QuercusImage image, boolean useAlphaBlending)
public static boolean imageantialias(QuercusImage image, boolean useAntiAliasing)
public static boolean imagearc(QuercusImage image, double cx, double cy, double width, double height, double start, double end, int color)
public static boolean imagechar(QuercusImage image, int font, int x, int y, java.lang.String c, int color)
public static boolean imagecharup(QuercusImage image, int font, int x, int y, java.lang.String c, int color)
public static long imagecolorallocate(QuercusImage image, int r, int g, int b)
public static long imagecolorallocatealpha(QuercusImage image, int r, int g, int b, int a)
public static Value imagecolorat(Env env, QuercusImage image, int x, int y)
public static long imagecolorclosest(QuercusImage image, int r, int g, int b)
public static long imagecolorclosestalpha(QuercusImage image, int r, int g, int b, int a)
public static long imagecolorclosesthwb(QuercusImage image, int r, int g, int b)
public static boolean imagecolordeallocate(QuercusImage image, int rgb)
public static long imagecolorexact(QuercusImage image, int r, int g, int b)
public static long imagecolorexactalpha(QuercusImage image, int r, int g, int b, int a)
public static boolean imagecolormatch(QuercusImage image1, QuercusImage image2)
public static long imagecolorresolve(QuercusImage image, int r, int g, int b)
public static long imagecolorresolvealpha(QuercusImage image, int r, int g, int b, int a)
public static boolean imagecolorset(QuercusImage image, int index, int r, int g, int b)
public static ArrayValue imagecolorsforindex(QuercusImage image, int argb)
public static Value imagecolorstotal()
public static long imagecolortransparent(QuercusImage image, int color)
public static boolean imageconvolution(QuercusImage image, ArrayValue matrix, double div, double offset)
public static boolean imagecopy(QuercusImage dest, QuercusImage src, int dx, int dy, int sx, int sy, int w, int h)
public static boolean imagecopymerge(QuercusImage dest, QuercusImage src, int dx, int dy, int sx, int sy, int w, int h, int pct)
public static boolean imagecopymergegray(QuercusImage dest, QuercusImage src, int dx, int dy, int sx, int sy, int w, int h, int pct)
public static boolean imagecopyresampled(QuercusImage dest, QuercusImage src, int dx, int dy, int sx, int sy, int dw, int dh, int sw, int sh)
public static boolean imagecopyresized(QuercusImage dest, QuercusImage src, int dx, int dy, int sx, int sy, int dw, int dh, int sw, int sh)
public static Value imagecreate(int width, int height)
public static void imagecreatefromgd2(Path file)
public static void imagecreatefromgd2part(Path file, int srcX, int srcY, int width, int height)
public static void imagecreatefromgd(Path file)
public static QuercusImage imagecreatefromgif(Env env, Path filename)
public static QuercusImage imagecreatefromjpeg(Env env, Path filename)
public static QuercusImage imagecreatefrompng(Env env, Path filename)
public static QuercusImage imagecreatefromstring(Env env, java.io.InputStream data)
public static QuercusImage imagecreatefromwbmp(Env env, Path filename)
public static Value imagecreatefromxbm(Env env, Path filename)
public static QuercusImage imagecreatefromxpm(Env env, Path filename)
public static Value imagecreatetruecolor(int width, int height)
public static boolean imagedashedline(QuercusImage image, int x1, int y1, int x2, int y2, int color)
public static boolean imagedestroy(QuercusImage image)
public static boolean imageellipse(QuercusImage image, double cx, double cy, double width, double height, int color)
public static boolean imagefill(QuercusImage image, int x, int y, int color)
public static boolean imagefilledarc(QuercusImage image, double cx, double cy, double width, double height, double start, double end, int color, int style)
public static boolean imagefilledellipse(QuercusImage image, double cx, double cy, double width, double height, int color)
public static boolean imagefilledpolygon(Env env, QuercusImage image, ArrayValue points, int numPoints, int color)
public static boolean imagefilledrectangle(QuercusImage image, int x1, int y1, int x2, int y2, int color)
public static boolean imagefilltoborder(QuercusImage image, int x, int y, int border, int color)
public static boolean imagefilter(Env env, QuercusImage image, int filterType, int arg1, int arg2, int arg3)
public static int imagefontheight(int font)
font
- a font previously loaded with imageloadfont(com.caucho.vfs.Path)
,
or 1 -5 for built-in fontspublic static int imagefontwidth(int font)
font
- a font previously loaded with imageloadfont(com.caucho.vfs.Path)
,
or 1 -5 for built-in fontspublic static Value imageftbbox(Env env, double size, double angle, StringValue fontFile, java.lang.String text, ArrayValue extra)
public static Value imagefttext(Env env, QuercusImage image, double size, double angle, int x, int y, int color, StringValue fontFile, java.lang.String text, ArrayValue extra)
public static boolean imagegammacorrect(QuercusImage image, float gammaBefore, float gammaAfter)
public static void imagegd2(QuercusImage image, Path file)
public static void imagegd(QuercusImage image, Path file)
public static boolean imagegif(Env env, QuercusImage image, Path path)
public static boolean imageinterlace(QuercusImage image, java.lang.Boolean enable)
public static boolean imageistruecolor(QuercusImage image)
public static boolean imagejpeg(Env env, QuercusImage image, Path path, int quality)
public static boolean imagelayereffect(QuercusImage image, int effect)
public static boolean imageline(QuercusImage image, int x1, int y1, int x2, int y2, int color)
public static long imageloadfont(Path file)
public static boolean imagepalettecopy(QuercusImage source, QuercusImage dest)
public static boolean imagepng(Env env, QuercusImage image, Path path)
public static boolean imagepolygon(Env env, QuercusImage image, ArrayValue points, int numPoints, int color)
public static ArrayValue imagepsbbox(java.lang.String text, int font, int size, int space, int tightness, float angle)
public static int imagepscopyfont(Value fontIndex)
public static boolean imagepsencodefont(Value fontIndex, Path encodingFile)
public static boolean imagepsextendfont(int fontIndex, float extend)
public static boolean imagepsfreefont(Value fontIndex)
public static Value imagepsloadfont(Path fontFile)
public static boolean imagepsslantfont(Value fontIndex, float slant)
public static ArrayValue imagepstext(QuercusImage image, java.lang.String text, Value fontIndex, int size, int fg, int bg, int x, int y, int space, int tightness, float angle, int antialias_steps)
public static boolean imagerectangle(QuercusImage image, int x1, int y1, int x2, int y2, int color)
public static boolean imagerotate(QuercusImage image, float angle, int backgroundColor, int ignoreTransparent)
public static boolean imagesavealpha(QuercusImage image, boolean set)
public static boolean imagesetbrush(QuercusImage image, QuercusImage brush)
public static boolean imagesetpixel(QuercusImage image, int x, int y, int color)
public static boolean imagesetstyle(Env env, QuercusImage image, ArrayValue style)
public static boolean imagesetthickness(QuercusImage image, int thickness)
public static boolean imagestring(QuercusImage image, int font, int x, int y, java.lang.String s, int color)
public static boolean imagestringup(QuercusImage image, int font, int x, int y, java.lang.String s, int color)
public static int imagesx(QuercusImage image)
public static int imagesy(QuercusImage image)
public static boolean image_transform(QuercusImage image, double m00, double m10, double m01, double m11, double m02, double m12)
public static boolean image_transform_scale(QuercusImage image, double sx, double sy)
public static boolean image_transform_shear(QuercusImage image, double shx, double shy)
public static boolean image_transform_translate(QuercusImage image, double x, double y)
public static Value imagettfbbox(Env env, double size, double angle, StringValue fontFile, java.lang.String text)
public static Value imagettftext(Env env, QuercusImage image, double size, double angle, int x, int y, int color, StringValue fontFile, java.lang.String text)
public static long imagetypes()
public static void imagewbmp(QuercusImage image, Path filename, int threshhold)
public static boolean iptcembed(java.lang.String iptcdata, java.lang.String jpegFileName, int spool)
public static Value iptcparse(Env env, StringValue block)
public static void jpeg2wbmp(java.lang.String jpegFilename, java.lang.String wbmpName, int d_height, int d_width, int threshhold)
public static void png2wbmp(java.lang.String pngFilename, java.lang.String wbmpName, int d_height, int d_width, int threshhold)