From: Martin Mares Date: Sat, 29 Dec 2012 16:59:32 +0000 (+0100) Subject: Gallery2: Rounding in gal-cache X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=1f1ea5704ea1a24c7c040950a563b5cf697db8a8;p=gallery.git Gallery2: Rounding in gal-cache --- diff --git a/gal2/bin/gal-cache b/gal2/bin/gal-cache index 2039d1b..f53437d 100755 --- a/gal2/bin/gal-cache +++ b/gal2/bin/gal-cache @@ -69,8 +69,8 @@ for my $thumb_fmt (keys %{$gal->get('ThumbFormats')}) { $w = $w * $s; $h = $h * $s; } - $w = int($w); - $h = int($h); + $w = int($w + .5); + $h = int($h + .5); print "${w}x${h} "; $p->Resize(width=>$w, height=>$h);