[ Index ]
 

Code source de CMS made simple 1.0.5

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/filemanager/ImageManager/Classes/ -> Transform.php (sommaire)

(pas de description)

Poids: 571 lignes (16 kb)
Inclus ou requis: 1 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

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


Classe: Image_Transform  - X-Ref

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.

factory($driver)   X-Ref
Create a new Image_resize object

param: string $driver name of driver class to initialize
return: mixed a newly created Image_Transform object, or a PEAR

resize($new_x = 0, $new_y = 0)   X-Ref
Resize the Image in the X and/or Y direction
If either is 0 it will be scaled proportionally

param: mixed $new_x (0, number, percentage 10% or 0.1)
param: mixed $new_y (0, number, percentage 10% or 0.1)
return: mixed none or PEAR_error

scaleMaxX($new_x)   X-Ref
Scale the image to have the max x dimension specified.

param: int $new_x Size to scale X-dimension to
return: none

scaleMaxY($new_y)   X-Ref
Scale the image to have the max y dimension specified.

param: int $new_y Size to scale Y-dimension to
return: none

scale($size)   X-Ref
Scale Image to a maximum or percentage

param: mixed (number, percentage 10% or 0.1)
return: mixed none or PEAR_error

scaleByPercentage($size)   X-Ref
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

param: int $size Percentage of original size to scale to
return: none

scaleByFactor($size)   X-Ref
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.

param: float $size Factor of original size to scale to
return: none

scaleByLength($size)   X-Ref
Scales an image so that the longest side has this dimension.

param: int $size Max dimension in pixels
return: none

_get_image_details($image)   X-Ref

return: void

_parse_size($new_size, $old_size)   X-Ref
Parse input and convert
If either is 0 it will be scaled proportionally

param: mixed $new_size (0, number, percentage 10% or 0.1)
param: int $old_size
return: mixed none or PEAR_error

uniqueStr()   X-Ref
Pas de description

cleanUp($id, $dir)   X-Ref
Pas de description

createUnique($dir)   X-Ref
Pas de description

_set_img_x($size)   X-Ref
Set the image width

param: int $size dimension to set
return:

_set_img_y($size)   X-Ref
Set the image height

param: int $size dimension to set
return:

_set_new_x($size)   X-Ref
Set the image width

param: int $size dimension to set
return:

_set_new_y($size)   X-Ref
Set the image height

param: int $size dimension to set
return:

getImageType()   X-Ref
Get the type of the image being manipulated

return: string $this->type the image type

getWebSafeFormat()   X-Ref

return: string web-safe image type

_resize()   X-Ref
Place holder for the real resize method
used by extended methods to do the resizing

return: PEAR_error

load($filename)   X-Ref
Place holder for the real load method
used by extended methods to do the resizing

return: PEAR_error

display($type, $quality)   X-Ref
Place holder for the real display method
used by extended methods to do the resizing

param: string filename
return: PEAR_error

save($filename, $type, $quality)   X-Ref
Place holder for the real save method
used by extended methods to do the resizing

param: string filename
return: PEAR_error

free()   X-Ref
Place holder for the real free method
used by extended methods to do the resizing

return: PEAR_error

colorhex2colorarray($colorhex)   X-Ref
Reverse of rgb2colorname.

return: PEAR_error

colorarray2colorhex($color)   X-Ref
Reverse of rgb2colorname.

return: PEAR_error

addText()   X-Ref
Pas de description

addDropShadow()   X-Ref
Pas de description

addBorder()   X-Ref
Pas de description

crop()   X-Ref
Pas de description

flip()   X-Ref
Pas de description

gamma()   X-Ref
Pas de description



Généré le : Tue Apr 3 18:50:37 2007 par Balluche grâce à PHPXref 0.7