Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Img Class Reference
[Helper Classes]

List of all members.

Detailed Description

Image Manipulation.

This module is used to manipulate an image. It uses ImageMagick convert so it can accept a wide range of image formats.

Definition at line 11 of file image.inc.php.

Static Public Member Functions

 rotate ($inputFile, $outputFile, $degrees)
 Rotates the given file $degrees clockwise.
 flip ($inputFile, $outputFile, $type)
 Flips the given file horizontally or vertically.
 resize ($inputFile, $outputFile, $maxDimension, $execute=true)
 Resizes an image so that no dimension is larger than $maxDimension If the images largest size is smaller than $maxDimension nothing is done.
 crop ($inputFile, $outputFile, $dimensions)
 Crops an image.
 convert ($inputFile, $outputFile, $flags="")
 Front end for ImageMagick convert.
 scale ($inputFile, $outputFile, $width=null, $height=null, $force=false)
 Front end for ImageMagick convert.


Member Function Documentation

Img::convert inputFile,
outputFile,
flags = ""
[static]
 

Front end for ImageMagick convert.

Converts $inputFile and places the result in $outputFile. $flags should be properly escapped command line arguments (see escapeshellarg()).

Parameters:
$inputFile the full path of image to convert (eg. "/home/user/gallery/...")
$outputFile the full path of converted image (eg. "/home/user/gallery/...")
$flags extra flags to pass on to convert; no checking is done to validate the flags that are passed.

Definition at line 119 of file image.inc.php.

References Util::shellExec().

Img::crop inputFile,
outputFile,
dimensions
[static]
 

Crops an image.

Parameters:
$inputFile the full path of image to crop (ie. "/home/user/gallery/...")
$outputFile the full path of cropped image (ie. "/home/user/gallery/...")
$dimensions the new dimensions for the cropped image

Definition at line 101 of file image.inc.php.

References Util::shellExec().

Img::flip inputFile,
outputFile,
type
[static]
 

Flips the given file horizontally or vertically.

Parameters:
$inputFile the full path of image to rotate (ie. "/home/user/gallery/...")
$outputFile the full path of rotated image (ie. "/home/user/gallery/...")
$type the direction that you wish to flip the image; must be "horizontal" or "vertical"

Definition at line 42 of file image.inc.php.

References Util::shellExec().

Img::resize inputFile,
outputFile,
maxDimension,
execute = true
[static]
 

Resizes an image so that no dimension is larger than $maxDimension If the images largest size is smaller than $maxDimension nothing is done.

Parameters:
$inputFile the full path of image to rotate (ie. "/home/user/gallery/...")
$outputFile the full path of rotated image (ie. "/home/user/gallery/...")
$maxDimension the largest dimension of any side in pixels that you would like to resize to

Definition at line 68 of file image.inc.php.

References Util::shellExec().

Referenced by BaseImage::resizeToSize().

Img::rotate inputFile,
outputFile,
degrees
[static]
 

Rotates the given file $degrees clockwise.

Parameters:
$inputFile the full path of image to rotate (ie. "/home/user/gallery/...")
$outputFile the full path of rotated image (ie. "/home/user/gallery/...")
$degrees the number of degrees to rotate the file

Definition at line 20 of file image.inc.php.

References Util::shellExec().

Img::scale inputFile,
outputFile,
width = null,
height = null,
force = false
[static]
 

Front end for ImageMagick convert.

Converts $inputFile and places the result in $outputFile. $flags should be properly escapped command line arguments (see escapeshellarg()).

Parameters:
$inputFile the full path of image to convert (eg. "/home/user/gallery/...")
$outputFile the full path of converted image (eg. "/home/user/gallery/...")
$width the width that the photo should be specified to
$height the height that the photo should be specified to
$force when set to true will force the size given, ie: not scale the image
Returns:
returns true on success, false otherwise

Definition at line 140 of file image.inc.php.

References Util::shellExec().


The documentation for this class was generated from the following file:
Generated on Fri Oct 27 12:26:41 2006 for BaseJumper by doxygen 1.3.9.1