aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorflop25 <flop25@piwigo.org>2012-07-08 17:15:40 +0000
committerflop25 <flop25@piwigo.org>2012-07-08 17:15:40 +0000
commitd3f5ed2c2d4f4521f3ac0d4dd383eff9047bf3cb (patch)
treeeb7ba9d03e8a163aab4880a68d6ade21d417d11d /include
parentfa373d27caf31a0d8c352c6c575646dfdf16ea4e (diff)
bug:2683
create get_size_css git-svn-id: http://piwigo.org/svn/branches/2.4@16507 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r--include/derivative.inc.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/derivative.inc.php b/include/derivative.inc.php
index a3b944e72..d19b5a1b8 100644
--- a/include/derivative.inc.php
+++ b/include/derivative.inc.php
@@ -314,6 +314,15 @@ final class DerivativeImage
return $this->params->compute_final_size($this->src_image->get_size());
}
+ function get_size_css()
+ {
+ $size = $this->get_size();
+ if ($size)
+ {
+ return 'width:'.$size[0].'px; height:'.$size[1].'px';
+ }
+ }
+
function get_size_htm()
{
$size = $this->get_size();