summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/graphics.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-08-29 15:20:27 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-08-29 15:20:27 -0700
commit0aceba6f48e5542d3edfbb1f195af50187adbac4 (patch)
tree29d0a14f42ff4bd70be55760dbc23fad63392824 /modules/gallery/helpers/graphics.php
parenta5ddef021c1ca4920e40c0657de082ae0d7008ee (diff)
Fix for ticket #628:
1) increased gallery module version to 11 2) added image_sharpened parameter to the gallery module 3) sharpen all resizes.
Diffstat (limited to 'modules/gallery/helpers/graphics.php')
-rw-r--r--modules/gallery/helpers/graphics.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php
index 7dc46eeb..2892011f 100644
--- a/modules/gallery/helpers/graphics.php
+++ b/modules/gallery/helpers/graphics.php
@@ -206,10 +206,15 @@ class graphics_Core {
// Image would get upscaled; do nothing
copy($input_file, $output_file);
} else {
+ try {
Image::factory($input_file)
->resize($options["width"], $options["height"], $options["master"])
->quality(module::get_var("gallery", "image_quality"))
+ ->sharpen(module::get_var("gallery", "image_sharpen"))
->save($output_file);
+ } catch (Exception $e) {
+ Kohana::log("error", $e->getMessage());
+ }
}
module::event("graphics_resize_completed", $input_file, $output_file, $options);