aboutsummaryrefslogtreecommitdiffstats
path: root/include/derivative_params.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2012-07-24 20:49:31 +0000
committerrvelices <rv-github@modusoptimus.com>2012-07-24 20:49:31 +0000
commit7502b3bbee558399d1850e1cbdb09ef60fd073de (patch)
tree5e86882581bb2c9893aadd077ef0c23648530a16 /include/derivative_params.inc.php
parent9571cf5e45a53859b160b8604f7df99dd8c103d1 (diff)
bug 2682: Watermark sizing calculation is made on the requested size not on the final one
git-svn-id: http://piwigo.org/svn/trunk@16989 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/derivative_params.inc.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/derivative_params.inc.php b/include/derivative_params.inc.php
index 3128e5fb2..b29255c53 100644
--- a/include/derivative_params.inc.php
+++ b/include/derivative_params.inc.php
@@ -281,5 +281,16 @@ final class DerivativeParams
}
return true;
}
+
+ function will_watermark($out_size)
+ {
+ if ($this->use_watermark)
+ {
+ $min_size = ImageStdParams::get_watermark()->min_size;
+ return $min_size[0]<=$out_size[0]
+ && $min_size[1]<=$$out_size[1];
+ }
+ return false;
+ }
}
?> \ No newline at end of file