summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r--modules/gallery/helpers/gallery_graphics.php20
-rw-r--r--modules/gallery/helpers/graphics.php22
2 files changed, 20 insertions, 22 deletions
diff --git a/modules/gallery/helpers/gallery_graphics.php b/modules/gallery/helpers/gallery_graphics.php
index bdd600c5..c24d2bde 100644
--- a/modules/gallery/helpers/gallery_graphics.php
+++ b/modules/gallery/helpers/gallery_graphics.php
@@ -19,6 +19,26 @@
*/
class gallery_graphics_Core {
/**
+ * Rotate an image. Valid options are degrees
+ *
+ * @param string $input_file
+ * @param string $output_file
+ * @param array $options
+ */
+ static function rotate($input_file, $output_file, $options) {
+ graphics::init_toolkit();
+
+ module::event("graphics_rotate", $input_file, $output_file, $options);
+
+ Image::factory($input_file)
+ ->quality(module::get_var("gallery", "image_quality"))
+ ->rotate($options["degrees"])
+ ->save($output_file);
+
+ module::event("graphics_rotate_completed", $input_file, $output_file, $options);
+ }
+
+ /**
* Resize an image. Valid options are width, height and master. Master is one of the Image
* master dimension constants.
*
diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php
index ecddd86b..1063c073 100644
--- a/modules/gallery/helpers/graphics.php
+++ b/modules/gallery/helpers/graphics.php
@@ -193,28 +193,6 @@ class graphics_Core {
}
/**
- * Rotate an image. Valid options are degrees
- *
- * @param string $input_file
- * @param string $output_file
- * @param array $options
- */
- static function rotate($input_file, $output_file, $options) {
- if (!self::$init) {
- self::init_toolkit();
- }
-
- module::event("graphics_rotate", $input_file, $output_file, $options);
-
- Image::factory($input_file)
- ->quality(module::get_var("gallery", "image_quality"))
- ->rotate($options["degrees"])
- ->save($output_file);
-
- module::event("graphics_rotate_completed", $input_file, $output_file, $options);
- }
-
- /**
* Return a query result that locates all items with dirty images.
* @return Database_Result Query result
*/