Phalcon image
NOTE
All classes are prefixed with Phalcon
Image\Adapter\AbstractAdapter ¶
-
Namespace
Phalcon\Image\Adapter
-
Uses
Phalcon\Image\Enum
Phalcon\Image\Exception
-
Extends
-
Implements
AdapterInterface
All image adapters must use this class
Properties¶
/**
* @var string
*/
protected $file;
/**
* Image height
*
* @var int
*/
protected $height;
/**
* @var mixed|null
*/
protected $image;
/**
* Image mime type
*
* @var string
*/
protected $mime;
/**
* @var string
*/
protected $realpath;
/**
* Image type
*
* Driver dependent
*
* @var int
*/
protected $type;
/**
* Image width
*
* @var int
*/
protected $width;
Methods¶
Set the background color of an image Blur imagepublic function crop( int $width, int $height, int $offsetX = null, int $offsetY = null ): AdapterInterface;
public function reflection( int $height, int $opacity = int, bool $fadeIn = bool ): AdapterInterface;
public function resize( int $width = null, int $height = null, int $master = static-constant-access ): AdapterInterface;
public function text( string $text, mixed $offsetX = bool, mixed $offsetY = bool, int $opacity = int, string $color = string, int $size = int, string $fontFile = null ): AdapterInterface;
public function watermark( AdapterInterface $watermark, int $offsetX = int, int $offsetY = int, int $opacity = int ): AdapterInterface;
Image\Adapter\AdapterInterface ¶
-
Namespace
Phalcon\Image\Adapter
-
Uses
Phalcon\Image\Enum
-
Extends
-
Implements
Interface for Phalcon\Image\Adapter classes
Methods¶
Add a background to an image Blur an imagepublic function crop( int $width, int $height, int $offsetX = null, int $offsetY = null ): AdapterInterface;
public function reflection( int $height, int $opacity = int, bool $fadeIn = bool ): AdapterInterface;
public function resize( int $width = null, int $height = null, int $master = static-constant-access ): AdapterInterface;
public function text( string $text, int $offsetX = int, int $offsetY = int, int $opacity = int, string $color = string, int $size = int, string $fontFile = null ): AdapterInterface;
public function watermark( AdapterInterface $watermark, int $offsetX = int, int $offsetY = int, int $opacity = int ): AdapterInterface;
Image\Adapter\Gd¶
-
Namespace
Phalcon\Image\Adapter
-
Uses
Phalcon\Image\Enum
Phalcon\Image\Exception
-
Extends
AbstractAdapter
-
Implements
This file is part of the Phalcon Framework.
(c) Phalcon Team team@phalcon.io
For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code.
Methods¶
Destructorprotected function processText( string $text, mixed $offsetX, mixed $offsetY, int $opacity, int $red, int $green, int $blue, int $size, string $fontFile = null ): void;
protected function processWatermark( AdapterInterface $watermark, int $offsetX, int $offsetY, int $opacity ): void;
Image\Adapter\Imagick¶
-
Namespace
Phalcon\Image\Adapter
-
Uses
Imagick
ImagickDraw
ImagickDrawException
ImagickException
ImagickPixel
ImagickPixelException
Phalcon\Image\Enum
Phalcon\Image\Exception
-
Extends
AbstractAdapter
-
Implements
Phalcon\Image\Adapter\Imagick
Image manipulation support. Resize, rotate, crop etc.
$image = new \Phalcon\Image\Adapter\Imagick("upload/test.jpg");
$image->resize(200, 200)->rotate(90)->crop(100, 100);
if ($image->save()) {
echo "success";
}
Properties¶
Methods¶
Constructor Destroys the loaded image to free up resources.public function liquidRescale( int $width, int $height, int $deltaX = int, int $rigidity = int ): AbstractAdapter;
protected function processText( string $text, mixed $offsetX, mixed $offsetY, int $opacity, int $red, int $green, int $blue, int $size, string $fontFile = null ): void;
protected function processWatermark( AdapterInterface $image, int $offsetX, int $offsetY, int $opacity ): void;
Image\Enum¶
-
Namespace
Phalcon\Image
-
Uses
-
Extends
-
Implements
This file is part of the Phalcon Framework.
(c) Phalcon Team team@phalcon.io
For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code.
Constants¶
const AUTO = 4;
const HEIGHT = 3;
const HORIZONTAL = 11;
const INVERSE = 5;
const NONE = 1;
const PRECISE = 6;
const TENSILE = 7;
const VERTICAL = 12;
const WIDTH = 2;
Image\Exception¶
-
Namespace
Phalcon\Image
-
Uses
-
Extends
\Exception
-
Implements
Exceptions thrown in Phalcon\Image will use this class
Image\ImageFactory¶
-
Namespace
Phalcon\Image
-
Uses
Phalcon\Factory\AbstractFactory
Phalcon\Image\Adapter\AdapterInterface
-
Extends
AbstractFactory
-
Implements
This file is part of the Phalcon Framework.
(c) Phalcon Team team@phalcon.io
For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code.