[Libreoffice-bugs] [Bug 52598] Writer ignores original picture pixel density in .jpg files, and uses 120 dpi (refer comment 19)

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Oct 13 13:03:14 UTC 2017


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

--- Comment #26 from Dirk Munk <munk at home.nl> ---
The problem is really very simple. JPEG file headers contain information about
the size of the picture, measured in pixels. They also contain information
about the dpi setting. The dpi setting is used to calculate the desired picture
size in cm or inch, it doesn't do anything else. A high dpi setting will result
in a small high resolution picture, a low dpi setting in a large low resolution
picture. The dpi setting has nothing to do with the actual contents of the
picture, so changing the dpi setting doesn't do anything with this contents. It
is very important to keep this in mind.

The problem is that LibreOffice doesn't understand the JPEG headers of at least
Photoshop elements. It will not read the dpi setting, instead Libreoffice will
use the dpi setting of the display. So a JPEG photo that is intended to be 10cm
x 10cm with 300 dpi, will become 31.25cm x 31.25cm in Writer, because I have a
96dpi display. (300/96 x 10 = 31.25)

Libreoffice does understand the JPEG headers of (for instance) Microsoft Paint.
If I open a JPEG picture made by Photoshop Elements in Paint, and immediately
save it again, that picture will be opened correctly by Libreoffice. However,
Paint uses a lower quality compression setting, so the actual contents is
changed. Mind you, not the size in pixels, or the dpi setting!!

It is indeed a serious problem, because it prevents people from making high
quality documents, high quality meaning high resolution images for printing
etc. It can't be very difficult to solve I guess, it just needs someone who
knows about these headers, and can find a fool-proof way to handle them

-- 
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/20171013/9d1996ab/attachment.html>


More information about the Libreoffice-bugs mailing list