Class GD
A wrapper class for GD-based images, with lots of manipulation functions.
- Object
-
GD
Methods summary
public
|
|
public
|
|
public
|
|
public static
|
|
public
|
|
public
|
#
croppedResize( mixed $width, mixed $height )
Resize an image to cover the given width/height completely, and crop off any overhanging edges. |
public
|
#
fittedResize( mixed $width, mixed $height )
Resizes the image to fit within the given region. Behaves similarly to paddedResize but without the padding. |
public
|
|
public
|
|
public
|
|
public
|
#
rotatePixelByPixel( angle $angle )
Rotates image by given angle. It's slow because makes it pixel by pixel rather than using built-in function. Used when imagerotate function is not available(i.e. Ubuntu) |
public
|
|
public
integer
|
|
public
integer
|
|
public
|
|
public
|
|
public
|
#
resizeRatio( mixed $maxWidth, mixed $maxHeight, mixed $useAsMinimum = false )
Resize the image by preserving aspect ratio. By default, it will keep the image inside the maxWidth and maxHeight Passing useAsMinimum will make the smaller dimension equal to the maximum corresponding dimension |
public static
|
|
public
|
#
paddedResize(
Resize to fit fully within the given box, without resizing. Extra space left around the image will be padded with the background color. |
public
|
#
greyscale( mixed $rv = 38, mixed $gv = 36, mixed $bv = 26 )
Make the image greyscale $rv = red value, defaults to 38 $gv = green value, defaults to 36 $bv = blue value, defaults to 26 Based (more or less entirely, with changes for readability) on code from http://www.teckis.com/scriptix/thumbnails/teck.html |
public
|
|
public
|
Methods inherited from Object
__call(),
__toString(),
__wakeup(),
addMethodsFrom(),
addStaticVars(),
addWrapperMethod(),
add_extension(),
add_static_var(),
allMethodNames(),
cacheToFile(),
cacheToFileWithArgs(),
clearCache(),
combined_static(),
create(),
createMethod(),
create_from_string(),
defineMethods(),
exists(),
extInstance(),
extend(),
getCustomClass(),
getExtensionInstance(),
getExtensionInstances(),
get_extensions(),
get_static(),
hasExtension(),
hasMethod(),
has_extension(),
invokeWithExtensions(),
is_a(),
loadCache(),
parentClass(),
parse_class_spec(),
remove_extension(),
sanitiseCachename(),
saveCache(),
set_stat(),
set_static(),
set_uninherited(),
stat(),
strong_create(),
uninherited(),
uninherited_static(),
useCustomClass()
Magic methods summary
Properties summary
protected
mixed
|
$gd | |
protected
mixed
|
$width | |
protected
mixed
|
$height | |
protected
mixed
|
$quality | |
protected static
integer
|
$default_quality |