Download it now!
Bug 47596 - FILEOPEN: rotated and cropped or scaled PNG/JPG/WMF image in MSO .DOC not rotated and wrongly scaled
Summary: FILEOPEN: rotated and cropped or scaled PNG/JPG/WMF image in MSO .DOC not rot...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:doc
: 71703 (view as bug list)
Depends on:
Blocks: DOC-Images
  Show dependency treegraph
 
Reported: 2012-03-20 09:31 UTC by grofaty
Modified: 2020-09-17 13:03 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Doc file with picture inside that is incorrectly displayed in LibreOffice Writer (107.00 KB, application/msword)
2012-03-20 09:31 UTC, grofaty
Details
Doc file compared MSO LO (121.84 KB, image/jpeg)
2017-01-11 19:11 UTC, Timur
Details
DOC file from MSO with PNG (617.50 KB, application/msword)
2020-09-17 12:20 UTC, Timur
Details
DOC file from MSO with PNG compared MSo 2016 LO 7.1+ (574.22 KB, image/png)
2020-09-17 12:21 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description grofaty 2012-03-20 09:31:00 UTC
Created attachment 58770 [details]
Doc file with picture inside that is incorrectly displayed in LibreOffice Writer

Today I have got a MS-Office doc document from customer. I opened this file in LibreOffice Writer v3.5.1 on Windows XP. In doc file there is attached image. Display of this image in LibreOffice is not displayed correctly, actually it is displayed in the way that image can't be recognized.

I send this doc to coworker and he could opened it on his MS-Office program and image was displayed correctly.

One work-around I have found in LibreOffice is right mouse click and select Save Graphics. Then open this file with some image viewer - image is displayed correctly. Conclusion, LibreOffice can't correctly open/display doc file with image attached inside. See attachment.
Comment 1 grofaty 2012-03-20 09:40:07 UTC
I also tested the same doc file in LibreOffice Writer v3.5.0 on Ubuntu 11.10. The same problem - image in Writer is incorrectly displayed. Corrupted display of image is exactly the same as in Windows XP. It looks like this is not a Windows specific problem.
Comment 2 s-joyemusequna 2012-03-20 10:18:27 UTC
Confirmed with LibO 3.5.1 on Windows XP.

Tested also on Windows XP/Vista 64 with OOo 3.1, LibO 3.3.4, and LibO 3.4.5. Exactly the same error, so no regression.
Comment 3 grofaty 2012-03-21 09:59:39 UTC Comment hidden (obsolete)
Comment 4 grofaty 2012-06-05 11:51:45 UTC
I retested the problem on LibreOffice v.3.5.4.2 on Windows XP and problem still persists. It looks like if huge image is included into .doc document, it is displayed incorrectly in LibreOffice.
Comment 5 grofaty 2012-12-21 15:35:31 UTC Comment hidden (obsolete)
Comment 6 grofaty 2013-02-27 12:16:12 UTC Comment hidden (obsolete)
Comment 7 grofaty 2013-05-10 18:04:13 UTC Comment hidden (obsolete)
Comment 8 grofaty 2013-07-29 10:36:57 UTC Comment hidden (obsolete)
Comment 9 grofaty 2013-07-29 10:37:51 UTC Comment hidden (obsolete)
Comment 10 grofaty 2013-12-03 14:37:47 UTC Comment hidden (obsolete)
Comment 11 grofaty 2015-01-06 12:44:53 UTC Comment hidden (obsolete)
Comment 12 grofaty 2015-05-06 12:39:47 UTC Comment hidden (obsolete)
Comment 13 grofaty 2015-05-19 09:14:16 UTC Comment hidden (obsolete)
Comment 14 grofaty 2015-07-02 05:26:53 UTC Comment hidden (obsolete)
Comment 15 grofaty 2015-07-06 10:48:07 UTC Comment hidden (obsolete)
Comment 16 grofaty 2015-07-06 11:06:28 UTC Comment hidden (obsolete)
Comment 17 Juan Valmaggia 2015-12-19 14:56:46 UTC
The problem in version 5032 still exists. No graphics when you open a .doc file. The same file opens correctly in Word 2010 and in WPS Writer (9.1.0.4942). The same problem with OpenOffice Writer (4.12), no graphics.
All tests were done in a desktop with an Intel I7 and with System 7 64 bit installed.
Comment 18 grofaty 2015-12-21 09:11:17 UTC Comment hidden (obsolete)
Comment 19 grofaty 2015-12-21 09:56:48 UTC
I figure it out what is really an issue here. It looks like it is a scaling problem.

How to reproduce a work-around:
1. Open attached sample.doc file.
2. Right click on image and select Format Image.
3. Crop tab. In Scale section change both Width and Height to 36% and click on OK button and now image is correctly displayed.

Now I can zoom out the image with bottom-right zoom scale ruler to 300% and perfectly see the content of image.
Comment 20 grofaty 2016-06-29 07:41:20 UTC Comment hidden (obsolete)
Comment 21 grofaty 2016-11-23 12:13:04 UTC Comment hidden (obsolete)
Comment 22 Timur 2017-01-11 19:11:02 UTC
Created attachment 130330 [details]
Doc file compared MSO LO

So many comments and cause was not determined, bug was not pinpointed to the key issue. It means triaging was not done properly.
Original image is rotated and cropped but LO didn't rotate it on import, just applied wrong scale.  
I don't know what's the image type. Bug 71703 says import problem happens with WMF, not PNG images. 
Good way is to create few .doc files in MSO from scratch, with different rotated/cropped/WFM/PNG settings, and test in LO.
Comment 23 grofaty 2017-01-12 06:05:54 UTC
Timur,
I can't create new document in Microsoft Office, because I don't use MSO. I just got the document from my business partner few years ago.

If someone has a MSO it is probably simple to create document:
1. Open my attachment from year 2012 from LibreOffice.
2. Right click on image and click Copy.
3. Open MSO and paste.
4. Do what Timur suggest: "Good way is to create few .doc files in MSO from scratch, with different rotated/cropped/WFM/PNG settings, and test in LO."
Regards
Comment 24 QA Administrators 2018-09-28 02:43:56 UTC Comment hidden (obsolete)
Comment 25 Cor Nouws 2019-02-09 16:53:44 UTC
similar in Version: 6.3.0.0.alpha0+
Build ID: b45289e48e0f354b9996e2846dd041db4a9947ce
CPU threads: 4; OS: Linux 4.15; UI render: GL; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-02-08_12:51:03
Locale: nl-NL (nl_NL.UTF-8); UI-Language: en-US
Calc: threaded
Comment 26 Timur 2020-09-17 12:20:36 UTC
Created attachment 165620 [details]
DOC file from MSO with PNG

Here is DOC file from MSO with PNG rotated.
Repro 7.1+ for PNG and WMF. Looks like the same issue so far. 
MSO created DOCX with similar rotated content opens OK.
Comment 27 Timur 2020-09-17 12:21:33 UTC
Created attachment 165621 [details]
DOC file from MSO with PNG compared MSo 2016 LO 7.1+

Confirmed for rotation of 90, 180, 270.
Comment 28 Timur 2020-09-17 12:46:17 UTC
*** Bug 71703 has been marked as a duplicate of this bug. ***
Comment 29 Timur 2020-09-17 12:57:56 UTC Comment hidden (obsolete)