\TriTan\CommonImage

Summary

Methods
Properties
Constants
__construct()
resize()
manipulate()
$util
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$util

$util : 

Type

Methods

resize()

resize(integer  $width, integer  $height, string  $target) 

Resize image function.

Example Usage:

 $size = getimagesize('static/assets/img/avatar.png');
 $this->resize($size[0], $size[1], 80);

Parameters

integer $width

Width of the image.

integer $height

Height of the image.

string $target

Size of image.

manipulate()

manipulate(array  $params = array()) : boolean

Manipulate image(s) with an expressive API

Parameters

array $params

An array of parameters for image manipulation. @type string $image_source The source of the original image. @type string $image_destination The destination of the new image. @type bool $image_sepia Whether to add sepia filter. @type int $image_blur Blue the image. @type bool $image_original Whether to return/save new image to original size. @type int $image_width Width of new image in pixels. @type int $image_height Height of new image in pixels @type string $image_format Whether to show post in search. @type int $image_quality Quality percent. Only applies for jpeg. @type int $image_brightness The post's featured image. @type int $image_contrast Adjusts the contrast of image. @type int $image_gamma Adjusts the gamma of image. @type string $image_background Sets the background of transparent images. @type string $image_fit Fits the image with the given width and height. @type string $image_crop Cropped to the given width and height. @type array $image_border Adds border to image. @type string $image_orientation Rotate the image. @type int $image_pixelate Pixelates the image. @type bool $image_greyscale Converts image to greyscale. @type int $image_sharpen Sharpens the image. @type array $image_watermark Adds a watermark to image.

Returns

boolean