PHP Класс Instafilter\Image

This image class allows for the basic manipulation of images and the addition of any number of instagram-style filters Based on the FuelPHP 1.x Image class http://fuelphp.com
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$image
$image_temp

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

Свойство Тип Описание
$accepted_extensions
$configuration
$im_path
$imagick
$queued_actions

Открытые методы

Метод Описание
__construct ( array $configuration = [] )
__destruct ( )
_apply_filter ( $filter )
apply_filter ( $filter )
exec ( string $program, string $params, boolean $passthru = false ) : mixed Executes the specified imagemagick executable and returns the output.
image ( )
imagick ( $set = null )
load ( $filename, $configuration = [] )
resize ( $width, $height = null, $keepar = true, $pad = false )
run_queue ( boolean $clear = null ) Runs all queued actions on the loaded image.
save ( $output )
sizes ( )

Защищенные методы

Метод Описание
_queue ( string $function ) Queues a function to run at a later time.
_resize ( $width, $height = null, $keepar = true, $pad = true )
check_extension ( string $filename, boolean $writevar = true ) : boolean Checks if the extension is accepted by this library, and if its valid sets the $this->image_extension variable.
convert_number ( string $input, boolean $x = null ) : integer Converts percentages, negatives, and other values to absolute integers.
debug ( ) Used for debugging image output.

Описание методов

__construct() публичный метод

public __construct ( array $configuration = [] )
$configuration array

__destruct() публичный метод

public __destruct ( )

_apply_filter() публичный метод

public _apply_filter ( $filter )

_queue() защищенный метод

Queues a function to run at a later time.
protected _queue ( string $function )
$function string The name of the function to be ran, without the leading _

_resize() защищенный метод

protected _resize ( $width, $height = null, $keepar = true, $pad = true )

apply_filter() публичный метод

public apply_filter ( $filter )

check_extension() защищенный метод

Checks if the extension is accepted by this library, and if its valid sets the $this->image_extension variable.
protected check_extension ( string $filename, boolean $writevar = true ) : boolean
$filename string
$writevar boolean Decides if the extension should be written to $this->image_extension
Результат boolean

convert_number() защищенный метод

Converts percentages, negatives, and other values to absolute integers.
protected convert_number ( string $input, boolean $x = null ) : integer
$input string
$x boolean Determines if the number relates to the x-axis or y-axis.
Результат integer The converted number, usable with the image being edited.

debug() защищенный метод

Used for debugging image output.
protected debug ( )

exec() публичный метод

Executes the specified imagemagick executable and returns the output.
public exec ( string $program, string $params, boolean $passthru = false ) : mixed
$program string The name of the executable.
$params string The parameters of the executable.
$passthru boolean Returns the output if false or pass it to browser.
Результат mixed Either returns the output or returns nothing.

image() публичный метод

public image ( )

imagick() публичный метод

public imagick ( $set = null )

load() публичный статический метод

public static load ( $filename, $configuration = [] )

resize() публичный метод

public resize ( $width, $height = null, $keepar = true, $pad = false )

run_queue() публичный метод

Runs all queued actions on the loaded image.
public run_queue ( boolean $clear = null )
$clear boolean Decides if the queue should be cleared once completed.

save() публичный метод

public save ( $output )

sizes() публичный метод

public sizes ( )

Описание свойств

$accepted_extensions защищенное свойство

protected $accepted_extensions

$configuration защищенное свойство

protected $configuration

$im_path защищенное свойство

protected $im_path

$image публичное свойство

public $image

$image_temp публичное свойство

public $image_temp

$imagick защищенное свойство

protected $imagick

$queued_actions защищенное свойство

protected $queued_actions