Bug 112538 - Cropped image created by MAC Impress cannot display correctly in the Windows Impress
Summary: Cropped image created by MAC Impress cannot display correctly in the Windows ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
5.4.1.2 release
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 116131 145319 (view as bug list)
Depends on:
Blocks: Image-DPI
  Show dependency treegraph
 
Reported: 2017-09-21 01:55 UTC by weichen.chu
Modified: 2024-03-09 11:17 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
Test Crop function in MAC and Windows Impress (537.36 KB, application/vnd.oasis.opendocument.presentation)
2017-09-21 09:34 UTC, weichen.chu
Details
Sample file (395.72 KB, application/vnd.oasis.opendocument.presentation)
2018-02-28 15:15 UTC, Telesto
Details
Screenshot Windows (96DPI screen) (121.10 KB, image/jpeg)
2018-02-28 15:15 UTC, Telesto
Details
Screenshot Mac (probably 135dpi) (321.29 KB, image/png)
2018-02-28 15:17 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description weichen.chu 2017-09-21 01:55:02 UTC
Description:
The cropped image in the ODP file created by MAC Impress, cannot display correctly in the Windows Impress. 

Note: 
1. The ODP file created by Windows Impress is fine, even it opened by Mac Impress.
2. It works well if you save as DOCX! 

Steps to Reproduce:
1.Paste any image in the slide (Mac Impress)
2.Crop the image and save the slides as ODP file.
3.Open the ODP file by Windows Impress

Actual Results:  
Terrible image ratio and incorrect display of the cropped image can be observed.

Expected Results:
The files open by MAC or Windows Impress should have the same display of cropped images.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36
Comment 1 Alex Thurgood 2017-09-21 08:17:22 UTC Comment hidden (obsolete)
Comment 2 weichen.chu 2017-09-21 09:34:33 UTC
Created attachment 136419 [details]
Test Crop function in MAC and Windows Impress

I found the cropped image created by MAC impress, could not display correctly in windows impress.

And the cropped image created by Windows impress, could not display correctly in MAC impress.

(This problem seems can be found in ODP format only)
Comment 3 Alex Thurgood 2017-09-21 14:57:31 UTC Comment hidden (obsolete)
Comment 4 weichen.chu 2017-09-22 05:40:19 UTC
Sorry, the third slide was cropped by the windows impress.
Comment 5 Alex Thurgood 2017-09-22 09:28:32 UTC
I probably won't be able to test this on a Win machine til next week, but I see the cropped 2nd slide in Impress for Mac (LO5412) and the stretched cropped 3rd slide that you cropped on Impress for Win.

I am assuming that the 3rd slide made in Impress for Win did not have the stretched aspect ratio when you created it ?
Comment 6 weichen.chu 2017-09-23 22:51:44 UTC
To Alex:
Yes, I did not stretched aspect ratio of the image in the third slide when I created it.

The 3rd slide looks fine if you open by Windows Impress.
Comment 7 Alex Thurgood 2017-10-13 10:48:40 UTC
Confirming

Tested on

Version: 5.4.2.2
Build ID: 22b09f6418e8c2d508a9eaf86b2399209b0990f4
Threads CPU : 4; OS : Mac OS X 10.13; UI Render : par défaut; 
Locale : fr-FR (fr_FR.UTF-8); Calc: group


and 


LibreOffice 5412 x64 Windows 10

The slides should indeed be displayed in the same way on each OS, but they are not:

Slide 2 : the cropping in slide 2 is displayed differently on Mac and Windows (on Windows, the image is cropped more than on Mac

Slide 3 : there is no cropping in the display of slide 3 on Windows, whereas the same slide is not only cropped, but also distorted (aspect ratio problem).
Comment 8 tryagain 2018-01-05 22:15:25 UTC
I think the problem is not related to Operating system used.

It's most probably related to screen resolution of the system where the document was created and the one where it's being viewed.

I hit a similar problem on a single computer running linux.

To reproduce the problem, run Impress inside Xephyr nested X server with -dpi option value different to display resolution used at document creation time, and see all cropped images being broken. Restart Xephyr with the same -dpi as your desktop, and see the document is fine again.

Same problem seems to exist in openoffice (and is reported to be present in staroffice too), see https://forum.openoffice.org/en/forum/viewtopic.php?f=10&t=73858 .

Cropped images in my file have fo:clip attributes inside content.xml file. These attributes define cropped area by offsets expressed in centimetres.

I guess, current display resolution at document creation time is used to convert pixels of actual image to centimetres. Then, at document display time, we probably have no information (or do not use it) about resolution used at document creation time, using instead current display resolution. So we get wrong part of image with a wrong scale.

I think storing cropped area size in pixel units would be a fix.
Comment 9 tryagain 2018-01-07 22:23:32 UTC
(In reply to tryagain from comment #8)

Sorry, I now unable to reproduce the problem as described in my earlier post. I now have a file which is broken with any resolution set, and a bunch of files which are good in this sense at any resolution.

> To reproduce the problem, run Impress inside Xephyr nested X server with
> -dpi option value different to display resolution used at document creation
> time, and see all cropped images being broken. Restart Xephyr with the same
> -dpi as your desktop, and see the document is fine again.

> I think storing cropped area size in pixel units would be a fix.

Sorry again, I have no such an easy solution now...
Comment 10 How can I remove my account? 2018-02-27 10:59:23 UTC
I think one can mostly ignore any details about how the attached document was created, which slide on what platform etc, and concentrate on the essential fact: That slide 2 looks significantly different in LibreOffice on macOS and on Windows. Both LibreOffice on Linux and Powerpoint 2013 on Windows also display it like LibreOffice on Windows.

Thus I think we can be sure that it is LibreOffice on macOS that displays it wrong. (Even if the slide in question was created on a Mac, and while creating it, it of course looked as intended.)
Comment 11 How can I remove my account? 2018-02-28 13:34:17 UTC
Can anybody reproduce the problem from scratch using current master builds, BTW? I could not. If that indeed is the case now, that documents created newly in current LibreOffice versions don't exhibit this weird behaviour of cropped images, then the nature of this bug is somewhat different.
Comment 12 Telesto 2018-02-28 15:15:08 UTC
Created attachment 140222 [details]
Sample file
Comment 13 Telesto 2018-02-28 15:15:49 UTC
Created attachment 140223 [details]
Screenshot Windows (96DPI screen)
Comment 14 Telesto 2018-02-28 15:17:21 UTC
Created attachment 140224 [details]
Screenshot Mac (probably 135dpi)
Comment 15 Telesto 2018-02-28 15:28:18 UTC
The DPI scaling setting seems to matter, based on bug 92375 comment 25 (didn't check). https://www.tenforums.com/tutorials/5990-change-dpi-scaling-level-displays-windows-10-a.html#option1 ()
Comment 16 How can I remove my account? 2018-02-28 17:41:53 UTC
Ha! Thanks for the link to bug #92375, that seems a bit more informative, and especially the "PNG without pHYs (Physical pixel dimensions)" probably is the key thing.
Comment 17 Telesto 2018-02-28 18:51:39 UTC
(In reply to Tor Lillqvist from comment #16)
> Ha! Thanks for the link to bug #92375, that seems a bit more informative,
> and especially the "PNG without pHYs (Physical pixel dimensions)" probably
> is the key thing.

Similar bugs can be found in meta bug 116082 (it isn't quite png specific)
Comment 18 Chris Sherlock 2018-03-03 22:58:03 UTC Comment hidden (off-topic)
Comment 19 Aron Budea 2018-03-04 11:46:19 UTC
Is bug 116164 a duplicate of this?
Comment 20 How can I remove my account? 2018-03-05 07:56:33 UTC
Aron, probably a different place in the code where the same mistake is made, I would keep it separate.
Comment 21 Aron Budea 2018-03-05 08:02:56 UTC
Okay, let's add it to the see also list, maybe once one is fixed, the same idea can be reused for the other.
Comment 22 Alex Thurgood 2018-03-06 08:42:40 UTC
*** Bug 116131 has been marked as a duplicate of this bug. ***
Comment 23 How can I remove my account? 2018-05-22 12:52:00 UTC
I am almost tempted to say that whatever way one would try to fix this, it will cause a regression for somebody... Safer to just keep things as they are, and treat PNGs without pHYs as a case of "garbage in, garbage out"?
Comment 24 How can I remove my account? 2018-05-22 12:58:54 UTC
But yeah, one could introduce a new flag in new ODF documents created that would mean "in this document, PNGs without pHYs should be treated to be XX DPI, not whatever the user's monitor is", or something. Then existing documents would behave as before, and only newly created ones would be affected.
Comment 25 Sven-Jacobi 2018-08-08 11:40:55 UTC
It is not only cropping that does not work the same happens with bitmap tilings. 

If the graphic itself does not contain dpi resolution then the application should use fixed 96dpi as it is done by the good old OpenOffice 4.0
Comment 26 QA Administrators 2019-08-19 06:56:08 UTC Comment hidden (obsolete)
Comment 27 Roman Kuznetsov 2019-12-28 14:46:39 UTC
still repro in

Version: 6.5.0.0.alpha0+
Build ID: e22a3f596ce50b5166063e217d96ef674a54d380
CPU threads: 4; OS: Mac OS X 10.15.2; UI render: GL; VCL: osx; 
Locale: ru-RU (ru_RU.UTF-8); UI-Language: en-US
Calc: threaded
Comment 28 weichen.chu 2020-01-06 12:30:20 UTC
The same problem is still reproducible in version 6.3.3.2
However, if the ODP file opens by the google document, it displays correctly.

If The ODP file converts into pptx file, and then opens in the LibreOffice, it displays correctly.

In my impression, if the original file saved in the pptx, it works perfectly.
Please consider this problem is a critical issue for the academic field.
Comment 29 weichen.chu 2020-01-07 01:15:10 UTC
Sorry, I found this problem also appears even you open the files in the google document or other platforms of LibreOffice.

The best solution I found so far is to save as pptx format at the beginning.
This bug will be a critical issue if you want to promote the ODF format.....
Comment 30 Helo Dost 2021-09-14 13:42:02 UTC Comment hidden (spam)
Comment 31 Telesto 2021-10-27 16:32:59 UTC
*** Bug 145319 has been marked as a duplicate of this bug. ***
Comment 32 Horst Schirmeier 2022-03-15 21:30:06 UTC
I just re-tested related bug #118299 with LO 7.3.1.3 and figured that the issue is gone; from the described symptoms I'd bet this one is, too.  Please re-test.
Comment 33 Knot Davies 2022-03-30 21:55:21 UTC
I'm using 7.3.1.3 on Windows 10 / Ubuntu 18.04 and can still reproduce this bug with the given test files: the crops are not identical in with these two OSes.

I noticed with more agressive assymetric crops the images will get distorted even more.
Comment 34 pranav 2023-11-02 01:30:21 UTC
This issue of cropped images in Libre Office (LO) impress looking different on different PCs (PC1 and PC2) still exists. 

PC1: 13 inch screen, 1920 x 1080 display resolution, scale 100%, LO version 6.4.7.2, OS Ubuntu 20.04

PC2: 14 inch screen, 1900 x 1200 display resolution, scale 150%, LO version 7.5.7.1, OS MS Windows 11
 

Additional Information:
NOTE: On the PC2 when I change the scale to 100% (same setting as that on PC1), then the LO impress shows the cropped images correctly.

Of course, it is not very convenient to keep changing the scale settings as all the icons on 14 inch screen look very small with the 100% scale setting. 

Is there a way the cropped images in LO impress can preserve their form across different display formats, like when converted to .pdf? I guess, the LO could somehow be made read the scale of a particular PC and then rescale automatically when opened with a different PC.
Comment 35 pranav 2023-11-02 01:35:07 UTC Comment hidden (obsolete)
Comment 36 pranav 2023-11-02 01:35:15 UTC Comment hidden (obsolete)