Class Image_Transform_Driver_IM

Description

The main "Image_Resize" class is a container and base class which provides the static methods for creating Image objects as well as some utility functions (maths) common to all parts of Image Resize.

The object model of DB is as follows (indentation means inheritance):

Image_Resize The base for each Image implementation. Provides default | implementations (in OO lingo virtual methods) for | the actual Image implementations as well as a bunch of | maths methods. | +-Image_GD The Image implementation for the PHP GD extension . Inherits Image_Resize When calling DB::setup for GD images the object returned is an instance of this class.

Located in /plugins/ImageManager/Classes/IM.php (line 35)

Image_Transform
   |
   --Image_Transform_Driver_IM
Variable Summary
 array $command
Method Summary
 Image_Transform_Driver_IM Image_Transform_Driver_IM ()
 none addText (array $params)
 void crop (int $crop_x, int $crop_y, int $crop_width, int $crop_height)
 none display ([string $type = ''], [int $quality = 75])
 void flip (boolean $horizontal)
 none free ()
 none gamma ([mixed $outputgamma = 1.0], float $outputgamma )
 mixed load (string $image)
 void rotate (int $angle, [array $options = null])
 none save ($filename $filename, [$quality $type = ''], [$type $quality = 85])
 none _resize (int $new_x, int $new_y)
Variables
Methods
Constructor Image_Transform_Driver_IM (line 47)
Image_Transform_Driver_IM Image_Transform_Driver_IM ()
addText (line 149)

addText

  • see: PEAR::isError()
none addText (array $params)
  • array $params: options Array contains options array( 'text' The string to draw 'x' Horizontal position 'y' Vertical Position 'Color' Font color 'font' Font to be used 'size' Size of the fonts in pixel 'resize_first' Tell if the image has to be resized before drawing the text )

Redefinition of:
Image_Transform::addText()
crop (line 99)

Crop the image

void crop (int $crop_x, int $crop_y, int $crop_width, int $crop_height)
  • int $crop_x: left column of the image
  • int $crop_y: top row of the image
  • int $crop_width: new cropped image width
  • int $crop_height: new cropped image height

Redefinition of:
Image_Transform::crop()
display (line 212)

Display image without saving and lose changes

none display ([string $type = ''], [int $quality = 75])
  • string $type: type (JPG,PNG...);
  • int $quality: quality 75

Redefinition of:
Image_Transform::display()
Place holder for the real display method used by extended methods to do the resizing
flip (line 109)

Flip the image horizontally or vertically

void flip (boolean $horizontal)
  • boolean $horizontal: true if horizontal flip, vertical otherwise

Redefinition of:
Image_Transform::flip()
free (line 229)

Destroy image handle

none free ()

Redefinition of:
Image_Transform::free()
Place holder for the real free method used by extended methods to do the resizing
gamma (line 178)

Adjust the image gamma

none gamma ([mixed $outputgamma = 1.0], float $outputgamma )
  • float $outputgamma

Redefinition of:
Image_Transform::gamma()
load (line 60)

Load image

  • return: none or a PEAR error object on error
  • see: PEAR::isError()
mixed load (string $image)
  • string $image: filename

Redefinition of:
Image_Transform::load()
Place holder for the real load method used by extended methods to do the resizing
rotate (line 123)

rotate

void rotate (int $angle, [array $options = null])
  • int $angle: angle rotation angle
  • array $options: options no option allowed
save (line 191)

Save the image file

none save ($filename $filename, [$quality $type = ''], [$type $quality = 85])
  • $filename $filename: string the name of the file to write to
  • $quality $type: quality image dpi, default=75
  • $type $quality: string (JPG,PNG...)

Redefinition of:
Image_Transform::save()
Place holder for the real save method used by extended methods to do the resizing
_resize (line 80)

Resize Action

  • see: PEAR::isError()
none _resize (int $new_x, int $new_y)
  • int $new_x: new_x new width
  • int $new_y: new_y new height

Inherited Methods

Inherited From Image_Transform

 Image_Transform::addBorder()
 Image_Transform::addDropShadow()
 Image_Transform::addText()
 Image_Transform::cleanUp()
 Image_Transform::colorarray2colorhex()
 Image_Transform::colorhex2colorarray()
 Image_Transform::createUnique()
 Image_Transform::crop()
 Image_Transform::display()
 Image_Transform::factory()
 Image_Transform::flip()
 Image_Transform::free()
 Image_Transform::gamma()
 Image_Transform::getImageType()
 Image_Transform::getWebSafeFormat()
 Image_Transform::load()
 Image_Transform::resize()
 Image_Transform::save()
 Image_Transform::scale()
 Image_Transform::scaleByFactor()
 Image_Transform::scaleByLength()
 Image_Transform::scaleByPercentage()
 Image_Transform::scaleMaxX()
 Image_Transform::scaleMaxY()
 Image_Transform::uniqueStr()
 Image_Transform::_get_image_details()
 Image_Transform::_set_img_x()
 Image_Transform::_set_img_y()
 Image_Transform::_set_new_x()
 Image_Transform::_set_new_y()

Documentation generated on Mon, 13 Jun 2005 20:27:37 -0400 by phpDocumentor 1.3.0RC3