]> _ Git - cubeextranet.git/commitdiff
#1445 @1
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 13 Jun 2017 16:25:05 +0000 (16:25 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 13 Jun 2017 16:25:05 +0000 (16:25 +0000)
inc/ws/Util/html5/slider/class.ws.html5.compiler.php

index 068b0877e87ebe4aad951aafc61600de1053da1e..14dc81df36364f51e1aad7fe700dfc373128a74f 100644 (file)
@@ -1123,10 +1123,12 @@ class wsHTML5Compiler {
                        $cache = WS_CACHE . '/thumbsprites/' . hash('sha256', $hash) . '.jpg';
                        $dest = $this->vdir . '/data/thumbnails/s' . $k . '.jpg';
                        if (!file_exists($cache)) {
-                               $cmd = 'montage ' . implode(' ', $files) . ' -geometry 100x+0+0 -background transparent -tile ' . $cols . 'x' . $srows . ' ' . $cache;
+                               $ratio = $this->width / $this->height;
+                               $thumbh = round(100 / $ratio);
+                               $cmd = 'montage ' . implode(' ', $files) . ' -geometry 100x' . $thumbh . '!+0+0 -background transparent -tile ' . $cols . 'x' . $srows . ' ' . $cache;
+                               $res .= `$cmd`;
                        }
                        copy($cache, $dest);
-                       $res .= `$cmd`;
                        $k++;
                }
                return $res;