PHP 클래스 Image_GD, yii-easyimage

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

보호된 프로퍼티들

프로퍼티 타입 설명
$_create_function Function name to open Image
$_image Temporary image resource
$_isProgressiveJpeg

공개 메소드들

메소드 설명
__construct ( string $file, boolean $useProgressiveJpeg = false ) : void Runs [Image_GD::check] and loads the image.
__destruct ( ) : void Destroys the loaded image to free up resources.
check ( ) : boolean Checks if GD is enabled and bundled. Bundled GD is required for some methods to work. Exceptions will be thrown from those methods when GD is not bundled.

보호된 메소드들

메소드 설명
_create ( integer $width, integer $height ) : resource Create an empty image with the given width and height.
_do_background ( integer $r, integer $g, integer $b, integer $opacity ) : void Execute a background.
_do_crop ( integer $width, integer $height, integer $offset_x, integer $offset_y ) : void Execute a crop.
_do_flip ( integer $direction ) : void Execute a flip.
_do_reflection ( integer $height, integer $opacity, boolean $fade_in ) : void Execute a reflection.
_do_render ( string $type, integer $quality ) : string Execute a render.
_do_resize ( integer $width, integer $height ) : void Execute a resize.
_do_rotate ( integer $degrees ) : void Execute a rotation.
_do_save ( string $file, integer $quality ) : boolean Execute a save.
_do_sharpen ( integer $amount ) : void Execute a sharpen.
_do_watermark ( $watermark, integer $offset_x, integer $offset_y, integer $opacity ) : void Execute a watermarking.
_load_image ( ) : void Loads an image into GD.
_save_function ( string $extension, integer &$quality ) : array Get the GD saving function and image type for this extension.
_set_interlacing ( resource $image ) Sets an interlace mode.

메소드 상세

__construct() 공개 메소드

Runs [Image_GD::check] and loads the image.
public __construct ( string $file, boolean $useProgressiveJpeg = false ) : void
$file string image file path
$useProgressiveJpeg boolean use progressive JPEG format
리턴 void

__destruct() 공개 메소드

Destroys the loaded image to free up resources.
public __destruct ( ) : void
리턴 void

_create() 보호된 메소드

Create an empty image with the given width and height.
protected _create ( integer $width, integer $height ) : resource
$width integer image width
$height integer image height
리턴 resource

_do_background() 보호된 메소드

Execute a background.
protected _do_background ( integer $r, integer $g, integer $b, integer $opacity ) : void
$r integer red
$g integer green
$b integer blue
$opacity integer opacity
리턴 void

_do_crop() 보호된 메소드

Execute a crop.
protected _do_crop ( integer $width, integer $height, integer $offset_x, integer $offset_y ) : void
$width integer new width
$height integer new height
$offset_x integer offset from the left
$offset_y integer offset from the top
리턴 void

_do_flip() 보호된 메소드

Execute a flip.
protected _do_flip ( integer $direction ) : void
$direction integer direction to flip
리턴 void

_do_reflection() 보호된 메소드

Execute a reflection.
protected _do_reflection ( integer $height, integer $opacity, boolean $fade_in ) : void
$height integer reflection height
$opacity integer reflection opacity
$fade_in boolean TRUE to fade out, FALSE to fade in
리턴 void

_do_render() 보호된 메소드

Execute a render.
protected _do_render ( string $type, integer $quality ) : string
$type string image type: png, jpg, gif, etc
$quality integer quality
리턴 string

_do_resize() 보호된 메소드

Execute a resize.
protected _do_resize ( integer $width, integer $height ) : void
$width integer new width
$height integer new height
리턴 void

_do_rotate() 보호된 메소드

Execute a rotation.
protected _do_rotate ( integer $degrees ) : void
$degrees integer degrees to rotate
리턴 void

_do_save() 보호된 메소드

Execute a save.
protected _do_save ( string $file, integer $quality ) : boolean
$file string new image filename
$quality integer quality
리턴 boolean

_do_sharpen() 보호된 메소드

Execute a sharpen.
protected _do_sharpen ( integer $amount ) : void
$amount integer amount to sharpen
리턴 void

_do_watermark() 보호된 메소드

Execute a watermarking.
protected _do_watermark ( $watermark, integer $offset_x, integer $offset_y, integer $opacity ) : void
$offset_x integer offset from the left
$offset_y integer offset from the top
$opacity integer opacity of watermark
리턴 void

_load_image() 보호된 메소드

Loads an image into GD.
protected _load_image ( ) : void
리턴 void

_save_function() 보호된 메소드

Also normalizes the quality setting
protected _save_function ( string $extension, integer &$quality ) : array
$extension string image type: png, jpg, etc
$quality integer image quality
리턴 array save function, IMAGETYPE_* constant

_set_interlacing() 보호된 메소드

Sets an interlace mode.
protected _set_interlacing ( resource $image )
$image resource Image to apply interlacing. This is useful for creating progressive jpeg images.

check() 공개 정적인 메소드

Checks if GD is enabled and bundled. Bundled GD is required for some methods to work. Exceptions will be thrown from those methods when GD is not bundled.
public static check ( ) : boolean
리턴 boolean

프로퍼티 상세

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

Function name to open Image
protected $_create_function

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

Temporary image resource
protected $_image

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

protected $_isProgressiveJpeg