This class defines the Horde_Image:: API, and also provides some
utility functions, such as generating highlights of a color.
Copyright 2002-2012 Horde LLC (http://www.horde.org/)
See the enclosed file COPYING for license information (LGPL). If you
did not receive this file, see http://www.horde.org/licenses/lgpl21.
Methods summary
public
array
|
#
getCapabilities( )
Getter for the capabilities array
Getter for the capabilities array
Returns
array
|
public
boolean
|
#
hasCapability( string $capability )
Check the existence of a particular capability.
Check the existence of a particular capability.
Parameters
- $capability
- The capability to check for.
Returns
boolean
|
public
string
|
#
getContentType( )
Return the content type for this image.
Return the content type for this image.
Returns
string The content type for this image.
|
public
string
|
#
getType( )
Getter for the simplified image type.
Getter for the simplified image type.
Returns
string The type of image (png, jpg, etc...)
|
public
|
#
setType( string $type )
Setter for the image type.
Setter for the image type.
Parameters
- $type
- The simple type for the imag (png, jpg, etc...)
|
public
|
#
brush( integer $x, integer $y, string $color = 'black', string $shape = 'square' )
Draw a shaped point at the specified (x,y) point. Useful for
scatter diagrams, debug points, etc. Draws squares, circles,
diamonds, and triangles.
Draw a shaped point at the specified (x,y) point. Useful for
scatter diagrams, debug points, etc. Draws squares, circles,
diamonds, and triangles.
Parameters
- $x
- The x coordinate of the point to brush.
- $y
- The y coordinate of the point to brush.
- $color
- The color to brush the point with.
- $shape
- What brush to use? Defaults to a square.
|
public
|
#
reset( )
Reset the image data to defaults.
Reset the image data to defaults.
|
public
array
|
#
getDimensions( )
Get the height and width of the current image data.
Get the height and width of the current image data.
Returns
array An hash with 'width' containing the width,
'height' containing the height of the image.
|
public
|
#
loadString( string $image_data )
Load the image data from a string.
Load the image data from a string.
Parameters
- $image_data
- $id An arbitrary id for the image.
|
public
mixed
|
#
loadFile( string $filename )
Load the image data from a file.
Load the image data from a file.
Parameters
- $filename
- <p>The full path and filename to the file to load
the image data from. The filename will also be
used for the image id.</p>
Returns
mixed True if successful or already loaded, PEAR Error if file
does not exist or could not be loaded.
Throws
|
public
string
|
#
toFile( mixed $data = false )
Ouputs image data to file. If $data is false, outputs current
image data after performing any pending operations on the data.
If $data contains raw image data, outputs that data to file without
regard for $this->_data
Ouputs image data to file. If $data is false, outputs current
image data after performing any pending operations on the data.
If $data contains raw image data, outputs that data to file without
regard for $this->_data
Parameters
- $data
- of binary image data | false
Returns
string Path to temporary file.
|
public
|
#
display( )
Display the current image.
Display the current image.
|
public
string
|
#
raw( boolean $convert = false )
Returns the raw data for this image.
Returns the raw data for this image.
Parameters
- $convert
- <p>If true, the image data will be returned in the
target format, independently from any image
operations.</p>
Returns
string The raw image data.
|
public
boolean
|
#
addEffect( string $type, array $params )
Attempts to apply requested effect to this image.
Attempts to apply requested effect to this image.
Parameters
- $type
- The type of effect to apply.
- $params
- Any parameters for the effect.
Returns
boolean
|
public
|
#
getLoadedEffects( )
Load a list of available effects for this driver.
Load a list of available effects for this driver.
|
public
|
#
applyEffects( )
Apply any effects in the effect queue.
Apply any effects in the effect queue.
|
public
|
|
public
|
#
clearGeometry( )
Utility function to zero out cached geometry information. Shouldn't
really be called from client code, but is needed since Effects may need
to clear these.
Utility function to zero out cached geometry information. Shouldn't
really be called from client code, but is needed since Effects may need
to clear these.
|
abstract public
Horde_Image_Base
|
#
getImageAtIndex( integer $index )
Request a specific image from the collection of images.
Request a specific image from the collection of images.
Parameters
- $index
- The index to return
Returns
|
abstract public
integer
|
#
getImagePageCount( )
Return the number of image pages available in the image object.
Return the number of image pages available in the image object.
Returns
integer
|