summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/gallery_graphics.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-10-06 12:58:53 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-10-06 18:30:08 -0700
commitb35051ff6f14dd591d5aee0beed3aec14f3e5eac (patch)
treec5ae3ee9d2335100290153899495b0e6ec0e02c5 /modules/gallery/helpers/gallery_graphics.php
parentc0683845048a0610316b5f3aaa9111793273f420 (diff)
Move the graphics::rotate to gallery_graphics::rotate to be consistent with the other gallery graphics functions.
Diffstat (limited to 'modules/gallery/helpers/gallery_graphics.php')
-rw-r--r--modules/gallery/helpers/gallery_graphics.php20
1 files changed, 20 insertions, 0 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.
*