Description: Attached is an EMF Metafile which is shown with it's correct (Landscape) porportions in third party tools like MS Windows Paint or the free IrfanView. If I open this file with LibreOffice Draw or embedd it in Writer using Insert->Image->FromFile the image has completley different porportions and looks ugly therefore. Steps to Reproduce: Just open the attached EMF file Landscape.emf in LibreOffice draw and compare it with the expected image proportins of the attached IrfanView screenshot. Actual Results: Image size 8.89 x 13.59 cm (Portrait) Expected Results: Image size 21.1 x 15.3 cm (Landscape) or proportional to this ratio Reproducible: Always User Profile Reset: No Additional Info: User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0
Created attachment 128716 [details] Affected EMF file
Created attachment 128717 [details] HowItLooksInLO5.2.1.2
Created attachment 128718 [details] HowItLooksInIrfanView
Created attachment 128719 [details] LO5.2.1.2_Writer_file_with_the_image_embedded
Confirmed with as early as v3.3.0 / Windows 7.
** Please read this message in its entirety before responding ** 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 http://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://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
Created attachment 137793 [details] ScreenshotOfTheDistortedImageInLO_DEV_Version 6.0.0.0.alpha1_withNewEMF_implementation.PNG This problem still occurs in the LO 6.0 nightly builds with the new EMF implementation! See the attached screenshot!
bug 116335 - part 4) may be related to this.
Tested aspect ratio distortion problem, see bug #116335 part 4), on Windows 7, 32-bit, with a clean installation of: Version: 6.2.5.2 (x86) Build ID: 1ec314fa52f458adc18c4f025c545a4e8b22c159 CPU threads 4; OS: Windows 6.1; Rendering component: default; VCL: win; Locale: fi-FI (fi_FI); UI Language: fi-FI Calc: threaded The problem still occurs.
Additionally, similar problem occurs in Inkscape (version 0.92-4 tested; problem already reported to Inkscape devs).
Created attachment 167331 [details] Affected EMF compared Repro LO 7.1+ and also MSO 2016. Different and reported good in IrfanView.
*** Bug 113868 has been marked as a duplicate of this bug. ***
Looks like LO at some point became more bug-to-bug compatible with MSO. The sample file is rendered with wrong ratio in MS Word and MS PowerPoint. It renders right in MS Paint, Wordpad and some third party tools. The way it renders in MS Paint/Wordpad looks more logical and consistent. However, unless MS fix one or the other (or spec), the decision has to be made with what to be compatible.
Ok, let's close as it's MS chasing its own tail.
This bug report is not about MS Office! It's about broken EMF file support. These are native OpenDocument files with embedded EMF. These are native files, not files imported from MS Office!
(In reply to Joerg from comment #16) > This bug report is not about MS Office! It's about broken EMF file support. > These are native OpenDocument files with embedded EMF. These are native > files, not files imported from MS Office! Could you please explain why LibreOffice should show this EMF as MS Paint and IfranView instead of showing it the same as MS Word or MS PowerPoint?
(In reply to Joerg from comment #16) > This bug report is not about MS Office! It's about broken EMF file support. > These are native OpenDocument files with embedded EMF. These are native > files, not files imported from MS Office! @Joerg Do you remember by which application the EMF file was created? We implemented current import code, according to [MS-EMF] specification. Unfortunately MS Paint/Wordpad is displaying these images differently. The issue with image from this ticket is: Even if we provide the fix for this image, the other EMF images will start displaying incorrectly. That's why we currently don't see a solution to resolve this issue, without breaking import of other images.
As far as I can see, the file is correct EMF syntax and contains the correct aspect ratio. The image import should take over the aspect ratio of the original file and should not assume, that the image file is broken. This might make sense when somebody imports a MS Office document containing an EMF generated by MS Office, but not in case of importing a standalone image which has no relation to MS Office.
Created attachment 172561 [details] Example java code to generate EMF files
Hello Bartosz, it's generate by a Java based OpenDocument generator which contains code similar to the attached example program. KR Jörg
(In reply to Joerg from comment #19) > The image import should take over the aspect ratio of the original file and > should not assume, that the image file is broken. Nobody assumes that the file is broken. It has some "specifics" which unfortunately not 100% clearly documented in the MS spec AND handled differently by different implementations. > This might make sense when > somebody imports a MS Office document containing an EMF generated by MS > Office, but not in case of importing a standalone image which has no > relation to MS Office. There is no good way to differentiate an image generated by MS tools and imported as a standalone file and by other different third party tools, with each of them able of doing their own interpretation of the spec. In the current situation LibreOffice need to choose which interpretation of the spec to support. MSO sounds more reasonable than MS Paint. > it's generate by a Java based OpenDocument generator > which contains code similar to the attached example program. If modification of this generator is an option, I could help to identify relatively small changes in the resulting EMF required to make it more compatible with different readers.