com.caucho.quercus.lib
Class ImageModule

java.lang.Object
  extended by com.caucho.quercus.module.AbstractQuercusModule
      extended by com.caucho.quercus.lib.ImageModule
All Implemented Interfaces:
QuercusModule

public class ImageModule
extends AbstractQuercusModule

PHP image


Nested Class Summary
static class ImageModule.QuercusImage
           
 
Field Summary
static int IMAGETYPE_BMP
           
static int IMAGETYPE_GIF
           
static int IMAGETYPE_IFF
           
static int IMAGETYPE_JB2
           
static int IMAGETYPE_JP2
           
static int IMAGETYPE_JPC
           
static int IMAGETYPE_JPEG
           
static int IMAGETYPE_JPG
           
static int IMAGETYPE_JPX
           
static int IMAGETYPE_PNG
           
static int IMAGETYPE_PSD
           
static int IMAGETYPE_SWC
           
static int IMAGETYPE_SWF
           
static int IMAGETYPE_TIFF_II
           
static int IMAGETYPE_TIFF_MM
           
static int IMAGETYPE_WBMP
           
static int IMAGETYPE_XBM
           
static int IMG_ARC_CHORD
           
static int IMG_ARC_EDGED
           
static int IMG_ARC_NOFILL
           
static int IMG_ARC_PIE
           
static int IMG_COLOR_BRUSHED
           
static int IMG_COLOR_STYLED
           
static int IMG_FILTER_BRIGHTNESS
           
static int IMG_FILTER_COLORIZE
           
static int IMG_FILTER_CONTRAST
           
static int IMG_FILTER_EDGEDETECT
           
static int IMG_FILTER_EMBOSS
           
static int IMG_FILTER_GAUSSIAN_BLUR
           
static int IMG_FILTER_GRAYSCALE
           
static int IMG_FILTER_MEAN_REMOVAL
           
static int IMG_FILTER_NEGATE
           
static int IMG_FILTER_SELECTIVE_BLUR
           
static int IMG_FILTER_SMOOTH
           
static long IMG_GIF
           
static long IMG_JPEG
           
static long IMG_JPG
           
static long IMG_PNG
           
static long IMG_WBMP
           
static long IMG_XPM
           
 
Fields inherited from class com.caucho.quercus.module.AbstractQuercusModule
PHP_INI_ALL, PHP_INI_PERDIR, PHP_INI_SYSTEM, PHP_INI_USER
 
Constructor Summary
ImageModule()
           
 
Method Summary
static Value gd_info()
          Retrieve information about the currently installed GD library
 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(ImageModule.QuercusImage image)
          Returns a copy of the current transform
static boolean image_set_transform(ImageModule.QuercusImage image, java.awt.geom.AffineTransform transform)
          Returns a copy of the current transform
static boolean image_transform_scale(ImageModule.QuercusImage image, double sx, double sy)
          scaling transformation
static boolean image_transform_shear(ImageModule.QuercusImage image, double shx, double shy)
          shearing transformation
static boolean image_transform_translate(ImageModule.QuercusImage image, double x, double y)
          translation transformation
static boolean image_transform(ImageModule.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(ImageModule.QuercusImage image, boolean useAlphaBlending)
          Set the blending mode for an image
static boolean imageantialias(ImageModule.QuercusImage image, boolean useAntiAliasing)
          Should antialias functions be used or not
static boolean imagearc(ImageModule.QuercusImage image, double cx, double cy, double width, double height, double start, double end, int color)
          Draw a partial ellipse
static boolean imagechar(ImageModule.QuercusImage image, int font, int x, int y, java.lang.String c, int color)
          Draw a character horizontally
static boolean imagecharup(ImageModule.QuercusImage image, int font, int x, int y, java.lang.String c, int color)
          Draw a character vertically
static long imagecolorallocate(ImageModule.QuercusImage image, int r, int g, int b)
          Allocate a color for an image
static long imagecolorallocatealpha(ImageModule.QuercusImage image, int r, int g, int b, int a)
          Allocate a color for an image
static long imagecolorat(ImageModule.QuercusImage image, int x, int y)
          Get the index of the color of a pixel
static long imagecolorclosest(ImageModule.QuercusImage image, int r, int g, int b)
          Get the index of the closest color to the specified color
static long imagecolorclosestalpha(ImageModule.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(ImageModule.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(ImageModule.QuercusImage image, int rgb)
          De-allocate a color for an image
static long imagecolorexact(ImageModule.QuercusImage image, int r, int g, int b)
          Get the index of the specified color
static long imagecolorexactalpha(ImageModule.QuercusImage image, int r, int g, int b, int a)
          Get the index of the specified color + alpha
static boolean imagecolormatch(ImageModule.QuercusImage image1, ImageModule.QuercusImage image2)
          Makes the colors of the palette version of an image more closely match the true color version
static long imagecolorresolve(ImageModule.QuercusImage image, int r, int g, int b)
          Get the index of the specified color or its closest possible alternative
static long imagecolorresolvealpha(ImageModule.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(ImageModule.QuercusImage image, int index, int r, int g, int b)
          Set the color for the specified palette index
static ArrayValue imagecolorsforindex(ImageModule.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(ImageModule.QuercusImage image, int color)
          Define a color as transparent
static boolean imageconvolution(ImageModule.QuercusImage image, ArrayValue matrix, double div, double offset)
          Apply a 3x3 convolution matrix, using coefficient div and offset
static boolean imagecopy(ImageModule.QuercusImage dest, ImageModule.QuercusImage src, int dx, int dy, int sx, int sy, int w, int h)
          Copy part of an image
static boolean imagecopymerge(ImageModule.QuercusImage dest, ImageModule.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(ImageModule.QuercusImage dest, ImageModule.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(ImageModule.QuercusImage dest, ImageModule.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(ImageModule.QuercusImage dest, ImageModule.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 ImageModule.QuercusImage imagecreatefromgif(Env env, Path filename)
          Create a new image from file or URL
static ImageModule.QuercusImage imagecreatefromjpeg(Env env, Path filename)
          Create a new image from file or URL
static ImageModule.QuercusImage imagecreatefrompng(Env env, Path filename)
          Create a new image from file or URL
static ImageModule.QuercusImage imagecreatefromstring(Env env, java.io.InputStream data)
          Create a new image from the image stream in the string
static ImageModule.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 ImageModule.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(ImageModule.QuercusImage image, int x1, int y1, int x2, int y2, int color)
          Draw a dashed line
static boolean imagedestroy(ImageModule.QuercusImage image)
          Destroy an image
static boolean imageellipse(ImageModule.QuercusImage image, double cx, double cy, double width, double height, int color)
          Draw an ellipse
static boolean imagefill(ImageModule.QuercusImage image, int x, int y, int color)
          Flood fill
static boolean imagefilledarc(ImageModule.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(ImageModule.QuercusImage image, double cx, double cy, double width, double height, int color)
          Draw a filled ellipse
static boolean imagefilledpolygon(Env env, ImageModule.QuercusImage image, ArrayValue points, int numPoints, int color)
          Draw a filled polygon
static boolean imagefilledrectangle(ImageModule.QuercusImage image, int x1, int y1, int x2, int y2, int color)
          Draw a filled rectangle
static boolean imagefilltoborder(ImageModule.QuercusImage image, int x, int y, int border, int color)
          Flood fill to specific color
static boolean imagefilter(Env env, ImageModule.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, ImageModule.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(ImageModule.QuercusImage image, float gammaBefore, float gammaAfter)
          Apply a gamma correction to a GD image
static void imagegd(ImageModule.QuercusImage image, Path file)
          Output GD image to browser or file
static void imagegd2(ImageModule.QuercusImage image, Path file)
          Output GD2 image to browser or file
static boolean imagegif(Env env, ImageModule.QuercusImage image, Path path)
          Output image to browser or file
static boolean imageinterlace(ImageModule.QuercusImage image, java.lang.Boolean enable)
          Enable or disable interlace
static boolean imageistruecolor(ImageModule.QuercusImage image)
          Finds whether an image is a truecolor image
static boolean imagejpeg(Env env, ImageModule.QuercusImage image, Path path, int quality)
          Output image to browser or file
static boolean imagelayereffect(ImageModule.QuercusImage image, int effect)
          Set the alpha blending flag to use the bundled libgd layering effects
static boolean imageline(ImageModule.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(ImageModule.QuercusImage source, ImageModule.QuercusImage dest)
          Copy the palette from one image to another
static boolean imagepng(Env env, ImageModule.QuercusImage image, Path path)
          Output a PNG image to either the browser or a file
static boolean imagepolygon(Env env, ImageModule.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(ImageModule.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(ImageModule.QuercusImage image, int x1, int y1, int x2, int y2, int color)
          Draw a rectangle
static boolean imagerotate(ImageModule.QuercusImage image, float angle, int backgroundColor, int ignoreTransparent)
          Rotate an image with a given angle
static boolean imagesavealpha(ImageModule.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(ImageModule.QuercusImage image, ImageModule.QuercusImage brush)
          Set the brush image for line drawing
static boolean imagesetpixel(ImageModule.QuercusImage image, int x, int y, int color)
          Set a single pixel
static boolean imagesetstyle(Env env, ImageModule.QuercusImage image, ArrayValue style)
          Set the style for line drawing
static boolean imagesetthickness(ImageModule.QuercusImage image, int thickness)
          Set the thickness for line
static boolean imagestring(ImageModule.QuercusImage image, int font, int x, int y, java.lang.String s, int color)
          Draw a string horizontally
static boolean imagestringup(ImageModule.QuercusImage image, int font, int x, int y, java.lang.String s, int color)
          Draw a string vertically
static int imagesx(ImageModule.QuercusImage image)
          Returns the width of the image.
static int imagesy(ImageModule.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, ImageModule.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(ImageModule.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)
          Embe into single tags.
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
 
Methods inherited from class com.caucho.quercus.module.AbstractQuercusModule
addConstant, addConstant, addConstant, getConstMap, getIniDefinitions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IMG_GIF

public static final long IMG_GIF
See Also:
Constant Field Values

IMG_JPG

public static final long IMG_JPG
See Also:
Constant Field Values

IMG_JPEG

public static final long IMG_JPEG
See Also:
Constant Field Values

IMG_PNG

public static final long IMG_PNG
See Also:
Constant Field Values

IMG_WBMP

public static final long IMG_WBMP
See Also:
Constant Field Values

IMG_XPM

public static final long IMG_XPM
See Also:
Constant Field Values

IMAGETYPE_GIF

public static final int IMAGETYPE_GIF
See Also:
Constant Field Values

IMAGETYPE_JPG

public static final int IMAGETYPE_JPG
See Also:
Constant Field Values

IMAGETYPE_JPEG

public static final int IMAGETYPE_JPEG
See Also:
Constant Field Values

IMAGETYPE_PNG

public static final int IMAGETYPE_PNG
See Also:
Constant Field Values

IMAGETYPE_SWF

public static final int IMAGETYPE_SWF
See Also:
Constant Field Values

IMAGETYPE_PSD

public static final int IMAGETYPE_PSD
See Also:
Constant Field Values

IMAGETYPE_BMP

public static final int IMAGETYPE_BMP
See Also:
Constant Field Values

IMAGETYPE_TIFF_II

public static final int IMAGETYPE_TIFF_II
See Also:
Constant Field Values

IMAGETYPE_TIFF_MM

public static final int IMAGETYPE_TIFF_MM
See Also:
Constant Field Values

IMAGETYPE_JPC

public static final int IMAGETYPE_JPC
See Also:
Constant Field Values

IMAGETYPE_JP2

public static final int IMAGETYPE_JP2
See Also:
Constant Field Values

IMAGETYPE_JPX

public static final int IMAGETYPE_JPX
See Also:
Constant Field Values

IMAGETYPE_JB2

public static final int IMAGETYPE_JB2
See Also:
Constant Field Values

IMAGETYPE_SWC

public static final int IMAGETYPE_SWC
See Also:
Constant Field Values

IMAGETYPE_IFF

public static final int IMAGETYPE_IFF
See Also:
Constant Field Values

IMAGETYPE_WBMP

public static final int IMAGETYPE_WBMP
See Also:
Constant Field Values

IMAGETYPE_XBM

public static final int IMAGETYPE_XBM
See Also:
Constant Field Values

IMG_COLOR_STYLED

public static final int IMG_COLOR_STYLED
See Also:
Constant Field Values

IMG_COLOR_BRUSHED

public static final int IMG_COLOR_BRUSHED
See Also:
Constant Field Values

IMG_ARC_PIE

public static final int IMG_ARC_PIE
See Also:
Constant Field Values

IMG_ARC_CHORD

public static final int IMG_ARC_CHORD
See Also:
Constant Field Values

IMG_ARC_NOFILL

public static final int IMG_ARC_NOFILL
See Also:
Constant Field Values

IMG_ARC_EDGED

public static final int IMG_ARC_EDGED
See Also:
Constant Field Values

IMG_FILTER_NEGATE

public static final int IMG_FILTER_NEGATE
See Also:
Constant Field Values

IMG_FILTER_GRAYSCALE

public static final int IMG_FILTER_GRAYSCALE
See Also:
Constant Field Values

IMG_FILTER_BRIGHTNESS

public static final int IMG_FILTER_BRIGHTNESS
See Also:
Constant Field Values

IMG_FILTER_CONTRAST

public static final int IMG_FILTER_CONTRAST
See Also:
Constant Field Values

IMG_FILTER_COLORIZE

public static final int IMG_FILTER_COLORIZE
See Also:
Constant Field Values

IMG_FILTER_EDGEDETECT

public static final int IMG_FILTER_EDGEDETECT
See Also:
Constant Field Values

IMG_FILTER_EMBOSS

public static final int IMG_FILTER_EMBOSS
See Also:
Constant Field Values

IMG_FILTER_GAUSSIAN_BLUR

public static final int IMG_FILTER_GAUSSIAN_BLUR
See Also:
Constant Field Values

IMG_FILTER_SELECTIVE_BLUR

public static final int IMG_FILTER_SELECTIVE_BLUR
See Also:
Constant Field Values

IMG_FILTER_MEAN_REMOVAL

public static final int IMG_FILTER_MEAN_REMOVAL
See Also:
Constant Field Values

IMG_FILTER_SMOOTH

public static final int IMG_FILTER_SMOOTH
See Also:
Constant Field Values
Constructor Detail

ImageModule

public ImageModule()
Method Detail

getLoadedExtensions

public java.lang.String[] getLoadedExtensions()
Description copied from class: AbstractQuercusModule
Returns the extensions loaded by the module.

Specified by:
getLoadedExtensions in interface QuercusModule
Overrides:
getLoadedExtensions in class AbstractQuercusModule

gd_info

public static Value gd_info()
Retrieve information about the currently installed GD library


getimagesize

public Value getimagesize(Env env,
                          Path file,
                          ArrayValue imageArray)
Returns the environment value.


image_type_to_extension

public static Value image_type_to_extension(int imageType,
                                            boolean dot)
Get file extension for image type


image_type_to_mime_type

public 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


image_get_transform

public static java.awt.geom.AffineTransform image_get_transform(ImageModule.QuercusImage image)
Returns a copy of the current transform


image_set_transform

public static boolean image_set_transform(ImageModule.QuercusImage image,
                                          java.awt.geom.AffineTransform transform)
Returns a copy of the current transform


imagealphablending

public static boolean imagealphablending(ImageModule.QuercusImage image,
                                         boolean useAlphaBlending)
Set the blending mode for an image


imageantialias

public static boolean imageantialias(ImageModule.QuercusImage image,
                                     boolean useAntiAliasing)
Should antialias functions be used or not


imagearc

public static boolean imagearc(ImageModule.QuercusImage image,
                               double cx,
                               double cy,
                               double width,
                               double height,
                               double start,
                               double end,
                               int color)
Draw a partial ellipse


imagechar

public static boolean imagechar(ImageModule.QuercusImage image,
                                int font,
                                int x,
                                int y,
                                java.lang.String c,
                                int color)
Draw a character horizontally


imagecharup

public static boolean imagecharup(ImageModule.QuercusImage image,
                                  int font,
                                  int x,
                                  int y,
                                  java.lang.String c,
                                  int color)
Draw a character vertically


imagecolorallocate

public static long imagecolorallocate(ImageModule.QuercusImage image,
                                      int r,
                                      int g,
                                      int b)
Allocate a color for an image


imagecolorallocatealpha

public static long imagecolorallocatealpha(ImageModule.QuercusImage image,
                                           int r,
                                           int g,
                                           int b,
                                           int a)
Allocate a color for an image


imagecolorat

public static long imagecolorat(ImageModule.QuercusImage image,
                                int x,
                                int y)
Get the index of the color of a pixel


imagecolorclosest

public static long imagecolorclosest(ImageModule.QuercusImage image,
                                     int r,
                                     int g,
                                     int b)
Get the index of the closest color to the specified color


imagecolorclosestalpha

public static long imagecolorclosestalpha(ImageModule.QuercusImage image,
                                          int r,
                                          int g,
                                          int b,
                                          int a)
Get the index of the closest color to the specified color + alpha


imagecolorclosesthwb

public static long imagecolorclosesthwb(ImageModule.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


imagecolordeallocate

public static boolean imagecolordeallocate(ImageModule.QuercusImage image,
                                           int rgb)
De-allocate a color for an image


imagecolorexact

public static long imagecolorexact(ImageModule.QuercusImage image,
                                   int r,
                                   int g,
                                   int b)
Get the index of the specified color


imagecolorexactalpha

public static long imagecolorexactalpha(ImageModule.QuercusImage image,
                                        int r,
                                        int g,
                                        int b,
                                        int a)
Get the index of the specified color + alpha


imagecolormatch

public static boolean imagecolormatch(ImageModule.QuercusImage image1,
                                      ImageModule.QuercusImage image2)
Makes the colors of the palette version of an image more closely match the true color version


imagecolorresolve

public static long imagecolorresolve(ImageModule.QuercusImage image,
                                     int r,
                                     int g,
                                     int b)
Get the index of the specified color or its closest possible alternative


imagecolorresolvealpha

public static long imagecolorresolvealpha(ImageModule.QuercusImage image,
                                          int r,
                                          int g,
                                          int b,
                                          int a)
Get the index of the specified color + alpha or its closest possible alternative


imagecolorset

public static boolean imagecolorset(ImageModule.QuercusImage image,
                                    int index,
                                    int r,
                                    int g,
                                    int b)
Set the color for the specified palette index


imagecolorsforindex

public static ArrayValue imagecolorsforindex(ImageModule.QuercusImage image,
                                             int argb)
Get the colors for an index


imagecolorstotal

public static Value imagecolorstotal()
Find out the number of colors in an image's palette


imagecolortransparent

public static long imagecolortransparent(ImageModule.QuercusImage image,
                                         int color)
Define a color as transparent


imageconvolution

public static boolean imageconvolution(ImageModule.QuercusImage image,
                                       ArrayValue matrix,
                                       double div,
                                       double offset)
Apply a 3x3 convolution matrix, using coefficient div and offset


imagecopy

public static boolean imagecopy(ImageModule.QuercusImage dest,
                                ImageModule.QuercusImage src,
                                int dx,
                                int dy,
                                int sx,
                                int sy,
                                int w,
                                int h)
Copy part of an image


imagecopymerge

public static boolean imagecopymerge(ImageModule.QuercusImage dest,
                                     ImageModule.QuercusImage src,
                                     int dx,
                                     int dy,
                                     int sx,
                                     int sy,
                                     int w,
                                     int h,
                                     int pct)
Copy and merge part of an image


imagecopymergegray

public static boolean imagecopymergegray(ImageModule.QuercusImage dest,
                                         ImageModule.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


imagecopyresampled

public static boolean imagecopyresampled(ImageModule.QuercusImage dest,
                                         ImageModule.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


imagecopyresized

public static boolean imagecopyresized(ImageModule.QuercusImage dest,
                                       ImageModule.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


imagecreate

public static Value imagecreate(int width,
                                int height)
Create a new palette based image


imagecreatefromgd2

public static void imagecreatefromgd2(Path file)
Create a new image from GD2 file or URL


imagecreatefromgd2part

public 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


imagecreatefromgd

public static void imagecreatefromgd(Path file)
Create a new image from GD file or URL


imagecreatefromgif

public static ImageModule.QuercusImage imagecreatefromgif(Env env,
                                                          Path filename)
Create a new image from file or URL


imagecreatefromjpeg

public static ImageModule.QuercusImage imagecreatefromjpeg(Env env,
                                                           Path filename)
Create a new image from file or URL


imagecreatefrompng

public static ImageModule.QuercusImage imagecreatefrompng(Env env,
                                                          Path filename)
Create a new image from file or URL


imagecreatefromstring

public static ImageModule.QuercusImage imagecreatefromstring(Env env,
                                                             java.io.InputStream data)
Create a new image from the image stream in the string


imagecreatefromwbmp

public static ImageModule.QuercusImage imagecreatefromwbmp(Env env,
                                                           Path filename)
Create a new image from file or URL


imagecreatefromxbm

public static Value imagecreatefromxbm(Env env,
                                       Path filename)
Create a new image from file or URL


imagecreatefromxpm

public static ImageModule.QuercusImage imagecreatefromxpm(Env env,
                                                          Path filename)
Create a new image from file or URL


imagecreatetruecolor

public static Value imagecreatetruecolor(int width,
                                         int height)
Create a new true color image


imagedashedline

public static boolean imagedashedline(ImageModule.QuercusImage image,
                                      int x1,
                                      int y1,
                                      int x2,
                                      int y2,
                                      int color)
Draw a dashed line


imagedestroy

public static boolean imagedestroy(ImageModule.QuercusImage image)
Destroy an image


imageellipse

public static boolean imageellipse(ImageModule.QuercusImage image,
                                   double cx,
                                   double cy,
                                   double width,
                                   double height,
                                   int color)
Draw an ellipse


imagefill

public static boolean imagefill(ImageModule.QuercusImage image,
                                int x,
                                int y,
                                int color)
Flood fill


imagefilledarc

public static boolean imagefilledarc(ImageModule.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


imagefilledellipse

public static boolean imagefilledellipse(ImageModule.QuercusImage image,
                                         double cx,
                                         double cy,
                                         double width,
                                         double height,
                                         int color)
Draw a filled ellipse


imagefilledpolygon

public static boolean imagefilledpolygon(Env env,
                                         ImageModule.QuercusImage image,
                                         ArrayValue points,
                                         int numPoints,
                                         int color)
Draw a filled polygon


imagefilledrectangle

public static boolean imagefilledrectangle(ImageModule.QuercusImage image,
                                           int x1,
                                           int y1,
                                           int x2,
                                           int y2,
                                           int color)
Draw a filled rectangle


imagefilltoborder

public static boolean imagefilltoborder(ImageModule.QuercusImage image,
                                        int x,
                                        int y,
                                        int border,
                                        int color)
Flood fill to specific color


imagefilter

public static boolean imagefilter(Env env,
                                  ImageModule.QuercusImage image,
                                  int filterType,
                                  int arg1,
                                  int arg2,
                                  int arg3)
Applies a filter to an image


imagefontheight

public static int imagefontheight(int font)
Get font height.

Parameters:
font - a font previously loaded with imageloadfont(com.caucho.vfs.Path), or 1 -5 for built-in fonts

imagefontwidth

public static int imagefontwidth(int font)
Get font width.

Parameters:
font - a font previously loaded with imageloadfont(com.caucho.vfs.Path), or 1 -5 for built-in fonts

imageftbbox

public static Value imageftbbox(Env env,
                                double size,
                                double angle,
                                StringValue fontFile,
                                java.lang.String text,
                                ArrayValue extra)
draws a true type font image


imagefttext

public static Value imagefttext(Env env,
                                ImageModule.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


imagegammacorrect

public static boolean imagegammacorrect(ImageModule.QuercusImage image,
                                        float gammaBefore,
                                        float gammaAfter)
Apply a gamma correction to a GD image


imagegd2

public static void imagegd2(ImageModule.QuercusImage image,
                            Path file)
Output GD2 image to browser or file


imagegd

public static void imagegd(ImageModule.QuercusImage image,
                           Path file)
Output GD image to browser or file


imagegif

public static boolean imagegif(Env env,
                               ImageModule.QuercusImage image,
                               Path path)
Output image to browser or file


imageinterlace

public static boolean imageinterlace(ImageModule.QuercusImage image,
                                     java.lang.Boolean enable)
Enable or disable interlace


imageistruecolor

public static boolean imageistruecolor(ImageModule.QuercusImage image)
Finds whether an image is a truecolor image


imagejpeg

public static boolean imagejpeg(Env env,
                                ImageModule.QuercusImage image,
                                Path path,
                                int quality)
Output image to browser or file


imagelayereffect

public static boolean imagelayereffect(ImageModule.QuercusImage image,
                                       int effect)
Set the alpha blending flag to use the bundled libgd layering effects


imageline

public static boolean imageline(ImageModule.QuercusImage image,
                                int x1,
                                int y1,
                                int x2,
                                int y2,
                                int color)
Draw a line


imageloadfont

public static long imageloadfont(Path file)
Load a new font


imagepalettecopy

public static boolean imagepalettecopy(ImageModule.QuercusImage source,
                                       ImageModule.QuercusImage dest)
Copy the palette from one image to another


imagepng

public static boolean imagepng(Env env,
                               ImageModule.QuercusImage image,
                               Path path)
Output a PNG image to either the browser or a file


imagepolygon

public static boolean imagepolygon(Env env,
                                   ImageModule.QuercusImage image,
                                   ArrayValue points,
                                   int numPoints,
                                   int color)
Draw a polygon


imagepsbbox

public 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


imagepscopyfont

public static int imagepscopyfont(Value fontIndex)
Make a copy of an already loaded font for further modification


imagepsencodefont

public static boolean imagepsencodefont(Value fontIndex,
                                        Path encodingFile)
Change the character encoding vector of a font


imagepsextendfont

public static boolean imagepsextendfont(int fontIndex,
                                        float extend)
Extend or condense a font


imagepsfreefont

public static boolean imagepsfreefont(Value fontIndex)
Free memory used by a PostScript Type 1 font


imagepsloadfont

public static Value imagepsloadfont(Path fontFile)
Load a PostScript Type 1 font from file


imagepsslantfont

public static boolean imagepsslantfont(Value fontIndex,
                                       float slant)
Slant a font


imagepstext

public static ArrayValue imagepstext(ImageModule.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


imagerectangle

public static boolean imagerectangle(ImageModule.QuercusImage image,
                                     int x1,
                                     int y1,
                                     int x2,
                                     int y2,
                                     int color)
Draw a rectangle


imagerotate

public static boolean imagerotate(ImageModule.QuercusImage image,
                                  float angle,
                                  int backgroundColor,
                                  int ignoreTransparent)
Rotate an image with a given angle


imagesavealpha

public static boolean imagesavealpha(ImageModule.QuercusImage image,
                                     boolean set)
Set the flag to save full alpha channel information (as opposed to single-color transparency) when saving PNG images


imagesetbrush

public static boolean imagesetbrush(ImageModule.QuercusImage image,
                                    ImageModule.QuercusImage brush)
Set the brush image for line drawing


imagesetpixel

public static boolean imagesetpixel(ImageModule.QuercusImage image,
                                    int x,
                                    int y,
                                    int color)
Set a single pixel


imagesetstyle

public static boolean imagesetstyle(Env env,
                                    ImageModule.QuercusImage image,
                                    ArrayValue style)
Set the style for line drawing


imagesetthickness

public static boolean imagesetthickness(ImageModule.QuercusImage image,
                                        int thickness)
Set the thickness for line


imagestring

public static boolean imagestring(ImageModule.QuercusImage image,
                                  int font,
                                  int x,
                                  int y,
                                  java.lang.String s,
                                  int color)
Draw a string horizontally


imagestringup

public static boolean imagestringup(ImageModule.QuercusImage image,
                                    int font,
                                    int x,
                                    int y,
                                    java.lang.String s,
                                    int color)
Draw a string vertically


imagesx

public static int imagesx(ImageModule.QuercusImage image)
Returns the width of the image.


imagesy

public static int imagesy(ImageModule.QuercusImage image)
Returns the height of the image.


image_transform

public static boolean image_transform(ImageModule.QuercusImage image,
                                      double m00,
                                      double m10,
                                      double m01,
                                      double m11,
                                      double m02,
                                      double m12)
general affine transformation


image_transform_scale

public static boolean image_transform_scale(ImageModule.QuercusImage image,
                                            double sx,
                                            double sy)
scaling transformation


image_transform_shear

public static boolean image_transform_shear(ImageModule.QuercusImage image,
                                            double shx,
                                            double shy)
shearing transformation


image_transform_translate

public static boolean image_transform_translate(ImageModule.QuercusImage image,
                                                double x,
                                                double y)
translation transformation


imagettfbbox

public static Value imagettfbbox(Env env,
                                 double size,
                                 double angle,
                                 StringValue fontFile,
                                 java.lang.String text)
draws a true type font image


imagettftext

public static Value imagettftext(Env env,
                                 ImageModule.QuercusImage image,
                                 double size,
                                 double angle,
                                 int x,
                                 int y,
                                 int color,
                                 StringValue fontFile,
                                 java.lang.String text)
draws a true type font image


imagetypes

public static long imagetypes()
Returns the imagetypes.


imagewbmp

public static void imagewbmp(ImageModule.QuercusImage image,
                             Path filename,
                             int threshhold)
Output image to browser or file


iptcembed

public static boolean iptcembed(java.lang.String iptcdata,
                                java.lang.String jpegFileName,
                                int spool)
Embe into single tags.


jpeg2wbmp

public 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


png2wbmp

public 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