PHP Class 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
Afficher le fichier Open project: fbf/instafilter

Méthodes publiques

Свойство Type Description
$image
$image_temp

Protected Properties

Свойство Type Description
$accepted_extensions
$configuration
$im_path
$imagick
$queued_actions

Méthodes publiques

Méthode Description
__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 ( )

Méthodes protégées

Méthode Description
_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.

Method Details

__construct() public méthode

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

__destruct() public méthode

public __destruct ( )

_apply_filter() public méthode

public _apply_filter ( $filter )

_queue() protected méthode

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 méthode

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

apply_filter() public méthode

public apply_filter ( $filter )

check_extension() protected méthode

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
Résultat boolean

convert_number() protected méthode

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.
Résultat integer The converted number, usable with the image being edited.

debug() protected méthode

Used for debugging image output.
protected debug ( )

exec() public méthode

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.
Résultat mixed Either returns the output or returns nothing.

image() public méthode

public image ( )

imagick() public méthode

public imagick ( $set = null )

load() public static méthode

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

resize() public méthode

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

run_queue() public méthode

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 méthode

public save ( $output )

sizes() public méthode

public sizes ( )

Property Details

$accepted_extensions protected_oe property

protected $accepted_extensions

$configuration protected_oe property

protected $configuration

$im_path protected_oe property

protected $im_path

$image public_oe property

public $image

$image_temp public_oe property

public $image_temp

$imagick protected_oe property

protected $imagick

$queued_actions protected_oe property

protected $queued_actions