summaryrefslogtreecommitdiff
path: root/core/helpers/graphics.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/helpers/graphics.php')
-rw-r--r--core/helpers/graphics.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/helpers/graphics.php b/core/helpers/graphics.php
index 53cf01db..d36a2421 100644
--- a/core/helpers/graphics.php
+++ b/core/helpers/graphics.php
@@ -304,4 +304,19 @@ class graphics_Core {
self::$init = 1;
}
+
+ /**
+ * Verify that a specific graphics function is available with the active toolkit.
+ * @param string $function the function name (eg rotate, resize)
+ * @return boolean
+ */
+ function can($function) {
+ if (module::get_var("core", "graphics_toolkit") == "gd" &&
+ $function == "rotate" &&
+ !function_exists("imagerotate")) {
+ return false;
+ }
+
+ return true;
+ }
}