]> mj.ucw.cz Git - gallery.git/commitdiff
Gallery2: Rounding in gal-cache
authorMartin Mares <mj@ucw.cz>
Sat, 29 Dec 2012 16:59:32 +0000 (17:59 +0100)
committerMartin Mares <mj@ucw.cz>
Sun, 8 Feb 2015 20:14:16 +0000 (21:14 +0100)
gal2/bin/gal-cache

index 2039d1b0029373e6ebae5640c7847eaed702a1d9..f53437de22c64c553176d471dd4e0d0c324dd769 100755 (executable)
@@ -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);