abstract class Adapter (View source)

Properties

protected int $width
protected int $height
protected bool $reinitializing
protected array $tmpFiles
protected bool $useContentOptimizedFormat
protected bool $modified
protected bool $isAlphaPossible
protected bool $preserveColor
protected bool $preserveMetaData

Methods

$this
setHeight($height)

No description

int
getHeight()

No description

$this
setWidth($width)

No description

int
getWidth()

No description

removeTmpFiles()

No description

array
colorhex2colorarray($colorhex)

No description

resize($width, $height)

No description

scaleByWidth($width, bool $forceResize = false)

No description

scaleByHeight($height, bool $forceResize = false)

No description

contain($width, $height, bool $forceResize = false)

No description

cover($width, $height, string $orientation = 'center', bool $forceResize = false)

No description

$this
frame($width, $height, bool $forceResize = false)

No description

trim(int $tolerance)

No description

$this
rotate($angle)

No description

crop($x, $y, $width, $height)

No description

setBackgroundColor($color)

No description

setBackgroundImage($image)

No description

$this
roundCorners($width, $height)

No description

addOverlay(string $image, int $x = 0, int $y = 0, int $alpha = 100, string $composite = 'COMPOSITE_DEFAULT', string $origin = 'top-left')

No description

$this
addOverlayFit($image, string $composite = 'COMPOSITE_DEFAULT')

No description

applyMask($image)

No description

cropPercent($width, $height, $x, $y)

No description

grayscale()

No description

sepia()

No description

sharpen()

No description

mirror($mode)

No description

$this|Adapter
gaussianBlur(int $radius = 0, float $sigma = 1.0)

No description

$this
brightnessSaturation(int $brightness = 100, int $saturation = 100, int $hue = 100)

No description

load($imagePath, array $options = [])

No description

mixed
save($path, null $format = null, null $quality = null)

No description

destroy()

No description

preModify()

No description

postModify()

No description

reinitializeImage()

No description

__destruct()

No description

bool
isVectorGraphic()

No description

array
getVectorRasterDimensions()

No description

$this
setColorspace(string $type = 'RGB')

No description

setUseContentOptimizedFormat(bool $useContentOptimizedFormat)

No description

bool
getUseContentOptimizedFormat()

No description

setModified(bool $modified)

No description

bool
getModified()

No description

setIsAlphaPossible(bool $value)

No description

bool
isPreserveColor()

No description

setPreserveColor(bool $preserveColor)

No description

bool
isPreserveMetaData()

No description

setPreserveMetaData(bool $preserveMetaData)

No description

Details

$this setHeight($height)

Parameters

$height

Return Value

$this

int getHeight()

Return Value

int

$this setWidth($width)

Parameters

$width

Return Value

$this

int getWidth()

Return Value

int

protected removeTmpFiles()

array colorhex2colorarray($colorhex)

Parameters

$colorhex

Return Value

array

Adapter resize($width, $height)

Parameters

$width
$height

Return Value

Adapter

Adapter scaleByWidth($width, bool $forceResize = false)

Parameters

$width
bool $forceResize

Return Value

Adapter

Adapter scaleByHeight($height, bool $forceResize = false)

Parameters

$height
bool $forceResize

Return Value

Adapter

Adapter contain($width, $height, bool $forceResize = false)

Parameters

$width
$height
bool $forceResize

Return Value

Adapter

Adapter cover($width, $height, string $orientation = 'center', bool $forceResize = false)

Parameters

$width
$height
string $orientation
bool $forceResize

Return Value

Adapter

$this frame($width, $height, bool $forceResize = false)

Parameters

$width
$height
bool $forceResize

Return Value

$this

Adapter trim(int $tolerance)

Parameters

int $tolerance

Return Value

Adapter

$this rotate($angle)

Parameters

$angle

Return Value

$this

Adapter crop($x, $y, $width, $height)

Parameters

$x
$y
$width
$height

Return Value

Adapter

Adapter setBackgroundColor($color)

Parameters

$color

Return Value

Adapter

Adapter setBackgroundImage($image)

Parameters

$image

Return Value

Adapter

$this roundCorners($width, $height)

Parameters

$width
$height

Return Value

$this

Adapter addOverlay(string $image, int $x = 0, int $y = 0, int $alpha = 100, string $composite = 'COMPOSITE_DEFAULT', string $origin = 'top-left')

Parameters

string $image
int $x
int $y
int $alpha
string $composite
string $origin Origin of the X and Y coordinates (top-left, top-right, bottom-left, bottom-right or center)

Return Value

Adapter

$this addOverlayFit($image, string $composite = 'COMPOSITE_DEFAULT')

Parameters

$image
string $composite

Return Value

$this

Adapter applyMask($image)

Parameters

$image

Return Value

Adapter

Adapter cropPercent($width, $height, $x, $y)

Parameters

$width
$height
$x
$y

Return Value

Adapter

Adapter grayscale()

Return Value

Adapter

Adapter sepia()

Return Value

Adapter

Adapter sharpen()

Return Value

Adapter

Adapter mirror($mode)

Parameters

$mode

Return Value

Adapter

$this|Adapter gaussianBlur(int $radius = 0, float $sigma = 1.0)

Parameters

int $radius
float $sigma

Return Value

$this|Adapter

$this brightnessSaturation(int $brightness = 100, int $saturation = 100, int $hue = 100)

Parameters

int $brightness
int $saturation
int $hue

Return Value

$this

abstract Adapter load($imagePath, array $options = [])

Parameters

$imagePath
array $options

Return Value

Adapter

abstract mixed save($path, null $format = null, null $quality = null)

Parameters

$path
null $format
null $quality

Return Value

mixed

abstract protected destroy()

preModify()

postModify()

protected reinitializeImage()

__destruct()

bool isVectorGraphic()

Return Value

bool

array getVectorRasterDimensions()

Return Value

array

$this setColorspace(string $type = 'RGB')

Parameters

string $type

Return Value

$this

setUseContentOptimizedFormat(bool $useContentOptimizedFormat)

Parameters

bool $useContentOptimizedFormat

bool getUseContentOptimizedFormat()

Return Value

bool

setModified(bool $modified)

Parameters

bool $modified

bool getModified()

Return Value

bool

setIsAlphaPossible(bool $value)

Parameters

bool $value

bool isPreserveColor()

Return Value

bool

setPreserveColor(bool $preserveColor)

Parameters

bool $preserveColor

bool isPreserveMetaData()

Return Value

bool

setPreserveMetaData(bool $preserveMetaData)

Parameters

bool $preserveMetaData