PHP 클래스 EasyImage, yii-easyimage

상속: extends CApplicationComponent
파일 보기 프로젝트 열기: zhdanovartur/yii-easyimage 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$cachePath relative path where the cache files are kept
$cacheTime cache lifetime in seconds
$driver driver type: GD, Imagick
$isProgressiveJpeg use progressive jpeg instread of baseline. This is used in GD only.
$newDirMode Permissions for main cache directory and subdirectories.
$newFileMode Permissions for cached files.
$quality value of quality: 0-100 (only for JPEG)
$retinaSupport use retina-resolutions This setting increases the load on the server.

공개 메소드들

메소드 설명
__construct ( string $file = null, string $driver = null, boolean $useProgressiveJpeg = false ) Constructor.
__toString ( ) : string Convert object to binary data of current image.
background ( $color, $opacity = 100 )
crop ( $width, $height, $offset_x = null, $offset_y = null )
detectPath ( array $file ) : string This method detects which (absolute or relative) path is used.
flip ( $direction )
image ( ) : Image This method returns the current Image instance.
init ( )
reflection ( $height = null, $opacity = 100, $fade_in = false )
render ( $type = null, $quality = 100 )
resize ( $width = null, $height = null, $master = null ) Description of the methods for the AutoComplete feature in a IDE because it uses a design pattern "factory".
rotate ( $degrees )
save ( $file = null, $quality = 100 )
scaleAndCrop ( $width, $height )
sharpen ( $amount )
thumbOf ( string $file, array $params = [], array $htmlOptions = [], mixed $hash = null ) : string This method returns prepared HTML code for cached thumbnail.
thumbSrcOf ( string $file, array $params = [], mixed $hash = null ) : string This method returns the URL to the cached thumbnail.
watermark ( $watermark, $offset_x = null, $offset_y = null, $opacity = 100 )

비공개 메소드들

메소드 설명
_doThumbOf ( string $file, string $newFile, array $params ) : boolean Performance of image manipulation and save result.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( string $file = null, string $driver = null, boolean $useProgressiveJpeg = false )
$file string
$driver string
$useProgressiveJpeg boolean

__toString() 공개 메소드

Must be rendered with the appropriate Content-Type header or it will not be displayed correctly.
public __toString ( ) : string
리턴 string as binary

background() 공개 메소드

public background ( $color, $opacity = 100 )

crop() 공개 메소드

public crop ( $width, $height, $offset_x = null, $offset_y = null )

detectPath() 공개 메소드

This method detects which (absolute or relative) path is used.
public detectPath ( array $file ) : string
$file array path
리턴 string path

flip() 공개 메소드

public flip ( $direction )

image() 공개 메소드

This method returns the current Image instance.
public image ( ) : Image
리턴 Image

init() 공개 메소드

public init ( )

reflection() 공개 메소드

public reflection ( $height = null, $opacity = 100, $fade_in = false )

render() 공개 메소드

public render ( $type = null, $quality = 100 )

resize() 공개 메소드

Description of the methods for the AutoComplete feature in a IDE because it uses a design pattern "factory".
public resize ( $width = null, $height = null, $master = null )

rotate() 공개 메소드

public rotate ( $degrees )

save() 공개 메소드

public save ( $file = null, $quality = 100 )

scaleAndCrop() 공개 메소드

public scaleAndCrop ( $width, $height )

sharpen() 공개 메소드

public sharpen ( $amount )

thumbOf() 공개 메소드

Use standard yii-component CHtml::image().
public thumbOf ( string $file, array $params = [], array $htmlOptions = [], mixed $hash = null ) : string
$file string path
$params array
$htmlOptions array
$hash mixed cache version modifier
리턴 string HTML

thumbSrcOf() 공개 메소드

This method returns the URL to the cached thumbnail.
public thumbSrcOf ( string $file, array $params = [], mixed $hash = null ) : string
$file string path
$params array
$hash mixed cache version modifier
리턴 string URL path

watermark() 공개 메소드

public watermark ( $watermark, $offset_x = null, $offset_y = null, $opacity = 100 )

프로퍼티 상세

$cachePath 공개적으로 프로퍼티

relative path where the cache files are kept
public $cachePath

$cacheTime 공개적으로 프로퍼티

cache lifetime in seconds
public $cacheTime

$driver 공개적으로 프로퍼티

driver type: GD, Imagick
public $driver

$isProgressiveJpeg 공개적으로 프로퍼티

use progressive jpeg instread of baseline. This is used in GD only.
public $isProgressiveJpeg

$newDirMode 공개적으로 프로퍼티

Permissions for main cache directory and subdirectories.
public $newDirMode

$newFileMode 공개적으로 프로퍼티

Permissions for cached files.
public $newFileMode

$quality 공개적으로 프로퍼티

value of quality: 0-100 (only for JPEG)
public $quality

$retinaSupport 공개적으로 프로퍼티

use retina-resolutions This setting increases the load on the server.
public $retinaSupport