PHP 클래스 SlightPHP\Thumbnail

파일 보기 프로젝트 열기: hetao29/slightphp

보호된 프로퍼티들

프로퍼티 타입 설명
$formats array possible image formats
$image resource
$image_height integer
$image_path string path/filename of imagefile
$image_type integer image format of source
$image_width integer
$quality_thumb boolean quality or speed when generating the thumbnail
$thumb_max_height integer maximal height of the generated thumbnail
$thumb_max_width integer maximal width of the generated thumbnail
$thumbnail resource
$thumbnail_height integer
$thumbnail_type integer image format of the thumbnail
$thumbnail_width integer

공개 메소드들

메소드 설명
__construct ( string $file = '' ) : void Constructor
getPictureName ( ) : integer returns the width of the thumbnail
getThumbHeight ( ) : integer returns the height of the thumbnail
getThumbWidth ( ) : integer returns the width of the thumbnail
outputThumbnail ( string $format = 'png', integer $quality = 75 ) : void outputs the thumbnail to the browser
returnThumbnail ( ) : mixed returns the variable with the thumbnail image
setMaxHeight ( integer $height ) : boolean sets the max. height of the thumbnail
setMaxSize ( integer $width, integer $height ) : boolean sets the max. width and height of the thumbnail
setMaxWidth ( integer $width ) : boolean sets the max. width of the thumbnail
setOutputFormat ( string $format = 'png' ) : void sets the output type of the thumbnail
setQualityOutput ( boolean $boolean = TRUE ) : void whether to create thumbs fast or with good quality

보호된 메소드들

메소드 설명
createThumbnail ( ) : void creates the thumbnail and saves it to a variable
readSourceImage ( ) : void reads the source image into a variable
readSourceImageData ( ) : void reads metadata of the source image
setThumbnailSize ( ) : void sets the actual width and height of the thumbnail based on the source image size and the max limits for the thumbnail

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( string $file = '' ) : void
$file string path/filename of picture or stream from a DB field
리턴 void

createThumbnail() 보호된 메소드

creates the thumbnail and saves it to a variable
protected createThumbnail ( ) : void
리턴 void

getPictureName() 공개 메소드

returns the width of the thumbnail
public getPictureName ( ) : integer
리턴 integer

getThumbHeight() 공개 메소드

returns the height of the thumbnail
public getThumbHeight ( ) : integer
리턴 integer

getThumbWidth() 공개 메소드

returns the width of the thumbnail
public getThumbWidth ( ) : integer
리턴 integer

outputThumbnail() 공개 메소드

outputs the thumbnail to the browser
public outputThumbnail ( string $format = 'png', integer $quality = 75 ) : void
$format string
$quality integer
리턴 void

readSourceImage() 보호된 메소드

reads the source image into a variable
protected readSourceImage ( ) : void
리턴 void

readSourceImageData() 보호된 메소드

reads metadata of the source image
protected readSourceImageData ( ) : void
리턴 void

returnThumbnail() 공개 메소드

returns the variable with the thumbnail image
public returnThumbnail ( ) : mixed
리턴 mixed

setMaxHeight() 공개 메소드

sets the max. height of the thumbnail
public setMaxHeight ( integer $height ) : boolean
$height integer
리턴 boolean

setMaxSize() 공개 메소드

passes values to the functions setMaxHeight() and setMaxWidth()
public setMaxSize ( integer $width, integer $height ) : boolean
$width integer
$height integer
리턴 boolean

setMaxWidth() 공개 메소드

sets the max. width of the thumbnail
public setMaxWidth ( integer $width ) : boolean
$width integer
리턴 boolean

setOutputFormat() 공개 메소드

sets the output type of the thumbnail
public setOutputFormat ( string $format = 'png' ) : void
$format string gif, jpg, png, wbmp
리턴 void

setQualityOutput() 공개 메소드

whether to create thumbs fast or with good quality
public setQualityOutput ( boolean $boolean = TRUE ) : void
$boolean boolean
리턴 void

setThumbnailSize() 보호된 메소드

sets the actual width and height of the thumbnail based on the source image size and the max limits for the thumbnail
protected setThumbnailSize ( ) : void
리턴 void

프로퍼티 상세

$formats 보호되어 있는 프로퍼티

possible image formats
protected array $formats
리턴 array

$image 보호되어 있는 프로퍼티

protected resource $image
리턴 resource

$image_height 보호되어 있는 프로퍼티

protected int $image_height
리턴 integer

$image_path 보호되어 있는 프로퍼티

path/filename of imagefile
protected string $image_path
리턴 string

$image_type 보호되어 있는 프로퍼티

image format of source
protected int $image_type
리턴 integer

$image_width 보호되어 있는 프로퍼티

protected int $image_width
리턴 integer

$quality_thumb 보호되어 있는 프로퍼티

quality or speed when generating the thumbnail
protected bool $quality_thumb
리턴 boolean

$thumb_max_height 보호되어 있는 프로퍼티

maximal height of the generated thumbnail
protected int $thumb_max_height
리턴 integer

$thumb_max_width 보호되어 있는 프로퍼티

maximal width of the generated thumbnail
protected int $thumb_max_width
리턴 integer

$thumbnail 보호되어 있는 프로퍼티

protected resource $thumbnail
리턴 resource

$thumbnail_height 보호되어 있는 프로퍼티

protected int $thumbnail_height
리턴 integer

$thumbnail_type 보호되어 있는 프로퍼티

image format of the thumbnail
protected int $thumbnail_type
리턴 integer

$thumbnail_width 보호되어 있는 프로퍼티

protected int $thumbnail_width
리턴 integer