PHP Класс Tollwerk\Squeezr\Image

С версии: 1.0b
Автор: Joschi Kuphal ([email protected])
Наследование: extends Tollwerk\Squeezr
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_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