PHP Интерфейс ManaPHP\ImageInterface

Показать файл Открыть проект

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

Метод Описание
__construct ( string $file ) ImageInterface constructor.
crop ( integer $width, integer $height, integer $offsetX, integer $offsetY ) : static
getHeight ( ) : integer Image height
getWidth ( ) : integer Image width
resize ( integer $width, integer $height ) : static Resize the image by a given width and height
resizeCropCenter ( integer $width, integer $height ) : static Resize the image by a given width and height
rotate ( integer $degrees, integer $background = 16777215, float $alpha = 1 ) : static Rotate the image by a given degrees
save ( string $file, integer $quality = 80 )
scale ( float $ratio ) : static Scale the image by a given ratio
scaleFixedHeight ( integer $height ) : static Scale the image by a given height
scaleFixedWidth ( integer $width ) : static Scale the image by a given width
text ( string $text, integer $offsetX, integer $offsetY, float $opacity = 1, integer $color, integer $size = 12, string $font_file = null ) : static
watermark ( string $file, integer $offsetX, integer $offsetY, float $opacity = 1 ) : static

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

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

ImageInterface constructor.
public __construct ( string $file )
$file string

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

public crop ( integer $width, integer $height, integer $offsetX, integer $offsetY ) : static
$width integer
$height integer
$offsetX integer
$offsetY integer
Результат static

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

Image height
public getHeight ( ) : integer
Результат integer

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

Image width
public getWidth ( ) : integer
Результат integer

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

Resize the image by a given width and height
public resize ( integer $width, integer $height ) : static
$width integer
$height integer
Результат static

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

Resize the image by a given width and height
public resizeCropCenter ( integer $width, integer $height ) : static
$width integer
$height integer
Результат static

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

Rotate the image by a given degrees
public rotate ( integer $degrees, integer $background = 16777215, float $alpha = 1 ) : static
$degrees integer
$background integer
$alpha float
Результат static

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

public save ( string $file, integer $quality = 80 )
$file string
$quality integer

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

Scale the image by a given ratio
public scale ( float $ratio ) : static
$ratio float
Результат static

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

Scale the image by a given height
public scaleFixedHeight ( integer $height ) : static
$height integer
Результат static

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

Scale the image by a given width
public scaleFixedWidth ( integer $width ) : static
$width integer
Результат static

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

public text ( string $text, integer $offsetX, integer $offsetY, float $opacity = 1, integer $color, integer $size = 12, string $font_file = null ) : static
$text string
$offsetX integer
$offsetY integer
$opacity float
$color integer
$size integer
$font_file string
Результат static

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

public watermark ( string $file, integer $offsetX, integer $offsetY, float $opacity = 1 ) : static
$file string
$offsetX integer
$offsetY integer
$opacity float
Результат static