|
static | gradientPalette ($input, $output, $colour_a, $colour_b) |
|
static | remapColour ($input, $output, $colour_map, $tolerance=0.2) |
|
static | resize ($input, $output, $w, $h) |
|
static | fromFile ($input) |
|
static | toFile ($image, $output, $jpeg_quality=80) |
|
Definition at line 30 of file image_manip.inc.
static fromFile |
( |
|
$input | ) |
|
|
static |
returns the image resource for the passed image file
- Parameters
-
string | $input | the input image file |
- Returns
- mixed image resource or false
Definition at line 192 of file image_manip.inc.
static gradientPalette |
( |
|
$input, |
|
|
|
$output, |
|
|
|
$colour_a, |
|
|
|
$colour_b |
|
) |
| |
|
static |
Takes a link to an image file with an (assumed) greyscale palette Then replaces the Black<->White with ColourA<->ColourB And outputs an a new file
- Parameters
-
string | $input | the input image file |
string | $output | the output image file |
string | $colour_a | hex string or html colour name |
string | $colour_b | hex string or html colour name |
- Returns
- boolean
Definition at line 46 of file image_manip.inc.
static remapColour |
( |
|
$input, |
|
|
|
$output, |
|
|
|
$colour_map, |
|
|
|
$tolerance = 0.2 |
|
) |
| |
|
static |
Takes a link to an image file with an (assumed) greyscale palette $colour_map is an associative array whose 'key' colour in the image and replaces if with the 'value' colour. The colours are in the form of HTML colour codes e.g. '5627e8', 'goldenrod'
- Parameters
-
string | $input | the input image file |
string | $output | the output image file |
Array | $colour_map | It find the 'key' colour in the image and replaced if with the 'value' colour. Colours are in hex string or html colour name |
float | $tolerance | |
- Returns
- boolean
Definition at line 99 of file image_manip.inc.
static resize |
( |
|
$input, |
|
|
|
$output, |
|
|
|
$w, |
|
|
|
$h |
|
) |
| |
|
static |
Resizes an image
- Parameters
-
string | $input | the input image file |
string | $output | the output image file |
int | $w | width of new image |
int | $h | height of new image |
- Returns
- boolean
Definition at line 141 of file image_manip.inc.
static toFile |
( |
|
$image, |
|
|
|
$output, |
|
|
|
$jpeg_quality = 80 |
|
) |
| |
|
static |
Write the image into the output file
- Parameters
-
resource | $image | the image resource to output |
string | $output | the output image file |
int | $jpeg_quality | number between 0 and 100 |
- Returns
- boolean
Definition at line 235 of file image_manip.inc.
The documentation for this class was generated from the following file: