Download it now!
Bug 87539 - FILESAVE: DOCX - Image color/graphics modes not correctly exported
Summary: FILESAVE: DOCX - Image color/graphics modes not correctly exported
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.5.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Jorendc
URL:
Whiteboard: needsWord target:5.0.0 target:5.1.0
Keywords: filter:docx
Depends on: 76941
Blocks:
  Show dependency treegraph
 
Reported: 2014-12-20 22:58 UTC by Yousuf Philips (jay) (retired)
Modified: 2019-10-01 10:54 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
sample file (55.59 KB, application/vnd.oasis.opendocument.text)
2014-12-20 22:58 UTC, Yousuf Philips (jay) (retired)
Details
LO docx exported files edited in Word 2007 and 2010 (93.61 KB, application/zip)
2014-12-20 23:00 UTC, Yousuf Philips (jay) (retired)
Details
MSO vs LO (89.84 KB, image/png)
2015-05-26 16:04 UTC, Yousuf Philips (jay) (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2014-12-20 22:58:14 UTC
Created attachment 111093 [details]
sample file

Steps:
1) Open attached file
2) Save as .docx
3) Open .docx in MS Word
4) Notice none of the images have color/graphics modes set

Version: 4.5.0.0.alpha0+
Build ID: e570cd7a293ceee175949dcc9656cdf776ae3c37
TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:master, Time: 2014-12-12_18:49:54
Comment 1 Yousuf Philips (jay) (retired) 2014-12-20 23:00:55 UTC
Created attachment 111094 [details]
LO docx exported files edited in Word 2007 and 2010

So here are .docx files that were saved from Word 2007 and 2010 which we created using the exported .docx file exported from LO and then applying those color/graphics modes to the images and then saved.
Comment 2 Yousuf Philips (jay) (retired) 2014-12-27 10:44:14 UTC
@Qubit: Even without MS Word, you can view the document using MS Word Viewer ( http://www.microsoft.com/en-us/download/details.aspx?id=4 ) or in WPS Writer ( http://www.wps.com/, http://wps-community.org/ ) which has full docx support. Both apps are free and can be run on windows or linux (ms word viewer through wine :D).
Comment 3 Robinson Tryon (qubit) 2014-12-27 14:21:32 UTC
(In reply to Jay Philips from comment #2)
> @Qubit: Even without MS Word, you can view the document using MS Word Viewer
> ...can be run on windows or linux (ms word viewer through wine :D).

Sounds good, I'll test w/Word viewer under wine.

TESTING on Ubuntu 14.04 with LO Version: 4.5.0.0.alpha0+
Build ID: 783ba49aa0cd068c7e3dacdd3c13e9c37cf52e22
TinderBox: Linux-rpm_deb-x86_64@46-TDF,
Branch:master, Time: 2014-12-18_11:21:12
Locale: en_US

(In reply to Jay Philips from comment #0)
> Steps:
> 1) Open attached file (attachment 111093 [details])

(Confirmed: Color Mode is set for all but the first image)

> 2) Save as .docx
> 3) Open .docx in MS Word

Using MS-Office Word Viewer 11.8169 SP3 (under Wine).

Got an error when trying to open the docx file. Same thing with some other docx files :(
Comment 4 Yousuf Philips (jay) (retired) 2014-12-27 15:01:03 UTC
Loaded just fine for me on wine. I have the following winetricks packages intalled.

corefonts
tahoma
gdiplus
comctl32
Comment 5 Buovjaga 2015-01-13 18:17:34 UTC
(In reply to Jay Philips from comment #0)
> Steps:
> 1) Open attached file
> 2) Save as .docx
> 3) Open .docx in MS Word
> 4) Notice none of the images have color/graphics modes set

Reproduced.

Win 8.1 32-bit
MSO 2013

LibO Version: 4.5.0.0.alpha0+
Build ID: b3b4bbaf6cbd2226b659fea7d6ae473ccf84e9dd
TinderBox: Win-x86@39, Branch:master, Time: 2015-01-12_06:13:44
Comment 6 Jorendc 2015-05-14 21:29:13 UTC
I'll give it a poke. Bug 76941 (grayscale) is fixed.
Comment 7 A (Andy) 2015-05-15 17:42:53 UTC
For me also reproducible with LO 4.4.3.2, Win 8.1
Comment 8 Commit Notification 2015-05-20 10:52:33 UTC
Joren De Cuyper committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0db96caf0fcce09b87621c11b584a6d81cc7df86

tdf#76941 and tdf#87539: docx export image greyscale, watermark, black&white

It will be available in 5.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Yousuf Philips (jay) (retired) 2015-05-26 16:04:26 UTC
Created attachment 116055 [details]
MSO vs LO

Grayscale and black/white have been mapped correctly, but watermark hasnt. I believe we could map LO's watermark to MSO's washout, though they may have a slightly different look to them. This is no different that LO and MSO have the same black/white 50% filter and the image in both dont look identical.
Comment 10 Jorendc 2015-05-26 18:29:38 UTC
(In reply to Yousuf (Jay) Philips from comment #9)
> Created attachment 116055 [details]
> MSO vs LO
> 
> Grayscale and black/white have been mapped correctly, but watermark hasnt. I
> believe we could map LO's watermark to MSO's washout, though they may have a
> slightly different look to them. This is no different that LO and MSO have
> the same black/white 50% filter and the image in both dont look identical.

I do not agree. Why should we map watermark to MSO's washout when they don't have the same look?

That's like mapping Dark-green to light-green and say we have to make them 'identical'. That means we either have to lighten or to darken the green -> altering the output.
Comment 11 Yousuf Philips (jay) (retired) 2015-05-26 21:57:43 UTC
(In reply to Jorendc from comment #10)
> I do not agree. Why should we map watermark to MSO's washout when they don't
> have the same look?

As previously stated, "LO and MSO have the same black/white 50% filter and the image in both dont look identical".

> That's like mapping Dark-green to light-green and say we have to make them
> 'identical'. That means we either have to lighten or to darken the green ->
> altering the output.

If dark-green was #007f00 and light-green was #008100, i would say that they were pretty much 'identical', also MSO does consider the washout filter equivalent to a watermark [ https://support.office.com/en-za/article/Create-a-watermark-from-a-picture-c5105178-718a-4e73-8a4e-5cf111259fc3 ].

The main issue here is compatibility and having MSO's washout import as a destructively filter applied to images (bug 87536) and having LO's watermark export as a custom brightness and contrast combination that cant be adjust when reopened in LO isnt the best solution.
Comment 12 Jorendc 2015-05-27 10:48:44 UTC
(In reply to Yousuf (Jay) Philips from comment #11)
[...]

Thanks for your comment and search Jay.
I'll look into this further.

What I already can tell you: watermark isn't a kind of 'OOXML node' like <watermark/> or so. It is just a combination of brightness and contrast.

Kind regards,
Joren
Comment 13 Commit Notification 2015-07-15 23:45:51 UTC
Joren De Cuyper committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d151ed35ad4c4e7aa9fbb807930fcf91dea2eba7

tdf#87539 map MSO washout filter to LO's watermark colormode

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 14 tommy27 2015-09-25 05:41:40 UTC
retested with LibO 5.1.0.0.alpha1+ (x64)
Build ID: 8c7ba16ba4bdedb4354f342b20d5a5de8a132b48
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2015-09-24_21:53:09
Locale: it-IT (it_IT)

the .docx output is correctly rendered by www.docspal.com
so I assume it is fixed

thanks Joren
Comment 15 Robinson Tryon (qubit) 2015-12-17 04:37:38 UTC Comment hidden (obsolete)