PHP Class BxDolImageResize, dolphin.pro

Inheritance: extends BxDol, implements iBxDolSingleton
Mostrar archivo Open project: boonex/dolphin.pro Class Usage Examples

Protected Properties

Property Type Description
$_iJpegQuality
$_isAutoCrop < size of destination image
$_isSquareResize < jpeg quality
$_isUseGD < use smart resize, destination image will be exact Width x Height size
$_oManager < use GD library or command line ImagMagic utilites
$_sError < Intervention Image Manager
$h
$w

Public Methods

Method Description
__clone ( ) Prevent cloning the instance
__construct ( ) < Intervention Image Manager error string
_applyWatermark ( $sSrcImage, $sDstImage, $sWtrImage, $iTransparency, $sPosition = 'bottom-right', $sPositionOffsetX, $sPositionOffsetY, $sScaleFactor = 0.2 )
_getImageSize ( $sPath )
_grayscale ( $sSrcImage, $sDstImage = '' ) private functions are below -------------------------------
_resize ( $sSrcImage, $sDstImage = '' )
applyWatermark ( $mixedImage, $sDstImage, $sWtrImage, $iTransparency, $sPosition = 'bottom-right', $sPositionOffsetX, $sPositionOffsetY, $sScaleFactor = 0.2 )
crop ( $iScaledWidth, $iScaledHeight, $x, $y, $iCroppedWidth, $iCroppedHeight, $iRotation, $sSrcImage, $sDstImage = '' ) : true Crop image
getAverageColor ( $sSrcImage )
getError ( )
getExifInfo ( $sSrcImage, $bCreateLocalFileIfUrl = true )
getImageSize ( $sPath )
getManager ( )
grayscale ( $mixedImage, $sDstImage = '' )
instance ( ) Get singleton instance of the class
isAllowedImage ( $sSrcImage )
isUsedGD ( )
removeCropOptions ( )
resize ( $mixedImage, $sDstImage = '' )
setAutoCrop ( $b ) Crop image to destination size with filling whole area of destination size
setJpegOutput ( $b )
setJpegQuality ( $i )
setSize ( $w, $h )
setSquareResize ( $b )

Method Details

__clone() public method

Prevent cloning the instance
public __clone ( )

__construct() public method

< Intervention Image Manager error string
public __construct ( )

_applyWatermark() public method

public _applyWatermark ( $sSrcImage, $sDstImage, $sWtrImage, $iTransparency, $sPosition = 'bottom-right', $sPositionOffsetX, $sPositionOffsetY, $sScaleFactor = 0.2 )

_getImageSize() public method

public _getImageSize ( $sPath )

_grayscale() public method

private functions are below -------------------------------
public _grayscale ( $sSrcImage, $sDstImage = '' )

_resize() public method

public _resize ( $sSrcImage, $sDstImage = '' )

applyWatermark() public method

public applyWatermark ( $mixedImage, $sDstImage, $sWtrImage, $iTransparency, $sPosition = 'bottom-right', $sPositionOffsetX, $sPositionOffsetY, $sScaleFactor = 0.2 )

crop() public method

Crop image
public crop ( $iScaledWidth, $iScaledHeight, $x, $y, $iCroppedWidth, $iCroppedHeight, $iRotation, $sSrcImage, $sDstImage = '' ) : true
$iScaledWidth - scaled img width
$iScaledHeight - scaled img height
$x - cropped area coord
$y - cropped area coord
$iCroppedWidth - cropped area width
$iCroppedHeight - cropped area height
$iRotation - img rotation
$sSrcImage - source image
$sDstImage - destination image, leave empty to overwrite $sSrcImage
return true on success, false on error

getAverageColor() public method

public getAverageColor ( $sSrcImage )

getError() public method

public getError ( )

getExifInfo() public method

public getExifInfo ( $sSrcImage, $bCreateLocalFileIfUrl = true )

getImageSize() static public method

static public getImageSize ( $sPath )

getManager() public method

public getManager ( )

grayscale() public method

public grayscale ( $mixedImage, $sDstImage = '' )

instance() public static method

Get singleton instance of the class
public static instance ( )

isAllowedImage() public method

public isAllowedImage ( $sSrcImage )

isUsedGD() public method

public isUsedGD ( )

removeCropOptions() public method

public removeCropOptions ( )

resize() public method

public resize ( $mixedImage, $sDstImage = '' )

setAutoCrop() public method

Crop image to destination size with filling whole area of destination size
public setAutoCrop ( $b )

setJpegOutput() public method

public setJpegOutput ( $b )

setJpegQuality() public method

public setJpegQuality ( $i )

setSize() public method

public setSize ( $w, $h )

setSquareResize() public method

public setSquareResize ( $b )

Property Details

$_iJpegQuality protected_oe property

protected $_iJpegQuality

$_isAutoCrop protected_oe property

< size of destination image
protected $_isAutoCrop

$_isSquareResize protected_oe property

< jpeg quality
protected $_isSquareResize

$_isUseGD protected_oe property

< use smart resize, destination image will be exact Width x Height size
protected $_isUseGD

$_oManager protected_oe property

< use GD library or command line ImagMagic utilites
protected $_oManager

$_sError protected_oe property

< Intervention Image Manager
protected $_sError

$h protected_oe property

protected $h

$w protected_oe property

protected $w