diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-05-20 04:04:50 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-05-20 04:04:50 +0000 |
commit | 0536025ff689d05711a40fcd255ee625904bbddb (patch) | |
tree | e78343ab10949683ee3da5457634726772c2d7b3 /core | |
parent | 006e0b4f28750b244bba5ea45d64eb8336cdb63b (diff) |
Add a default image quality level. There's no UI for it, except Admin
> Settings > Advanced. The default is 75.
Diffstat (limited to 'core')
-rw-r--r-- | core/helpers/core_installer.php | 1 | ||||
-rw-r--r-- | core/helpers/graphics.php | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/core/helpers/core_installer.php b/core/helpers/core_installer.php index 3a1e8d25..fc4dc1a6 100644 --- a/core/helpers/core_installer.php +++ b/core/helpers/core_installer.php @@ -216,6 +216,7 @@ class core_installer { module::set_var("core", "thumb_size", 200); module::set_var("core", "resize_size", 640); module::set_var("core", "default_locale", "en_US"); + module::set_var("core", "image_quality", 75); // Add rules for generating our thumbnails and resizes graphics::add_rule( diff --git a/core/helpers/graphics.php b/core/helpers/graphics.php index 7e0c3e5d..b4729532 100644 --- a/core/helpers/graphics.php +++ b/core/helpers/graphics.php @@ -166,6 +166,7 @@ class graphics_Core { } else { Image::factory($input_file) ->resize($options["width"], $options["height"], $options["master"]) + ->quality(module::get_var("core", "image_quality")) ->save($output_file); } } @@ -183,6 +184,7 @@ class graphics_Core { } Image::factory($input_file) + ->quality(module::get_var("core", "image_quality")) ->rotate($options["degrees"]) ->save($output_file); } @@ -232,6 +234,7 @@ class graphics_Core { Image::factory($input_file) ->composite($options["file"], $x, $y, $options["transparency"]) + ->quality(module::get_var("core", "image_quality")) ->save($output_file); } |