https://bugs.documentfoundation.org/show_bug.cgi?id=144167

--- Comment #17 from Valerio Messina <e...@iol.it> ---
I made some tests with a just installed

Version: 7.4.0.0.alpha1+ / LibreOffice Community
Build ID: fd45045cc3029b41c02a2634e6fe2e5456f716ad
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk3
Locale: it-IT (it_IT.UTF-8); UI: en-US
Calc: threaded

on Debian 11/x86_64


On first run, LO is configured with this export settings default:
1) Dimensions unit: cm
2) Resolution: 37 pixel/cm
3) Compression: 6

I changed to:
1) Dimensions unit: mm
2) Resolution: 96 pixel/inch
3) Compression: 9


Then perform some extractions with:
. Modify resolution: 300 pixels/inch
. Modify dimensions, Width: 320 mm
. the Height is set by LO to 220.03 mm and width to 320.03 mm

Results:
- The output aspect ratio is the one of page, and not the one of the rectangle
- the output images is sized: 3786x2603 px, that at 300 dpi, has a size of
320.55x220.39 mm
- LO7.4 export to PNG the rectangle without the 10 mm page border (like LO7.2)
  and in contrast to export as PDF (but may be reasonable)

So the 300x200 mm source rectangle is stretched to 320.55x220.39 mm in exported
PNG
This is out of scale of about 320/300=1.06 periodic,
and worse the image is still with the wrong aspect ratio like was with LO7.2
This is still wrong but better than LO7.2


As the 10mm border is always omitted in exported PNG, I repeated the tests
with:
. Modify resolution: 300 pixels/inch
. Modify dimensions, Width: 300 mm
. the Height is set by LO to 206.26 mm while width remain to 300.00 mm

Results:
- The output aspect ratio is the one of page, and not the one of the rectangle
- the output images is sized: 3549x2440 px, that at 300 dpi, has a size of
300.48x206.59 mm

So the 300x200 mm source rectangle is stretched to 300.48x206.59 mm in exported
PNG
this is out of scale of about 300.48/300=1.0016  on X asis, 0.5 mm error maybe
acceptable, but
this is out of scale of about 206.59/200=1.03295 on Y asis, 6.59 mm error this
is wrong.
So the image is still with the wrong aspect ratio:
original rectangle has 300/200=1.5 aspect ratio
exported rectangle has 300.48/206.59=1.454475 aspect ratio


Note 1: LO should export the drawing area (the 300x200 mm rectangle) keeping
his aspect ratio,
and not use the one of the page (that include the 10 mm border).

Note 2: There are various approximation in LO compute for output pixels, that
round the numbers in the wrong way too.
Maybe caused by the use of a float instead of a double in some variables.

Note 3: I cannot test on Win, as the only PC with Win I had access, is the
company PC, but I cannot install an Alpha level application on it

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to