Bug 115808 - Impress displays images differently on different machines (screen resolutions?)
Summary: Impress displays images differently on different machines (screen resolutions?)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
(earliest affected) release
Hardware: All All
: medium major
Assignee: Not Assigned
: 116164 (view as bug list)
Depends on:
Blocks: Impress-Images Image-DPI
  Show dependency treegraph
Reported: 2018-02-17 16:03 UTC by Eric M
Modified: 2021-12-04 04:42 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:

before forcing redraw of the slides in slide sorter (988.78 KB, image/png)
2018-03-07 17:40 UTC, Eric M
after forcing redraw of the slides (1.02 MB, image/png)
2018-03-07 17:41 UTC, Eric M

Note You need to log in before you can comment on or make changes to this bug.
Description Eric M 2018-02-17 16:03:19 UTC
When inserting and cropping images (they don't always have to be cropped for this to happen) in a presentation on one machine and then opening the same .odp file on another machine with the exact same Linux OS and exact same version of LO, the figures appear mangled. Not every single figure is affected this way, but usually a number of them are. In some cases it is both in the 'slide sorter' view and also in the 'normal view' of the slide. The 'slide sorter' thumbnails get redrawn after working with the presentation and is merely annoying. When the problem affects the slide in 'normal view' it's a deal breaker of a problem.

This has been a long standing issue (many many years through StarOffice, OpenOffice, Apache OpenOffice, and now LibreOffice). I have posted bug reports before on this, but the problem persists and makes Impress extremely painful to use.

The post here on the Apache OO forum may be the underlying issue, but I don't know because I don't know how LO Impress deals with inserted figures, or figures from other slides that are 'imported' and so on.


I try to always crop images outside of Impress and only import them after, but this doesn't solve the problem. I have generally noticed that if I import slides from .ppt or .pptx that the images import correctly in the LO Impress session, but as soon as I save as .odp and reopen, either on a different machine or the same machine, the images will be distorted. 

I have a lot of general questions:

1. How does Impress read image data on an import of say .jpg or .png?
2. How does Impress save this data in the .odp file?
3. How does Impress read image data on an imported SLIDE from another Impress presentation?
4. How does Impress read image data on an imported SLIDE from a .ppt or .pptx presentation?
5. Is the screen resolution ever taken into account when doing any of the above?

This issue is a show stopper for me and it really makes Impress unusable for scientific presentations where there are multiple figures on every slide. If I understand the answers to some of the questions above I may be able to provide much better bug reports.

Finally, can I work directly with one of the developers who knows the internals to help debug this issue?

Comment 1 Eric M 2018-02-17 22:32:08 UTC
The following steps *might* mitigate the problem, but are certainly not ideal.

1. For an existing image in a presentation, right click on an image and select "Compress". Then **deselect** "Reduce image resolution". Then select "OK".

2. Crop as needed. Then do all of (1) again.

3. When importing new images, follow the steps in (1), crop as needed, and again do (1).

Finally, even if one follows the steps above and the images display correctly on the slide view, they are still typically mucked up on the 'slide sorter' view. The slide thumbnails are redrawn at some point in working with a presentation and then look fine, but the redrawn thumbnails are lost on closing the .odp.

The resolution to these two problems seems like it might be relatively quick for a developer who knows the code.

A. Why not, when importing new images just go through the compression steps listed above?  Whatever that does internally in the .odp appears to work in most cases.

B. To solve the 'slide sorter' view problem, why not just redraw all the thumbnails whenever a presentation is opened?
Comment 2 Eric M 2018-02-19 00:26:20 UTC
One last comment is that if an .odp presentation with mangled *slide sorter* images is saved in .ppt format, and opened again with LibreOffice, the slide sorter view of the .ppt slides is fine, the thumbnails are sharp and the images are not mangled. For this to work the slides have to be OK in the normal slide view, fixed by the methods in my comment 1.
Comment 3 Eric M 2018-02-19 15:25:48 UTC
Here is a macro that forces LO to redraw the slide thumbnails. This is poorly written, and simply loops through the slides and will copy, paste, and delete each one. I don't what call I need to just force a redraw of the thumbnail, but this works. For some reason this only works if you are in the 'slide sorter' view.

REM  *****  BASIC  *****
REM  * You must be in 'slide sorter' view for this to work!!

Sub refresh

msg = "Starting refresh..."

oDoc = ThisComponent
oSlideList = oDoc.getDrawPages()

REM loop through all slides and copy, paste, delete each one

For i = 0 to oDoc.getDrawPages().Count-1

oSlide = oSlideList.getByIndex(i)
REM msg = msg & "get slide : " & i

oController = oDoc.CurrentController
REM oCurrentPage = oController.CurrentPage
oDispatch = createUnoService( "com.sun.star.frame.DispatchHelper")
oProvider = oController.Frame
oDispatch.executeDispatch(oProvider, ".uno:Copy","", 0, Array())
oDispatch.executeDispatch(oProvider, ".uno:Paste", "", 0, Array())
oDispatch.executeDispatch(oProvider, ".uno:Delete","", 0, Array())

Next i

REM msgbox msg

End Sub
Comment 4 Buovjaga 2018-03-07 16:15:29 UTC
Could you attach a screenshot of the mangled state?
You said "I have posted bug reports before on this" - could you provide links to these reports?

There is currently ongoing work regarding the handling of bitmaps. You might want to test a daily build.
Comment 5 Eric M 2018-03-07 17:40:16 UTC
Created attachment 140451 [details]
before forcing redraw of the slides in slide sorter

I have attached two png files. first.png shows the slides in slide sorter as opened from a .odp file. After I run the macro above to force it to redraw the slides, it becomes the after.png.
Comment 6 Eric M 2018-03-07 17:41:02 UTC
Created attachment 140452 [details]
after forcing redraw of the slides
Comment 7 Eric M 2018-03-07 17:44:56 UTC
My previous bug reports 108879 and 111340 were related to this bug, but those are largely solved by following the steps I outline here.
Comment 8 Buovjaga 2018-03-08 10:40:05 UTC
*** Bug 116164 has been marked as a duplicate of this bug. ***
Comment 9 Buovjaga 2018-03-08 10:40:45 UTC
NEW per dupe
Comment 10 QA Administrators 2019-08-19 07:00:18 UTC Comment hidden (obsolete)
Comment 11 QA Administrators 2021-12-04 04:42:10 UTC
Dear Eric M,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team