From 4133bcf1b4cf80ef3e3b501783c8d90484502abb Mon Sep 17 00:00:00 2001 From: Guilliam Xavier Date: Thu, 10 Dec 2020 23:46:56 +0100 Subject: [PATCH] Fix pixelsToPoints conversion (for HTML col width) (#1733) --- src/PhpSpreadsheet/Shared/Drawing.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PhpSpreadsheet/Shared/Drawing.php b/src/PhpSpreadsheet/Shared/Drawing.php index 25d6910d..4ff89595 100644 --- a/src/PhpSpreadsheet/Shared/Drawing.php +++ b/src/PhpSpreadsheet/Shared/Drawing.php @@ -98,7 +98,7 @@ class Drawing */ public static function pixelsToPoints($pValue) { - return $pValue * 0.67777777; + return $pValue * 0.75; } /** @@ -111,7 +111,7 @@ class Drawing public static function pointsToPixels($pValue) { if ($pValue != 0) { - return (int) ceil($pValue * 1.333333333); + return (int) ceil($pValue / 0.75); } return 0;