0

The following is the sreenshot from a test document with a png image inserted into it:

enter image description here

And here is the same image opened in the Windows Photo Viewer (the default program to view images on Windows 7):

enter image description here

As you may see, the first image is in fact somewhat blurry, and the second image, which is opened in Windows Photo Viewer, is perfectly fine.

Side-by-side version, just in case:

enter image description here

Does anybody know why the image in Writer is blurry?

Things to take into account:

  • There is no difference whether the image is inserted in the document as embed or as a linked file.
  • The image is in the PNG format (and its MIME type is correct, that is, this is really PNG, not a JPG with "png" filename extension). PNG images doesn't have PPI1, as far as I know. Also, when PPI is wrong, the image is displayed as larger/smaller than it is. But as you can see on the side-by-side version, their sizes seem to be the same. So the blur seems to have no relation to PPI.

1 PPI is often wrongly called "DPI".

I use LO 7.2.4.1 on Windows 7.

2
  • 1
    PNG files do have a "physical size" in pixels per centimeter stored in the pHYs chunk. Commented Jan 2, 2022 at 23:15
  • The size is probably off by one pixel. But what problem are you trying to solve? You are in a word processor. Whatever you create in there will probably be either printed or viewed at different zoom levels on different screens.
    – Daniel B
    Commented Jan 3, 2022 at 0:46

1 Answer 1

1

First, PNG file format does have DPI embedded (DPI nomenclature is Microsoft's and industry standard, despite any issue you have with "dots" vs. "pixels").

You can determine the DPI from the file information using a free tool, such as IrfanView, which also enables you to alter that information.

PNG Information DPI

Try the following:

  • Open the file in IrfanView.
  • Press letter I to view Image properties
  • Change the default 72 x 72 DPI to improve it, perhaps to 300 x 300 DPI.
  • Click the Change and then the OK buttons.
  • Save the PNG image.
  • Now try importing it into the LibreOffice suite -- Writer, Impress, or other application.

However, there may be a bug in LibreOffice concerning reading the embedded DPI from PNG images. If that is the case (though I have not observed that issue in my use of Writer), there are some things to try:

  • Use IrfanView to change the PNG image to JPEG format, and set the DPI before saving the JPEG file.
  • Alternatively, right-click on the image in Writer.
  • Select Compress....
  • Increase the resolution of the image.

Image compression

Please let me know if any of these help create sharper images, and I'll edit the question to show what works for you.

5
  • Thanks for a very detailed answer. The image DPI, according to IrfanView, is 96, which is the default Windows DPI. If I change it to 72, the image is inserted as large and is even blurrier than it is currently, and if I change DPI to 300, the image is inserted as very small. Both results were, in fact, expected, because Windows DPI is 96. If a simply convert the file to JPG before inserting it in Writer, it stay sharp. However, as you understand, converting from lossless to lossy format is not really a perfect solution. Of course, I have upvoted your answer.
    – user90726
    Commented Jan 3, 2022 at 1:24
  • 1
    Thanks., @jsv, both for reporting back and the vote. As for JPEG being lossy, that is adjustable in IrfanView. Set the Save Quality to 100%, which produces a larger output file with far less compression. Commented Jan 3, 2022 at 1:29
  • What is strange that I can reproduce this visual bug by making one another screenshot from Jan Tschichold's book and inserting it in Writer, but I cannot reproduce it by inserting image of 11 pt or 10 pt italic Times New Roman. So it seems the letters in the original image have such an appearance that Writer simply cannot handle them properly -- if and only if the image is png and not jpg. Weird... But now we know that it seems there are no problems in hadling png's PPI. All the images were created the same way.
    – user90726
    Commented Jan 3, 2022 at 2:01
  • I have opened a bug: bugs.documentfoundation.org/show_bug.cgi?id=146533
    – user90726
    Commented Jan 3, 2022 at 2:20
  • 1
    Note: PPI/DPI is a hint to pagination software as to how large an image should appear compared to the page size. Changing the value changes nothing except that paginated size. it does not, in any way, change the mount of detail in the image [the number of pixels remains exactly the same] - unless you actually rescale as part of the process. I can see in this case it may actually be a bug in your software, but this method is not going to 'fix' it in & of itself.
    – Tetsujin
    Commented Jan 3, 2022 at 8:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .