|
| __construct ($handle) |
|
| doCreate ($width, $height) |
|
| isTrueColor () |
|
| alphaBlending ($mode) |
|
| saveAlpha ($on) |
|
| allocateColorAlpha ($R, $G=null, $B=null, $A=null) |
|
| asPalette ($nColors=255, $dither=null, $matchPalette=true) |
|
| getClosestColorAlpha ($R, $G=null, $B=null, $A=null) |
|
| getExactColorAlpha ($R, $G=null, $B=null, $A=null) |
|
| getChannels () |
|
| copyNoAlpha () |
|
| asTrueColor () |
|
| asProgressive () |
|
| resizeInsideRect ($width, $height, $fit='inside', $scale='down', $alignLeft='center', $alignTop='center', $mergeOpacity=100, $fillColor=null) |
|
| __construct ($handle) |
|
| __destruct () |
|
| destroy () |
|
| getHandle () |
|
| isValid () |
|
| releaseHandle () |
|
| saveToFile ($uri) |
|
| asString ($format) |
|
| output ($format) |
|
| getWidth () |
|
| getHeight () |
|
| allocateColor ($R, $G=null, $B=null) |
|
| isTransparent () |
|
| getTransparentColor () |
|
| setTransparentColor ($color) |
|
| getTransparentColorRGB () |
|
| getRGBAt ($x, $y) |
|
| setRGBAt ($x, $y, $color) |
|
| getColorRGB ($colorIndex) |
|
| getColorAt ($x, $y) |
|
| setColorAt ($x, $y, $color) |
|
| getClosestColor ($R, $G=null, $B=null) |
|
| getExactColor ($R, $G=null, $B=null) |
|
| copyTransparencyFrom ($sourceImage, $fill=true) |
|
| fill ($x, $y, $color) |
|
| getMask () |
|
| resize ($width=null, $height=null, $fit='inside', $scale='any') |
|
| resizeDown ($width=null, $height=null, $fit='inside') |
|
| resizeUp ($width=null, $height=null, $fit='inside') |
|
| rotate ($angle, $bgColor=null, $ignoreTransparent=true) |
|
| merge ($overlay, $left=0, $top=0, $pct=100) |
|
| resizeCanvas ($width, $height, $pos_x, $pos_y, $bg_color=null, $scale='any', $merge=false) |
|
| roundCorners ($radius, $color=null, $smoothness=2, $corners=255) |
|
| applyMask ($mask, $left=0, $top=0) |
|
| applyFilter ($filter, $arg1=null, $arg2=null, $arg3=null, $arg4=null) |
|
| applyConvolution ($matrix, $div, $offset) |
|
| crop ($left=0, $top=0, $width='100%', $height='100%') |
|
| autoCrop ($margin=0, $rgb_threshold=0, $pixel_cutoff=1, $base_color=null) |
|
| asNegative () |
|
| asGrayscale () |
|
| mirror () |
|
| unsharp ($amount, $radius, $threshold) |
|
| flip () |
|
| correctGamma ($inputGamma, $outputGamma) |
|
| addNoise ($amount, $type) |
|
| __call ($name, $args) |
|
| __toString () |
|
| copy () |
|
| copyTo ($dest, $left=0, $top=0) |
|
| getCanvas () |
|
| isTrueColor () |
|
| asTrueColor () |
|
| asPalette ($nColors=255, $dither=null, $matchPalette=true) |
|
| getChannels () |
|
| copyNoAlpha () |
|
| __sleep () |
|
| __wakeup () |
|
allocateColorAlpha |
( |
|
$R, |
|
|
|
$G = null , |
|
|
|
$B = null , |
|
|
|
$A = null |
|
) |
| |
Allocates a color and returns its index
This method accepts either each component as an integer value, or an associative array that holds the color's components in keys 'red', 'green', 'blue', 'alpha'.
- Parameters
-
mixed | $R | |
int | $G | |
int | $B | |
int | $A | |
- Returns
- int
getClosestColorAlpha |
( |
|
$R, |
|
|
|
$G = null , |
|
|
|
$B = null , |
|
|
|
$A = null |
|
) |
| |
Returns the index of the color that best match the given color components
This method accepts either each component as an integer value, or an associative array that holds the color's components in keys 'red', 'green', 'blue', 'alpha'.
- Parameters
-
mixed | $R | Red component value or an associative array |
int | $G | Green component |
int | $B | Blue component |
int | $A | Alpha component |
- Returns
- int The color index
getExactColorAlpha |
( |
|
$R, |
|
|
|
$G = null , |
|
|
|
$B = null , |
|
|
|
$A = null |
|
) |
| |
Returns the index of the color that exactly match the given color components
This method accepts either each component as an integer value, or an associative array that holds the color's components in keys 'red', 'green', 'blue', 'alpha'.
- Parameters
-
mixed | $R | Red component value or an associative array |
int | $G | Green component |
int | $B | Blue component |
int | $A | Alpha component |
- Returns
- int The color index