Image manipulation tools.
More...
|
| rgb ($color) |
|
| invert () |
|
| brightness ($level) |
|
| contrast ($level) |
|
| grayscale () |
|
| smooth ($level) |
|
| emboss () |
|
| sepia () |
|
| pixelate ($size) |
|
| blur ($selective=FALSE) |
|
| sketch () |
|
| hflip () |
|
| vflip () |
|
| crop ($x1, $y1, $x2, $y2) |
|
| resize ($width, $height, $crop=TRUE, $enlarge=TRUE) |
|
| rotate ($angle) |
|
| overlay (Image $img, $align=NULL, $alpha=100) |
|
| identicon ($str, $size=64, $blocks=4) |
|
| captcha ($font, $size=24, $len=5, $key=NULL, $path='', $fg=0xFFFFFF, $bg=0x000000) |
|
| width () |
|
| height () |
|
| render () |
|
| dump () |
|
| save () |
|
| restore ($state=1) |
|
| undo () |
|
| load ($str) |
|
| __construct ($file=NULL, $flag=FALSE, $path='') |
|
| __destruct () |
|
|
| $data |
| Image resource.
|
|
| $flag =FALSE |
| Enable/disable history.
|
|
| $count =0 |
| Filter count.
|
|
|
const | E_Color ='Invalid color specified: %s' |
|
const | E_Font ='CAPTCHA font not found' |
|
const | E_Length ='Invalid CAPTCHA length: %s' |
|
|
const | POS_Left =1 |
|
const | POS_Center =2 |
|
const | POS_Right =4 |
|
const | POS_Top =8 |
|
const | POS_Middle =16 |
|
const | POS_Bottom =32 |
|
Image manipulation tools.
Image::__construct |
( |
|
$file = NULL , |
|
|
|
$flag = FALSE , |
|
|
|
$path = '' |
|
) |
| |
Instantiate image
- Parameters
-
$file | string |
$flag | bool |
$path | string |
Image::blur |
( |
|
$selective = FALSE | ) |
|
Blur the image using Gaussian filter
- Returns
- object
- Parameters
-
Image::brightness |
( |
|
$level | ) |
|
Adjust brightness (range:-255 to 255)
- Returns
- object
- Parameters
-
Image::captcha |
( |
|
$font, |
|
|
|
$size = 24 , |
|
|
|
$len = 5 , |
|
|
|
$key = NULL , |
|
|
|
$path = '' , |
|
|
|
$fg = 0xFFFFFF , |
|
|
|
$bg = 0x000000 |
|
) |
| |
Generate CAPTCHA image
- Returns
- object|FALSE
- Parameters
-
$font | string |
$size | int |
$len | int |
$key | string |
$path | string |
$fg | int |
$bg | int |
Image::contrast |
( |
|
$level | ) |
|
Adjust contrast (range:-100 to 100)
- Returns
- object
- Parameters
-
Image::crop |
( |
|
$x1, |
|
|
|
$y1, |
|
|
|
$x2, |
|
|
|
$y2 |
|
) |
| |
Crop the image
- Returns
- object
- Parameters
-
$x1 | int |
$y1 | int |
$x2 | int |
$y2 | int |
Return image as a string
- Returns
- string
Emboss the image
- Returns
- object
Convert to grayscale
- Returns
- object
Return image height
- Returns
- int
Flip on horizontal axis
- Returns
- object
Image::identicon |
( |
|
$str, |
|
|
|
$size = 64 , |
|
|
|
$blocks = 4 |
|
) |
| |
Generate identicon
- Returns
- object
- Parameters
-
$str | string |
$size | int |
$blocks | int |
Invert image
- Returns
- object
Load string
- Returns
- object
- Parameters
-
Image::overlay |
( |
Image |
$img, |
|
|
|
$align = NULL , |
|
|
|
$alpha = 100 |
|
) |
| |
Apply an image overlay
- Returns
- object
- Parameters
-
$img | object |
$align | int|array |
$alpha | int |
Pixelate the image
- Returns
- object
- Parameters
-
Send image to HTTP client
- Returns
- NULL
Image::resize |
( |
|
$width, |
|
|
|
$height, |
|
|
|
$crop = TRUE , |
|
|
|
$enlarge = TRUE |
|
) |
| |
Resize image (Maintain aspect ratio); Crop relative to center if flag is enabled; Enlargement allowed if flag is enabled
- Returns
- object
- Parameters
-
$width | int |
$height | int |
$crop | bool |
$enlarge | bool |
Image::restore |
( |
|
$state = 1 | ) |
|
Revert to specified state
- Returns
- object
- Parameters
-
Convert RGB hex triad to array
- Returns
- array|FALSE
- Parameters
-
Rotate image
- Returns
- object
- Parameters
-
Save current state
- Returns
- object
Apply sepia effect
- Returns
- object
Apply sketch effect
- Returns
- object
Adjust smoothness
- Returns
- object
- Parameters
-
Undo most recently applied filter
- Returns
- object
Flip on vertical axis
- Returns
- object
Return image width
- Returns
- int
The documentation for this class was generated from the following file: