aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/derivative_params.inc.php3
-rw-r--r--include/derivative_std_params.inc.php4
2 files changed, 5 insertions, 2 deletions
diff --git a/include/derivative_params.inc.php b/include/derivative_params.inc.php
index dc375da2c..3128e5fb2 100644
--- a/include/derivative_params.inc.php
+++ b/include/derivative_params.inc.php
@@ -240,7 +240,6 @@ final class DerivativeParams
public $use_watermark = false;
public $sizing;
public $sharpen = 0;
- public $quality = 95;
function __construct($sizing)
{
@@ -249,7 +248,7 @@ final class DerivativeParams
public function __sleep()
{
- return array('last_mod_time', 'sizing', 'sharpen', 'quality');
+ return array('last_mod_time', 'sizing', 'sharpen');
}
function add_url_tokens(&$tokens)
diff --git a/include/derivative_std_params.inc.php b/include/derivative_std_params.inc.php
index 45c45c2c6..e12c1eaaa 100644
--- a/include/derivative_std_params.inc.php
+++ b/include/derivative_std_params.inc.php
@@ -51,6 +51,7 @@ final class ImageStdParams
private static $undefined_type_map = array();
private static $watermark;
public static $custom = array();
+ public static $quality=95;
static function get_all_types()
{
@@ -109,11 +110,13 @@ final class ImageStdParams
if (!self::$watermark) self::$watermark = new WatermarkParams();
self::$custom = @$arr['c'];
if (!self::$custom) self::$custom = array();
+ if (isset($arr['q'])) self::$quality = $arr['q'];
}
else
{
self::$watermark = new WatermarkParams();
self::$type_map = self::get_default_sizes();
+ self::save();
}
self::build_maps();
}
@@ -136,6 +139,7 @@ final class ImageStdParams
$ser = serialize( array(
'd' => self::$type_map,
+ 'q' => self::$quality,
'w' => self::$watermark,
'c' => self::$custom,
) );