IP.Board  3.3.0
classImage Class Reference
Inheritance diagram for classImage:
classImageGd classImageImagemagick

Public Member Functions

 __construct ()
 __destruct ()
 addImagetype ($ext)
 extractImageData ($imagePath)
 hasXssInfile ($fileName)

Data Fields

 $cur_dimensions = array( 'width' => 0, 'height' => 0 )
 $error = ''
 $force_resize = false
 $image_extension = ''

Protected Member Functions

 _cleanPaths ($path='')
 _getResizeDimensions ($width, $height)
 _scaleImage ($arg)

Protected Attributes

 $image_file = ''
 $image_full = ''
 $image_path = ''
 $image_types = array( 'gif', 'jpeg', 'jpg', 'jpe', 'png' )
 $orig_dimensions = array( 'width' => 0, 'height' => 0 )

Detailed Description

Image abstract class


Constructor & Destructor Documentation

Image handler constructor

Returns:
oolean

Image handler desctructor

Returns:
void

Reimplemented in classImageImagemagick.


Member Function Documentation

_cleanPaths ( path = '') [protected]

Cleans up paths, generates var $in_file_complete

Parameters:
stringPath to clean
Returns:
string
_getResizeDimensions ( width,
height 
) [protected]

Get new dimensions for resizing

Parameters:
integerMaximum width
integerMaximum height
Returns:
array
_scaleImage ( arg) [protected]

Return proportionate image dimensions based on current and max dimension settings

Parameters:
array[ cur_height, cur_width, max_width, max_height ]
Returns:
array
addImagetype ( ext)

Add a supported image type (assumes you have properly extended the class to add the support)

Parameters:
stringImage extension type to add support for
Returns:
boolean
extractImageData ( imagePath)

Checks to see if an uploaded image truly is an image

Parameters:
stringImage path
Returns:
mixed
hasXssInfile ( fileName)

Checks for XSS inside file. If found, deletes file, sets error_no to 5 and returns

Parameters:
stringImage path
Returns:
boolean

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables