PHP Class ManaPHP\Image\Adapter\Gd

Inheritance: extends ManaPHP\Component, implements ManaPHP\Image\AdapterInterface
Datei anzeigen Open project: manaphp/manaphp

Protected Properties

Property Type Description
$_file string
$_height integer
$_image resource
$_width integer

Public Methods

Method Description
__construct ( string $file )
__destruct ( )
crop ( integer $width, integer $height, integer $offsetX, integer $offsetY ) : static
getHeight ( ) : integer Image height
getInternalHandle ( )
getWidth ( ) : integer Image width
resize ( integer $width, integer $height ) : static
rotate ( integer $degrees, integer $background = 16777215, float $alpha = 1 ) : static Rotate the image by a given degrees
save ( string $file, integer $quality = 80 )
text ( string $text, integer $offsetX, integer $offsetY, float $opacity = 1, integer $color, integer $size = 12, string $font_file = null ) : static Execute a text
watermark ( string $file, integer $offsetX, integer $offsetY, float $opacity = 1 ) : static

Method Details

__construct() public method

public __construct ( string $file )
$file string

__destruct() public method

public __destruct ( )

crop() public method

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

getHeight() public method

Image height
public getHeight ( ) : integer
return integer

getInternalHandle() public method

public getInternalHandle ( )

getWidth() public method

Image width
public getWidth ( ) : integer
return integer

resize() public method

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

rotate() public method

Rotate the image by a given degrees
public rotate ( integer $degrees, integer $background = 16777215, float $alpha = 1 ) : static
$degrees integer
$background integer
$alpha float
return static

save() public method

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

text() public method

Execute a 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
return static

watermark() public method

public watermark ( string $file, integer $offsetX, integer $offsetY, float $opacity = 1 ) : static
$file string
$offsetX integer
$offsetY integer
$opacity float
return static

Property Details

$_file protected_oe property

protected string $_file
return string

$_height protected_oe property

protected int $_height
return integer

$_image protected_oe property

protected resource $_image
return resource

$_width protected_oe property

protected int $_width
return integer