]> _ Git - cubeextranet.git/commitdiff
#2691
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 6 May 2019 18:29:40 +0000 (18:29 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 6 May 2019 18:29:40 +0000 (18:29 +0000)
inc/ws/Metier/class.ws.document.php
inc/ws/Util/class.ws.pdf.convert.php
inc/ws/Util/html5/master/class.ws.html5.compiler.php

index 7ec94035e95897c2fa01c65b08bcd291da5e3ef8..d694452ee625569c0dd0bfd9631b9a6997236a24 100644 (file)
@@ -429,7 +429,7 @@ class wsDocument extends cubeMetier
 
        public function makeMiniShot($page)
        {
-               $this->makeShotFixedWidth($page, 'p', 100, 90, 4, 'PNM');
+               $this->makeShotFixedWidth($page, 'p', 500, 65, 4, 'PNM');
        }
 
        public function makeShotFixedWidth($page, $prefix = '', $w = 100, $quality = 90, $antialiasing = 4, $method = 'PNM')
index 387c2e2b78bcb3a76d4b6f950e2649e93a90f587..1c22e933c9abf6eadf342f952d271b6e61681e67 100644 (file)
@@ -9,7 +9,7 @@
 class wsPDFConvert {\r
 \r
        public static function makeMiniShot($in, $out, $page) {\r
-               self::makeShotFixedWidth($in, $out, $page, 'p', 100, 90, 4, 'PNM');\r
+               self::makeShotFixedWidth($in, $out, $page, 'p', 500, 65, 4, 'PNM');\r
        }\r
 \r
        public static function makeShotFixedWidth($in, $out, $page, $prefix = '', $w = 100, $quality = 90, $antialiasing = 4, $method = 'PNM') {\r
index 7289ea1cbf524c046c7c4e5e9fc6194b7cf6378c..2bf0fa15441d072b45400963b3ecf93840fc095a 100644 (file)
@@ -1643,47 +1643,47 @@ class wsHTML5Compiler
         }
 
 
-        $this->makeThumbSprites($thumbs);
+        //$this->makeThumbSprites($thumbs);
         $this->log('Made thumbnails');
     }
 
-    public function makeThumbSprites(array $thumbs)
-    {
-        $cols = 10;
-        $rows = 10;
-        $perSprite = $cols * $rows;
-        $k = 0;
-        $res = '';
-        $pages = count($thumbs);
-
-        $hash = '';
-        for ($i = 1; $i <= $pages; $i += $perSprite) {
-            $num = min(1 + $pages - $i, $perSprite);
-            $srows = ceil($num / $cols);
-            $files = array();
-            $mtime = 0;
-            for ($j = 0; $j < $perSprite; $j++) {
-                $p = $i + $j;
-                if ($p > $pages) {
-                    break;
-                }
-                $files[] = $thumbs[$p];
-                $hash .= $thumbs[$p] . '--' . filemtime($thumbs[$p]);
-            }
-
-            $cache = WS_CACHE . '/thumbsprites/' . hash('sha256', $hash) . '.jpg';
-            $dest = 'data/thumbnails/s' . $k . '.jpg';
-            if (!file_exists($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`;
-            }
-            $this->vdir->copy($cache, $dest);
-            $k++;
-        }
-        return $res;
-    }
+//    public function makeThumbSprites(array $thumbs)
+//    {
+//        $cols = 10;
+//        $rows = 10;
+//        $perSprite = $cols * $rows;
+//        $k = 0;
+//        $res = '';
+//        $pages = count($thumbs);
+//
+//        $hash = '';
+//        for ($i = 1; $i <= $pages; $i += $perSprite) {
+//            $num = min(1 + $pages - $i, $perSprite);
+//            $srows = ceil($num / $cols);
+//            $files = array();
+//            $mtime = 0;
+//            for ($j = 0; $j < $perSprite; $j++) {
+//                $p = $i + $j;
+//                if ($p > $pages) {
+//                    break;
+//                }
+//                $files[] = $thumbs[$p];
+//                $hash .= $thumbs[$p] . '--' . filemtime($thumbs[$p]);
+//            }
+//
+//            $cache = WS_CACHE . '/thumbsprites/' . hash('sha256', $hash) . '.jpg';
+//            $dest = 'data/thumbnails/s' . $k . '.jpg';
+//            if (!file_exists($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`;
+//            }
+//            $this->vdir->copy($cache, $dest);
+//            $k++;
+//        }
+//        return $res;
+//    }
 
     protected function _makeCover($orig)
     {