array discoverGdVersion(
[
$gd = null]
)
|
|
Find out which version of GD is compiled in this PHP-environment
This is ugly, but the only way that works on any PHP version. The idea is from Justin Greer's manual comments for imageCreateTruecolor at php.net. This really doesn't get the correct GD version if it is an external library, since they are defined in the PHP code and just refer to the functionality that is supported. So if one sees "1.6.2 or higher", it can be as high as 1.8.2, depending on the PHP version and which functionality they test for.
Parameters:
API Tags:
| Return: | GalleryStatus string the GD version number or '0' if there is no GD support Prefixed with '>' if PHP says "or higher" |
array discoverMimeTypes(
[
$gd = null]
)
|
|
Find out which mime types are supported on this GD.
Parameters:
API Tags:
| Return: | GalleryStatus array supported mime-types |
Factory to get a new GdFunctionality object.
GalleryStatus getOperationsAndProperties(
[object a
$gd = null]
)
|
|
Figure out what operations and properties are supported by the image* functions in the PHP installation and return them.
Parameters:
|
object a |
$gd: |
GdFunctionality-object to work with |
API Tags:
| Return: | a status code array('operations' => ... 'properties' => ...) |
boolean hasImageCreateTrueColor(
[
$gd = null]
)
|
|
Tries to find out if we can imageCreateTrueColor()
This function is always defined, but will fail with a Fatal PHP error on GD < 2.0.1. There are a lot of PHP installations compiled with external GD libraries where phpinfo informs "2.0 or higher", so we can't really know which version we have. Currently we will just consider any "2.0" to be "< 2.0.1", since I have never seen a 2.0 release that doesn't support the imageCreateTrueColor().
Parameters:
array isBundled(
[
$gd = null]
)
|
|
Find out if this GD library is the one bundled with the PHP source.
The bundled library provides some functionality that is currently not available on the standard GD library. Those are tested here.
Parameters:
API Tags:
| Return: | GalleryStatus boolean true if it is the bundled library, false otherwise |
array isGdVersionSupported(
[string
$gdVersion = null], [
$gd = null]
)
|
|
See if this GD version is supported by this module. Currently GD >= 2.0 is supported.
Parameters:
|
string |
$gdVersion: |
A gd version string or empty to check the current version |
|
|
$gd: |
|
API Tags:
| Return: | GalleryStatus boolean true if supported, false otherwise |
boolean isOperationSupported(
$operation, [
$gd = null]
)
|
|
Checks if a certain operation is supported by this GD library
Parameters:
The minimal version of GD that this module supports
API Tags: