|
Fat-Free Framework
3.1.0 API Reference
|
Image manipulation tools. More...
Public Member Functions | |
| 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) | |
| identicon ($str, $size=64, $blocks=4) | |
| captcha ($font, $size=24, $len=5, $key=NULL, $path='') | |
| width () | |
| height () | |
| render () | |
| dump () | |
| save () | |
| restore ($state=1) | |
| undo () | |
| __construct ($file=NULL, $flag=FALSE, $path='') | |
| __destruct () | |
Public Attributes | |
| $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 | POS_Left =1 |
| const | POS_Center =2 |
| const | POS_Right =4 |
| const | POS_Top =8 |
| const | POS_Middle =16 |
| const | POS_Bottom =32 |
Detailed Description
Image manipulation tools.
Constructor & Destructor Documentation
| Image::__construct | ( | $file = NULL, |
|
$flag = FALSE, |
|||
$path = '' |
|||
| ) |
Instantiate image
- Parameters
-
$file string $flag bool $path string
| Image::__destruct | ( | ) |
Wrap-up
- Returns
- NULL
Member Function Documentation
| Image::blur | ( | $selective = FALSE) |
Blur the image using Gaussian filter
- Returns
- object
- Parameters
-
$selective bool
| Image::brightness | ( | $level) |
Adjust brightness (range:-255 to 255)
- Returns
- object
- Parameters
-
$level int
| Image::captcha | ( | $font, | |
$size = 24, |
|||
$len = 5, |
|||
$key = NULL, |
|||
$path = '' |
|||
| ) |
Generate CAPTCHA image
- Returns
- object|FALSE
- Parameters
-
$font string $size int $len int $key string $path string
| Image::contrast | ( | $level) |
Adjust contrast (range:-100 to 100)
- Returns
- object
- Parameters
-
$level int
| Image::crop | ( | $x1, | |
| $y1, | |||
| $x2, | |||
| $y2 | |||
| ) |
Crop the image
- Returns
- object
- Parameters
-
$x1 int $y1 int $x2 int $y2 int
| Image::dump | ( | ) |
Return image as a string
- Returns
- string
| Image::emboss | ( | ) |
Emboss the image
- Returns
- object
| Image::grayscale | ( | ) |
Convert to grayscale
- Returns
- object
| Image::height | ( | ) |
Return image height
- Returns
- int
| Image::hflip | ( | ) |
Flip on horizontal axis
- Returns
- object
| Image::identicon | ( | $str, | |
$size = 64, |
|||
$blocks = 4 |
|||
| ) |
Generate identicon
- Returns
- object
- Parameters
-
$str string $size int $blocks int
| Image::invert | ( | ) |
Invert image
- Returns
- object
| Image::overlay | ( | Image | $img, |
$align = NULL |
|||
| ) |
Apply an image overlay
- Returns
- object
- Parameters
-
$img object $align int
| Image::pixelate | ( | $size) |
Pixelate the image
- Returns
- object
- Parameters
-
$size int
| Image::render | ( | ) |
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
-
$state int
| Image::rgb | ( | $color) |
Convert RGB hex triad to array
- Returns
- array|FALSE
- Parameters
-
$color int
| Image::rotate | ( | $angle) |
Rotate image
- Returns
- object
- Parameters
-
$angle int
| Image::save | ( | ) |
Save current state
- Returns
- object
| Image::sepia | ( | ) |
Apply sepia effect
- Returns
- object
| Image::sketch | ( | ) |
Apply sketch effect
- Returns
- object
| Image::smooth | ( | $level) |
Adjust smoothness
- Returns
- object
- Parameters
-
$level int
| Image::undo | ( | ) |
Undo most recently applied filter
- Returns
- object
| Image::vflip | ( | ) |
Flip on vertical axis
- Returns
- object
| Image::width | ( | ) |
Return image width
- Returns
- int
The documentation for this class was generated from the following file:
- image.php
Generated on Mon Aug 19 2013 21:27:47 for Fat-Free Framework by
1.8.4