PHP Class SlightPHP\WMThumbnail

Tested with Apache 2.2 and PHP 5.2. Last change: 2008-04-06
Author: Michael Wimmer ([email protected])
Inheritance: extends Thumbnail
Afficher le fichier Open project: hetao29/slightphp

Protected Properties

Свойство Type Description
$logos array holds all logos/watermarks
$wm_image resource
$wm_image_height integer
$wm_image_path string path/filename of logo / watermark
$wm_image_type integer image format of logo
$wm_image_width integer

Méthodes publiques

Méthode Description
__construct ( string $file = '', integer $seconds ) : void Constructor
addLogo ( string $logo = '', integer $position = 3, integer $margin = 1 ) : void sets the position of the logo /watermark
outputThumbnail ( string $format = 'png', integer $quality = 75 ) : mixed outputs the thumbnail to the browser
returnThumbnail ( string $format = 'png' ) : mixed returns the variable with the thumbnail image

Méthodes protégées

Méthode Description
createThumbnail ( ) : void creates the thumbnail and saves it to a variable
readWMImage ( string $path = '' ) : void reads the logo pic into a variable
readWMImageData ( string $path = '' ) : void reads metadata of the logo image

Method Details

__construct() public méthode

Constructor
public __construct ( string $file = '', integer $seconds ) : void
$file string path/filename of picture
$seconds integer amount of seconds thumbs should be cached. 0 = no cache
Résultat void

createThumbnail() protected méthode

creates the thumbnail and saves it to a variable
protected createThumbnail ( ) : void
Résultat void

outputThumbnail() public méthode

overrides method of base class
public outputThumbnail ( string $format = 'png', integer $quality = 75 ) : mixed
$format string gif, jpg, png, wbmp
$quality integer jpg-quality: 0-100
Résultat mixed

readWMImage() protected méthode

reads the logo pic into a variable
protected readWMImage ( string $path = '' ) : void
$path string path/filename of picture
Résultat void

readWMImageData() protected méthode

reads metadata of the logo image
protected readWMImageData ( string $path = '' ) : void
$path string path/filename of picture
Résultat void

returnThumbnail() public méthode

returns the variable with the thumbnail image
public returnThumbnail ( string $format = 'png' ) : mixed
$format string gif, jpg, png, wbmp
Résultat mixed

Property Details

$logos protected_oe property

holds all logos/watermarks
protected array $logos
Résultat array

$wm_image protected_oe property

protected resource $wm_image
Résultat resource

$wm_image_height protected_oe property

protected int $wm_image_height
Résultat integer

$wm_image_path protected_oe property

path/filename of logo / watermark
protected string $wm_image_path
Résultat string

$wm_image_type protected_oe property

image format of logo
protected int $wm_image_type
Résultat integer

$wm_image_width protected_oe property

protected int $wm_image_width
Résultat integer