Skip to content

Commit 4133bcf

Browse files
Fix pixelsToPoints conversion (for HTML col width) (#1733)
1 parent 2307df5 commit 4133bcf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PhpSpreadsheet/Shared/Drawing.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public static function cellDimensionToPixels($pValue, \PhpOffice\PhpSpreadsheet\
9898
*/
9999
public static function pixelsToPoints($pValue)
100100
{
101-
return $pValue * 0.67777777;
101+
return $pValue * 0.75;
102102
}
103103

104104
/**
@@ -111,7 +111,7 @@ public static function pixelsToPoints($pValue)
111111
public static function pointsToPixels($pValue)
112112
{
113113
if ($pValue != 0) {
114-
return (int) ceil($pValue * 1.333333333);
114+
return (int) ceil($pValue / 0.75);
115115
}
116116

117117
return 0;

0 commit comments

Comments
 (0)