Constants

VERSION

VERSION

Properties

$image_type

$image_type : 

spanned file

Type

$wm_image_path

$wm_image_path : string

path/filename of logo / watermark

Type

string

$wm_image

$wm_image : resource

Type

resource

$wm_image_height

$wm_image_height : integer

Type

integer

$wm_image_width

$wm_image_width : integer

Type

integer

$wm_image_type

$wm_image_type : integer

image format of logo

Type

integer

$logos

$logos : array

holds all logos/watermarks

Type

array

$formats

$formats : array

possible image formats

Type

array

$thumb_max_height

$thumb_max_height : integer

maximal height of the generated thumbnail

Type

integer

$thumb_max_width

$thumb_max_width : integer

maximal width of the generated thumbnail

Type

integer

$quality_thumb

$quality_thumb : boolean

quality or speed when generating the thumbnail

Type

boolean

$image_path

$image_path : string

path/filename of imagefile

Type

string

$image_width

$image_width : integer

Type

integer

$image_height

$image_height : integer

Type

integer

$thumbnail_height

$thumbnail_height : integer

Type

integer

$thumbnail_width

$thumbnail_width : integer

Type

integer

$thumbnail_type

$thumbnail_type : integer

image format of the thumbnail

Type

integer

$image

$image : resource

Type

resource

$thumbnail

$thumbnail : resource

Type

resource

Methods

__construct()

__construct(string  $file = '') : void

Constructor

Parameters

string $file

path/filename of picture or stream from a DB field

addLogo()

addLogo(string  $logo = '', integer  $position = 3, integer  $margin = 1) : void

sets the position of the logo /watermark

Parameters

string $logo

path/filename of the logo

integer $position

1 = left-top, 2 = right-top, 3 = right-bottom, 4 = left-bottom, 5 = center

integer $margin

margin to the border of the thumbnail

addAbsoluteLogo()

addAbsoluteLogo(string  $logo = '', array  $position = array()) : void

sets the position of the logo /watermark

Parameters

string $logo

path/filename of the logo

array $position

array("x"=>0,"y"=>0,"width"=>log_width,"height"=>log_height);

outputThumbnail()

outputThumbnail(string  $format = 'png', integer  $quality = 75) : void

outputs the thumbnail to the browser

Parameters

string $format
integer $quality

returnThumbnail()

returnThumbnail() : mixed

returns the variable with the thumbnail image

Returns

mixed

setOutputFormat()

setOutputFormat(string  $format = 'png') : void

sets the output type of the thumbnail

Parameters

string $format

gif, jpg, png, wbmp

setMaxHeight()

setMaxHeight(integer  $height) : boolean

sets the max. height of the thumbnail

Parameters

integer $height

Returns

boolean

setMaxWidth()

setMaxWidth(integer  $width) : boolean

sets the max. width of the thumbnail

Parameters

integer $width

Returns

boolean

setMaxSize()

setMaxSize(integer  $width, integer  $height) : boolean

sets the max. width and height of the thumbnail

passes values to the functions setMaxHeight() and setMaxWidth()

Parameters

integer $width
integer $height

Returns

boolean

setQualityOutput()

setQualityOutput(boolean  $boolean = TRUE) : void

whether to create thumbs fast or with good quality

Parameters

boolean $boolean

getThumbHeight()

getThumbHeight() : integer

returns the height of the thumbnail

Returns

integer

getThumbWidth()

getThumbWidth() : integer

returns the width of the thumbnail

Returns

integer

getPictureName()

getPictureName() : integer

returns the width of the thumbnail

Returns

integer

genFile()

genFile(  $fileName,   $quality = 100,   $orientation) 

Parameters

$fileName
$quality
$orientation

readWMImageData()

readWMImageData(string  $path = '') : void

reads metadata of the logo image

Parameters

string $path

path/filename of picture

readWMImage()

readWMImage(string  $path = '') : void

reads the logo pic into a variable

Parameters

string $path

path/filename of picture

createThumbnail()

createThumbnail() : void

creates the thumbnail and saves it to a variable

readSourceImageData()

readSourceImageData() : void

reads metadata of the source image

readSourceImage()

readSourceImage() : void

reads the source image into a variable

setThumbnailSize()

setThumbnailSize() : void

sets the actual width and height of the thumbnail based on the source image size and the max limits for the thumbnail