[Libreoffice-bugs] [Bug 144279] Exporting a selected shape of 7x7 to any image format shows size of 7, 01 cm when changing DPI to Dots per CM & increase it from 37 to 38 and back, size becomes 7, 16 cm

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Sep 3 11:56:08 UTC 2021


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

--- Comment #7 from Mike Kaganski <mikekaganski at hotmail.com> ---
(In reply to Telesto from comment #6)
> why there is the variation.. 
> * 7,01 cm on dialog initialization. And 6,98 cm after bumping DPI to 97 and
> back to 96. If this is a rounding should end up this way, please make it
> consistent.

This is reasonable. Please limit it to this.

> * And even worse in case of switching from DPI to Pixel to CM. Where moving
> 37 Pixel the CM up to 38 and back to 37 end up with 7,16 CM not 7,01 cm

No it is fine.

If you look above, I wrote:

> You define a resolution:
> > Note: assuming DPI 96
> 
> which means that each pixel is exactly 1/96 in ~ 0.264583 mm.

You see that 96 pixels per inch doesn't mean some "round" number of pixels per
cm: 96 PPI = 37.7952755905512... pixels per cm. When you switch from in to cm
in the resolution, the control shows a rounded (down) value, but internally the
resolution is still exactly 96 PPI - which is *correct*, because user might
need just to check some different units without actually change the resolution.
However, when user starts to *modify* the resolution using the new units, the
new value is the integral number of pixels per unit - and when you select 37
again, it is true 37 pixels per cm, not the initial 37.7952755905512... which
you started with. Hence the difference in the size - which is again OK.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210903/4283e097/attachment.htm>


More information about the Libreoffice-bugs mailing list