diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-07-31 14:51:37 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-07-31 14:51:37 -0700 |
commit | bb8c83db819a99e34ba45e9c1c31a79e08b7c194 (patch) | |
tree | fc75f74d8f1f9b6c637d0fc6f079e02da34c47ce | |
parent | c4937bb895d294fea4bee40f8ea7dc1ab2727dfb (diff) | |
parent | f034c6c534ad6a07dacc6e64c7e6b43f139c3831 (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3
-rw-r--r-- | modules/gallery/helpers/graphics.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index db9b2ef5..d506a982 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -195,6 +195,8 @@ class graphics_Core { self::init_toolkit(); } + module::event("graphics_resize", $input_file, $output_file, $options); + if (@filesize($input_file) == 0) { throw new Exception("@todo EMPTY_INPUT_FILE"); } @@ -209,6 +211,8 @@ class graphics_Core { ->quality(module::get_var("gallery", "image_quality")) ->save($output_file); } + + module::event("graphics_resize_completed", $input_file, $output_file, $options); } /** @@ -223,10 +227,14 @@ class graphics_Core { 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); } /** @@ -249,6 +257,8 @@ class graphics_Core { self::init_toolkit(); } + module::event("graphics_composite", $input_file, $output_file, $options); + list ($width, $height) = getimagesize($input_file); list ($w_width, $w_height) = getimagesize($options["file"]); @@ -276,6 +286,9 @@ class graphics_Core { ->composite($options["file"], $x, $y, $options["transparency"]) ->quality(module::get_var("gallery", "image_quality")) ->save($output_file); + + + module::event("graphics_composite_completed", $input_file, $output_file, $options); } /** |