\ManaPHP\ImagingImageInterface

Summary

Methods
Constants
__construct()
getWidth()
getHeight()
resize()
resizeCropCenter()
scale()
scaleFixedWidth()
scaleFixedHeight()
crop()
rotate()
watermark()
text()
save()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

__construct()

__construct(string  $file) 

Parameters

string $file

getWidth()

getWidth() : integer

Image width

Returns

integer

getHeight()

getHeight() : integer

Image height

Returns

integer

resize()

resize(integer  $width, integer  $height) : static

Resize the image by a given width and height

Parameters

integer $width
integer $height

Returns

static

resizeCropCenter()

resizeCropCenter(integer  $width, integer  $height) : static

Resize the image by a given width and height

Parameters

integer $width
integer $height

Returns

static

scale()

scale(float  $ratio) : static

Scale the image by a given ratio

Parameters

float $ratio

Returns

static

scaleFixedWidth()

scaleFixedWidth(integer  $width) : static

Scale the image by a given width

Parameters

integer $width

Returns

static

scaleFixedHeight()

scaleFixedHeight(integer  $height) : static

Scale the image by a given height

Parameters

integer $height

Returns

static

crop()

crop(integer  $width, integer  $height, integer  $offsetX, integer  $offsetY) : static

Parameters

integer $width
integer $height
integer $offsetX
integer $offsetY

Returns

static

rotate()

rotate(integer  $degrees, integer  $background = 16777215, float  $alpha = 1.0) : static

Rotate the image by a given degrees

Parameters

integer $degrees
integer $background
float $alpha

Returns

static

watermark()

watermark(string  $file, integer  $offsetX, integer  $offsetY, float  $opacity = 1.0) : static

Parameters

string $file
integer $offsetX
integer $offsetY
float $opacity

Returns

static

text()

text(string  $text, integer  $offsetX, integer  $offsetY, float  $opacity = 1.0, integer  $color, integer  $size = 12, string  $font_file = null) : static

Parameters

string $text
integer $offsetX
integer $offsetY
float $opacity
integer $color
integer $size
string $font_file

Returns

static

save()

save(string  $file, integer  $quality = 80) : void

Parameters

string $file
integer $quality