summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/init.php b/init.php
index 1c037bd..cb0a914 100644
--- a/init.php
+++ b/init.php
@@ -118,13 +118,14 @@ class Api_Resize_Media extends Plugin {
$flag_filename = sha1($url) . ".flag";
$resized_filename = sha1($url) . "-$width";
+ $quality = $this->host->profile_get($this, "quality", self::DEFAULT_QUALITY);
+
if (!$this->cache->exists($flag_filename) || $width <= 0) {
header("Location: $url");
return;
}
- if ($width > self::MAX_WIDTH)
- $width = self::MAX_WIDTH;
+ if ($width > self::MAX_WIDTH) $width = self::MAX_WIDTH;
if ($this->cache->exists($local_filename)) {
@@ -138,7 +139,8 @@ class Api_Resize_Media extends Plugin {
$width,
$width,
$this->cache->get_mime_type($local_filename),
- $force_stamp);
+ $force_stamp,
+ $quality);
if ($this->cache->exists($resized_filename)) {
header("Location: " . $this->cache->get_url($resized_filename));
@@ -165,7 +167,8 @@ class Api_Resize_Media extends Plugin {
$width,
$width,
$this->cache->get_mime_type($local_filename),
- $force_stamp);
+ $force_stamp,
+ $quality);
if ($this->cache->exists($resized_filename)) {
header("Location: " . $this->cache->get_url($resized_filename));
@@ -371,7 +374,7 @@ class Api_Resize_Media extends Plugin {
if ($args != "prefFeeds") return;
$force_width = (int) $this->host->profile_get($this, "force_width", 0);
- $quality = (int) $this->host->profile_get($this, "force_width", self::DEFAULT_QUALITY);
+ $quality = (int) $this->host->profile_get($this, "quality", self::DEFAULT_QUALITY);
?>
<div dojoType='dijit.layout.AccordionPane'