aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/include/image.class.php2
-rw-r--r--i.php2
-rw-r--r--include/derivative_params.inc.php4
-rw-r--r--include/page_tail.php2
-rw-r--r--themes/smartpocket/template/header.tpl1
5 files changed, 6 insertions, 5 deletions
diff --git a/admin/include/image.class.php b/admin/include/image.class.php
index 2781ba984..1d1b70383 100644
--- a/admin/include/image.class.php
+++ b/admin/include/image.class.php
@@ -458,6 +458,8 @@ class image_imagick implements imageInterface
function write($destination_filepath)
{
+ // use 4:2:2 chroma subsampling (reduce file size by 20-30% with "almost" no human perception)
+ $this->image->setSamplingFactors( array(2,1) );
return $this->image->writeImage($destination_filepath);
}
}
diff --git a/i.php b/i.php
index 9b2494649..e3313cd78 100644
--- a/i.php
+++ b/i.php
@@ -519,7 +519,7 @@ if (!$changes)
ierror( $page['src_url'], 301);
}
-if ($d_size[0]*$d_size[1] < 100000)
+if ($d_size[0]*$d_size[1] < 256000)
{// strip metadata for small images
$image->strip();
}
diff --git a/include/derivative_params.inc.php b/include/derivative_params.inc.php
index dc19d1df7..b0090cafa 100644
--- a/include/derivative_params.inc.php
+++ b/include/derivative_params.inc.php
@@ -209,11 +209,11 @@ final class SizingParams
if ($ratio_w > $ratio_h)
{
$scale_size[0] = $this->ideal_size[0];
- $scale_size[1] = floor($scale_size[1] / $ratio_w);
+ $scale_size[1] = floor(1e-6 + $scale_size[1] / $ratio_w);
}
else
{
- $scale_size[0] = floor($scale_size[0] / $ratio_h);
+ $scale_size[0] = floor(1e-6 + $scale_size[0] / $ratio_h);
$scale_size[1] = $this->ideal_size[1];
}
}
diff --git a/include/page_tail.php b/include/page_tail.php
index 14c6391fb..a24176da5 100644
--- a/include/page_tail.php
+++ b/include/page_tail.php
@@ -66,7 +66,7 @@ if ($conf['show_gt'])
$template->assign('debug', $debug_vars );
//------------------------------------------------------------- mobile version
-if (get_device() != 'desktop')
+if ( !empty($conf['mobile_theme']) && get_device() != 'desktop')
{
$template->assign('TOGGLE_MOBILE_THEME_URL',
add_url_params(
diff --git a/themes/smartpocket/template/header.tpl b/themes/smartpocket/template/header.tpl
index d15821a19..2723ad29e 100644
--- a/themes/smartpocket/template/header.tpl
+++ b/themes/smartpocket/template/header.tpl
@@ -22,7 +22,6 @@
{if (isset($REVERSE) and $REVERSE and $PAGE_TITLE == l10n('Home'))}
<title>{$GALLERY_TITLE} | {$PAGE_TITLE}</title>{else}
<title>{$PAGE_TITLE} | {$GALLERY_TITLE}</title>{/if}
-<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}{$themeconf.icon_dir}/favicon.ico">
<link rel="start" title="{'Home'|@translate}" href="{$U_HOME}" >
{get_combined_css}