PHP Класс Webiny\Component\Image\Bridge\Imagine\Imagine

Наследование: implements Webiny\Component\Image\Bridge\ImageLoaderInterface, use trait Webiny\Component\StdLib\StdLibTrait
Показать файл Открыть проект

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

Метод Описание
__construct ( ConfigObject $config ) Base constructor.
create ( integer $width, integer $height, string $bgColor = null, integer $alpha = 100 ) : Webiny\Component\Image\ImageInterface Create a blank image with of given dimensions and fill it with $bgColor.
load ( string $string ) : Webiny\Component\Image\ImageInterface Create a new ImageInterface instance form the given binary string.
open ( File $image ) : Webiny\Component\Image\ImageInterface Creates a new ImageInterface instance from the given image at the provided path.
resource ( mixed $resource ) : Webiny\Component\Image\ImageInterface Create a new ImageInterface instance from the given resource.

Приватные методы

Метод Описание
getLibraryInstance ( string $library ) : Imagine\Gd\Imagine | Imagine\Gmagick\Imagine | Imagine\Imagick\Imagine Create a library instance based on given library name.

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

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

Base constructor.
public __construct ( ConfigObject $config )
$config Webiny\Component\Config\ConfigObject

create() публичный Метод

Create a blank image with of given dimensions and fill it with $bgColor.
public create ( integer $width, integer $height, string $bgColor = null, integer $alpha = 100 ) : Webiny\Component\Image\ImageInterface
$width integer Width of the new image.
$height integer Height of the new image.
$bgColor string Background color. Following formats are acceptable - "fff" - "ffffff" - array(255,255,255)
$alpha integer Alpha transparency.
Результат Webiny\Component\Image\ImageInterface

load() публичный Метод

Create a new ImageInterface instance form the given binary string.
public load ( string $string ) : Webiny\Component\Image\ImageInterface
$string string Binary string that holds image information.
Результат Webiny\Component\Image\ImageInterface

open() публичный Метод

Creates a new ImageInterface instance from the given image at the provided path.
public open ( File $image ) : Webiny\Component\Image\ImageInterface
$image Webiny\Component\Storage\File\File Path to an image on the disk.
Результат Webiny\Component\Image\ImageInterface

resource() публичный Метод

Create a new ImageInterface instance from the given resource.
public resource ( mixed $resource ) : Webiny\Component\Image\ImageInterface
$resource mixed Resource.
Результат Webiny\Component\Image\ImageInterface