Jeff PHP framework  0.99
Modular, extensible, OOP, MVC, lightweight php framework designed to ease the programmers in the development of web applications.
image Class Reference

Image manipulation class. More...

Public Member Functions

 getHeight ()
 Gets image height.
 getWidth ()
 Gets image width.
 load ($filepath)
 Loads an image.
 output ($image_type=IMAGETYPE_JPEG)
 Outputs directly the raw image stream.
 resize ($width, $height)
 Resizes the image to the given width and height.
 resizeToHeight ($height, $opts=null)
 Resizes the image at the given height.
 resizeToWidth ($width, $opts=null)
 Resizes the image at the given width.
 save ($filepath, $image_type=IMAGETYPE_JPEG, $compression=75, $permissions=null)
 Saves image to filepath.
 scale ($scale)
 Scales the image to the given percentage.
 type ()
 Returns the file type.

Private Attributes

 $_image
 image identifier
 $_type
 image type

Detailed Description

Image manipulation class.

Supported image types are jpg, png and gif

Author:
abidibo abidi.nosp@m.bo@g.nosp@m.mail..nosp@m.com
Version:
0.99
Date:
2011-2012

Definition at line 23 of file image.class.php.


Member Function Documentation

Gets image height.

Returns:
the height of the image

Definition at line 118 of file image.class.php.

+ Here is the caller graph for this function:

Gets image width.

Returns:
the width of the image

Definition at line 107 of file image.class.php.

+ Here is the caller graph for this function:

image::load ( filepath)

Loads an image.

Parameters:
string$filepathimage file path
Returns:
void

Definition at line 41 of file image.class.php.

image::output ( image_type = IMAGETYPE_JPEG)

Outputs directly the raw image stream.

Parameters:
mixed$image_typeimage type identifier, default IMAGETYPE_JPEG
Returns:
void

Definition at line 91 of file image.class.php.

image::resize ( width,
height 
)

Resizes the image to the given width and height.

Parameters:
int$widthimage width
int$heightimage height
Returns:
void

Definition at line 198 of file image.class.php.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

image::resizeToHeight ( height,
opts = null 
)

Resizes the image at the given height.

Parameters:
int$heightresizing height
mixed$optsAssociative array of options:
  • enlarge: bool default false. Allow image enlargement
Returns:
void

Definition at line 133 of file image.class.php.

+ Here is the call graph for this function:

image::resizeToWidth ( width,
opts = null 
)

Resizes the image at the given width.

Parameters:
int$widthresizing width
mixed$optsAssociative array of options:
  • enlarge: bool default false. Allow image enlargement
Returns:
void

Definition at line 159 of file image.class.php.

+ Here is the call graph for this function:

image::save ( filepath,
image_type = IMAGETYPE_JPEG,
compression = 75,
permissions = null 
)

Saves image to filepath.

Parameters:
string$filepathimage file path
mixed$image_typeimage type identifier, default IMAGETYPE_JPEG
int$compressionimage compression, deafult 75
string$permissionsfile permissions
Returns:
void

Definition at line 72 of file image.class.php.

image::scale ( scale)

Scales the image to the given percentage.

Parameters:
int$scalescale percentage
Returns:
void

Definition at line 182 of file image.class.php.

+ Here is the call graph for this function:

Returns the file type.

Returns:
void

Definition at line 59 of file image.class.php.


Field Documentation

image::$_image [private]

image identifier

Definition at line 28 of file image.class.php.

image::$_type [private]

image type

Definition at line 33 of file image.class.php.


The documentation for this class was generated from the following file: