PHP 클래스 Tollwerk\Squeezr\Image

부터: 1.0b
저자: Joschi Kuphal ([email protected])
상속: extends Tollwerk\Squeezr
파일 보기 프로젝트 열기: jkphl/squeezr 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_absoluteCacheImageDir string Parent directory of cached image file (absolute path)
$_absoluteCacheImagePath string Cached image file (absolute path)
$_absoluteImagePath string Requested image file (absolute path)
$_quantizers array Valid quantizers
$_relativeImagePath string Requested image file (relative path to document root)

공개 메소드들

메소드 설명
instance ( string $image ) : Image Instanciate an image adaptor
send ( ) : void Send the cached and possibly downsampled image
squeeze ( string $source, string $target, string $breakpoint = SQUEEZR_BREAKPOINT, array &$errors = [] ) : string Squeeze a particular source file

보호된 메소드들

메소드 설명
__construct ( string $image ) Constructor
_downscaleGif ( string $source, integer $width, integer $height, string $target, integer $targetWidth, integer $targetHeight ) : boolean Downscale a GIF image
_downscaleJpeg ( string $source, integer $width, integer $height, string $target, integer $targetWidth, integer $targetHeight ) : boolean Downscale a JPEG image
_downscalePng ( string $source, integer $width, integer $height, string $target, integer $targetWidth, integer $targetHeight ) : boolean Downscale a PNG image
_enableTranparency ( resource $image, array $transparentColor = null ) : void Enable transparency on an image resource
_sharpenImage ( resource $image, integer $width, integer $targetWidth ) : void Sharpen an image

메소드 상세

__construct() 보호된 메소드

Constructor
protected __construct ( string $image )
$image string Image file

_downscaleGif() 보호된 정적인 메소드

Downscale a GIF image
protected static _downscaleGif ( string $source, integer $width, integer $height, string $target, integer $targetWidth, integer $targetHeight ) : boolean
$source string Source image path
$width integer Source image width
$height integer Source image height
$target string Target image path
$targetWidth integer Target image width
$targetHeight integer Target image height
리턴 boolean Downscaled image has been saved

_downscaleJpeg() 보호된 정적인 메소드

Downscale a JPEG image
protected static _downscaleJpeg ( string $source, integer $width, integer $height, string $target, integer $targetWidth, integer $targetHeight ) : boolean
$source string Source image path
$width integer Source image width
$height integer Source image height
$target string Target image path
$targetWidth integer Target image width
$targetHeight integer Target image height
리턴 boolean Downscaled image has been saved

_downscalePng() 보호된 정적인 메소드

Downscale a PNG image
protected static _downscalePng ( string $source, integer $width, integer $height, string $target, integer $targetWidth, integer $targetHeight ) : boolean
$source string Source image path
$width integer Source image width
$height integer Source image height
$target string Target image path
$targetWidth integer Target image width
$targetHeight integer Target image height
리턴 boolean Downscaled image has been saved

_enableTranparency() 보호된 정적인 메소드

Enable transparency on an image resource
protected static _enableTranparency ( resource $image, array $transparentColor = null ) : void
$image resource Image resource
$transparentColor array Transparent color
리턴 void

_sharpenImage() 보호된 정적인 메소드

Sharpen an image
protected static _sharpenImage ( resource $image, integer $width, integer $targetWidth ) : void
$image resource Image resource
$width integer Original image width
$targetWidth integer Downsampled image width
리턴 void

instance() 공개 정적인 메소드

Instanciate an image adaptor
public static instance ( string $image ) : Image
$image string Image file
리턴 Image Instance reference

send() 공개 메소드

Send the cached and possibly downsampled image
public send ( ) : void
리턴 void

squeeze() 공개 정적인 메소드

Squeeze a particular source file
public static squeeze ( string $source, string $target, string $breakpoint = SQUEEZR_BREAKPOINT, array &$errors = [] ) : string
$source string Source file
$target string Target file
$breakpoint string Breakpoint
$errors array Errors
리턴 string Result file path

프로퍼티 상세

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

Parent directory of cached image file (absolute path)
protected string $_absoluteCacheImageDir
리턴 string

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

Cached image file (absolute path)
protected string $_absoluteCacheImagePath
리턴 string

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

Requested image file (absolute path)
protected string $_absoluteImagePath
리턴 string

$_quantizers 보호되어 있는 정적으로 프로퍼티

Valid quantizers
protected static array $_quantizers
리턴 array

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

Requested image file (relative path to document root)
protected string $_relativeImagePath
리턴 string