Constants

VERSION

VERSION

Properties

$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

$image_type

$image_type : integer

image format of source

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

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

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

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

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

createThumbnail()

createThumbnail() : void

creates the thumbnail and saves it to a variable