Method | Description | |
---|---|---|
addAlpha ( mixed $image, boolean $isBlend = true ) | Add alpha chanel to image resource | |
alpha ( integer $color ) : integer | ||
blur ( string $blur ) : integer | ||
brightness ( integer $brightness ) : integer | ||
checkGD ( boolean $thowException = true ) : boolean | Require GD library | |
color ( integer $color ) : integer | ||
colorize ( integer $colorize ) : integer | ||
contrast ( integer $contrast ) : integer | ||
direction ( string $direction ) : string | ||
getInnerCoords ( string $position, array $canvas, array $box, array $offset = [0, 0] ) : array | Determine position | |
imageCopyMergeAlpha ( mixed $dstImg, mixed $srcImg, array $dist, array $src, array $srcSizes, integer $opacity ) | Same as PHP's imagecopymerge() function, except preserves alpha-transparency in 24-bit PNGs | |
isGdRes ( mixed $image ) : boolean | Check is var image GD resource | |
isGif ( string $format ) : boolean | ||
isJpeg ( string $format ) : boolean | ||
isPng ( string $format ) : boolean | ||
isSupportedFormat ( string $format ) : boolean | Check is format supported by lib | |
normalizeColor ( string | array $origColor ) : integer[] | Converts a hex color value to its RGB equivalent | |
opacity ( $opacity ) : integer | Check opacity value | |
opacity2Alpha ( integer $opacity ) : integer | Convert opacity value to alpha | |
percent ( string $percent ) : integer | ||
position ( string $position ) : string | Check position name | |
quality ( string $percent ) : integer | ||
range ( mixed $value, integer $min, integer $max ) : integer | Ensures $value is always within $min and $max range. | |
rotate ( integer $color ) : integer | ||
smooth ( integer $smooth ) : integer | ||
strToBin ( $imageString ) : string | Convert string to binary data |
Method | Description | |
---|---|---|
_normalizeColorArray ( array $origColor ) : integer[] | Normalize color from array | |
_normalizeColorString ( string $origColor ) : integer[] | Normalize color from string |
protected static _normalizeColorArray ( array $origColor ) : integer[] | ||
$origColor | array | |
return | integer[] |
protected static _normalizeColorString ( string $origColor ) : integer[] | ||
$origColor | string | |
return | integer[] |
public static brightness ( integer $brightness ) : integer | ||
$brightness | integer | |
return | integer |
public static getInnerCoords ( string $position, array $canvas, array $box, array $offset = [0, 0] ) : array | ||
$position | string | Position name or code |
$canvas | array | Width and Height of canvas |
$box | array | Width and Height of box that will be located on canvas |
$offset | array | Forced offset X, Y |
return | array |
public static imageCopyMergeAlpha ( mixed $dstImg, mixed $srcImg, array $dist, array $src, array $srcSizes, integer $opacity ) | ||
$dstImg | mixed | Dist image resource |
$srcImg | mixed | Source image resource |
$dist | array | Left and Top offset of dist |
$src | array | Left and Top offset of source |
$srcSizes | array | Width and Height of source |
$opacity | integer |
public static isSupportedFormat ( string $format ) : boolean | ||
$format | string | |
return | boolean |
public static normalizeColor ( string | array $origColor ) : integer[] | ||
$origColor | string | array | Hex color string, array(red, green, blue) or array(red, green, blue, alpha). Where red, green, blue - integers 0-255, alpha - integer 0-127 |
return | integer[] |
public static opacity2Alpha ( integer $opacity ) : integer | ||
$opacity | integer | |
return | integer |