From ea75c4ee871f457c5366e45565828bca570313a2 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Thu, 2 Dec 2021 13:07:56 +0000 Subject: [PATCH] wait #4938 @4 --- inc/ws/Controlleur/class.ws.flash.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/inc/ws/Controlleur/class.ws.flash.php b/inc/ws/Controlleur/class.ws.flash.php index 37870d044..977345bad 100644 --- a/inc/ws/Controlleur/class.ws.flash.php +++ b/inc/ws/Controlleur/class.ws.flash.php @@ -375,7 +375,7 @@ class wsFlash extends cubeFlashGateway $defaultNum = array(); foreach ($pages as $page => $info) { //$book->getFile($page, 'swf', 150); - $book->getFile($page, 'jpg', 150,true,true,'html'); + $book->getFile($page, 'jpg', 150, true, true, 'html'); $file = WS_DOCS . '/' . $info['document_id'] . '/p' . $info['document_page'] . '.jpg'; if (!file_exists($file)) { $info['resolution'] = 150; @@ -619,10 +619,12 @@ class wsFlash extends cubeFlashGateway $doc = $docs[$page['document_id']]; - $pagesFiles[$p] = $doc->getFile($page['document_page'], 'jpg', 150, true, true, 'html'); + $f = $doc->getFile($page['document_page'], 'jpg', 150, true, true, 'html'); + $size = $doc->generalInfos['page'][$page['document_page']]['size']; + $pagesFiles[$p] = ['file' => $f, 'width' => $size[0], 'height' => $size[1], 'ratio' => $size[0] / $size[1]]; if ($p == 1) { - $size = $doc->generalInfos['page'][$page['document_page']]['size']; + $maxWidth = max($size[0], $maxWidth); $maxHeight = max($size[1], $maxHeight); } -- 2.39.5