Image
[ class tree: Image ] [ index: Image ] [ all elements ]

Class: Image_Transform_Driver_IM

Source Location: /main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/IM.php

Class Overview

Image_Transform
   |
   --Image_Transform_Driver_IM

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.


Author(s):

Version:

  • 1.00

Variables

Methods


Inherited Variables

Inherited Methods

Class: Image_Transform

Image_Transform::addBorder()
Image_Transform::addDropShadow()
Image_Transform::addText()
Image_Transform::cleanUp()
Image_Transform::colorarray2colorhex()
Reverse of rgb2colorname.
Image_Transform::colorhex2colorarray()
Reverse of rgb2colorname.
Image_Transform::createUnique()
Image_Transform::crop()
Image_Transform::display()
Place holder for the real display method used by extended methods to do the resizing
Image_Transform::factory()
Create a new Image_resize object
Image_Transform::flip()
Image_Transform::free()
Place holder for the real free method used by extended methods to do the resizing
Image_Transform::gamma()
Image_Transform::getImageType()
Get the type of the image being manipulated
Image_Transform::getWebSafeFormat()
Image_Transform::load()
Place holder for the real load method used by extended methods to do the resizing
Image_Transform::resize()
Resize the Image in the X and/or Y direction If either is 0 it will be scaled proportionally
Image_Transform::save()
Place holder for the real save method used by extended methods to do the resizing
Image_Transform::scale()
Scale Image to a maximum or percentage
Image_Transform::scaleByFactor()
Scales an image to a factor of its original size. For example, if my image was 640x480 and I called scaleByFactor(0.5) then the image would be resized to 320x240.
Image_Transform::scaleByLength()
Scales an image so that the longest side has this dimension.
Image_Transform::scaleByPercentage()
Scales an image to a percentage of its original size. For example, if my image was 640x480 and I called scaleByPercentage(10) then the image would be resized to 64x48
Image_Transform::scaleMaxX()
Scale the image to have the max x dimension specified.
Image_Transform::scaleMaxY()
Scale the image to have the max y dimension specified.
Image_Transform::uniqueStr()
Image_Transform::_get_image_details()
Image_Transform::_parse_size()
Parse input and convert If either is 0 it will be scaled proportionally
Image_Transform::_resize()
Place holder for the real resize method used by extended methods to do the resizing
Image_Transform::_set_img_x()
Set the image width
Image_Transform::_set_img_y()
Set the image height
Image_Transform::_set_new_x()
Set the image width
Image_Transform::_set_new_y()
Set the image height

Class Details

[line 35]
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.




Tags:

author:  Peter Bowyer <peter@mapledesign.co.uk>
version:  1.00


[ Top ]


Class Variables

$command = array()

[line 41]

associative array commands to be executed


Type:   array


[ Top ]



Class Methods


constructor Image_Transform_Driver_IM [line 47]

Image_Transform_Driver_IM Image_Transform_Driver_IM( )



[ Top ]

method addText [line 149]

none addText( array $params)

addText



Tags:

see:  PEAR::isError()


Overrides Image_Transform::addText() (parent method not documented)

Parameters:

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 )

[ Top ]

method crop [line 99]

void crop( int $crop_x, int $crop_y, int $crop_width, int $crop_height)

Crop the image



Overrides Image_Transform::crop() (parent method not documented)

Parameters:

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

[ Top ]

method display [line 211]

none display( [string $type = ''], [int $quality = 75])

Display image without saving and lose changes



Overrides Image_Transform::display() (Place holder for the real display method used by extended methods to do the resizing)

Parameters:

string   $type   type (JPG,PNG...);
int   $quality   quality 75

[ Top ]

method flip [line 109]

void flip( boolean $horizontal)

Flip the image horizontally or vertically



Overrides Image_Transform::flip() (parent method not documented)

Parameters:

boolean   $horizontal   true if horizontal flip, vertical otherwise

[ Top ]

method free [line 228]

none free( )

Destroy image handle



Overrides Image_Transform::free() (Place holder for the real free method used by extended methods to do the resizing)

[ Top ]

method gamma [line 178]

none gamma( [float $outputgamma = 1.0])

Adjust the image gamma



Overrides Image_Transform::gamma() (parent method not documented)

Parameters:

float   $outputgamma  

[ Top ]

method load [line 60]

mixed load( string $image)

Load image



Tags:

return:  none or a PEAR error object on error
see:  PEAR::isError()


Overrides Image_Transform::load() (Place holder for the real load method used by extended methods to do the resizing)

Parameters:

string   $image   filename

[ Top ]

method rotate [line 123]

void rotate( int $angle, [array $options = null])

rotate



Parameters:

int   $angle   angle rotation angle
array   $options   options no option allowed

[ Top ]

method save [line 191]

none save( $filename $filename, [$quality $type = ''], [$type $quality = 85])

Save the image file



Overrides Image_Transform::save() (Place holder for the real save method used by extended methods to do the resizing)

Parameters:

$filename   $filename   string the name of the file to write to
$quality   $type   quality image dpi, default=75
$type   $quality   string (JPG,PNG...)

[ Top ]

method _resize [line 80]

none _resize( int $new_x, int $new_y)

Resize Action



Tags:

see:  PEAR::isError()


Overrides Image_Transform::_resize() (Place holder for the real resize method used by extended methods to do the resizing)

Parameters:

int   $new_x   new_x new width
int   $new_y   new_y new height

[ Top ]


Documentation generated on Thu, 12 Jun 2008 13:45:56 -0500 by phpDocumentor 1.4.1