Bug 94739 - Images are distorted diagonally on PDF export when OpenGL rendering is enabled
Summary: Images are distorted diagonally on PDF export when OpenGL rendering is enabled
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
5.0.2.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.2.0 target:5.1.0.1 target:5...
Keywords:
: 94944 94986 95368 95855 96455 (view as bug list)
Depends on:
Blocks: VCL-OpenGL
  Show dependency treegraph
 
Reported: 2015-10-03 21:42 UTC by spartanhooah
Modified: 2016-10-25 19:10 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description spartanhooah 2015-10-03 21:42:46 UTC
When I try to export http://imgur.com/izBTWSb.jpg as a PDF I instead get https://i.imgur.com/FyIvCeA.jpg. I have attempted the default profile fix (https://ask.libreoffice.org/en/question/58416/writer-keeps-changing-default-indents-to-30/?answer=58449#post-id-58449).
Comment 1 Cor Nouws 2015-10-04 07:42:10 UTC
Hi spartanhooah,

Thanks for the report.
If I paste the jpg in either a writer or a drawing document and export that to PDF, it shows up fine.
In 5.0.2.2. on Linux.

Can you please give clear steps of how you use the jpg and do the export?

Best - Cor
Comment 2 spartanhooah 2015-10-04 15:23:43 UTC
Steps:
1) Take a screenshot from Firefox.
2) Paste into paint.net 4.0.6.
3) Select just the part I want.
4) Paste into new Writer document.
5) Export as PDF.
6) Open with SumatraPDF.

Interestingly, Sumatra is the only program that actually displayed anything. The Windows 10 Reader app, Edge, and Firefox 41 all displayed a blank page.
Comment 3 Cor Nouws 2015-10-04 20:35:09 UTC
Thanks - I see no problem. But have no SumatraPDF.
Comment 4 Buovjaga 2015-10-08 08:14:32 UTC
(In reply to spartanhooah from comment #2)
> Steps:
> 1) Take a screenshot from Firefox.
> 2) Paste into paint.net 4.0.6.
> 3) Select just the part I want.
> 4) Paste into new Writer document.
> 5) Export as PDF.
> 6) Open with SumatraPDF.
> 
> Interestingly, Sumatra is the only program that actually displayed anything.
> The Windows 10 Reader app, Edge, and Firefox 41 all displayed a blank page.

I don't have paint.net, but I have SumatraPDF.
I simply right-clicked - copied image from http://imgur.com/izBTWSb.jpg, pasted it to Writer and exported to PDF.
SumatraPDF displayed it just fine.

Does it display messed up for you, if you do as I did?

Win 7 Pro 64-bit, Version: 5.0.2.2 (x64)
Build ID: 37b43f919e4de5eeaca9b9755ed688758a8251fe
Locale: fi-FI (fi_FI)
SumatraPDF 3.0
Comment 5 spartanhooah 2015-10-08 16:44:33 UTC
Yes, it still shows messed up if I copy it from imgur.
Comment 6 raal 2015-10-13 05:00:03 UTC
No problem in Version: 5.1.0.0.alpha1+
Build ID: 8273350ff48f198efc9dc9c5de5519b8cbdc0cb3
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2015-10-07_05:54:26

Please attach test writer file.
Comment 7 V Stuart Foote 2015-10-13 17:46:02 UTC
*** Bug 94944 has been marked as a duplicate of this bug. ***
Comment 8 V Stuart Foote 2015-10-13 17:57:48 UTC
*** Bug 94986 has been marked as a duplicate of this bug. ***
Comment 9 ckakman 2015-10-13 18:59:03 UTC
Bug 94986 contains an example document and PDF output that may help to reproduce the issue.
Comment 10 Buovjaga 2015-10-14 06:12:35 UTC
(In reply to ckakman from comment #9)
> Bug 94986 contains an example document and PDF output that may help to
> reproduce the issue.

No problem for me, when I export a PDF from the document in attachment 119542 [details]

Win 7 Pro 64-bit, Version: 5.0.2.2 (x64)
Build ID: 37b43f919e4de5eeaca9b9755ed688758a8251fe
Locale: fi-FI (fi_FI)
Comment 11 pascal 2015-10-26 16:15:41 UTC
Hi,

Same problem here with Libre office 5.0.2 on Windows 7 64.
Images are corrupted (just some artefacts) and color disappear.
Comment 12 Buovjaga 2015-10-26 16:36:26 UTC
We need a test file, guys..
Comment 13 Buovjaga 2015-10-26 16:37:40 UTC
pascal: do you get the bad result with attachment 119542 [details]?
Comment 14 ckakman 2015-10-31 19:12:31 UTC
When I disabled rendering using OpenGL (Settings > LibreOffice > View > Use OpenGL for all rendering) images were correctly rendering in the produced PDF file. You can try the file attached to the duplicate Bug 94986 with that option enabled.
Comment 15 Buovjaga 2015-11-01 08:42:58 UTC
spartanhooah: do you get a correct result after disabling Options > LibreOffice > View > Use OpenGL for all rendering
Comment 16 spartanhooah 2015-11-01 12:30:48 UTC
Yes, it appears that disabling OpenGL fixes this problem (in addition to at least one other).
Comment 17 Buovjaga 2015-11-01 16:15:53 UTC
Ok we have enough confirmation to set this to NEW. I'll add this to the OpenGL metabug.
Comment 18 Buovjaga 2015-11-11 17:30:29 UTC
*** Bug 95368 has been marked as a duplicate of this bug. ***
Comment 19 Michael Meeks 2015-11-11 17:32:19 UTC
Looks like an interesting row-stride problem.
Comment 20 Bookman900 2015-11-12 17:06:39 UTC
Hi spartanhooah!

Interesting report.

On MacOSX version, if I paste a random picture to Writer or Impress, the output of PDF is without problems. (MacOSX 10.8.5 / LO 4.4.6.3 + LO 5.1.0.0-a)

The same is for Linux version (4.4.5.2)

May be this is a graphic stack problem in Your OS?
Comment 21 spartanhooah 2015-11-12 17:08:37 UTC
Bookman900, thanks, but it looks like this is an OpenGL-related thing, as Beluga has stated.
Comment 22 Carlo 2015-11-17 17:53:12 UTC
*** Bug 95855 has been marked as a duplicate of this bug. ***
Comment 23 Commit Notification 2015-12-04 17:25:16 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#94739 use GetScanlineSize instead of calculating it

It will be available in 5.2.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 24 Commit Notification 2015-12-04 17:29:20 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2ec558395c70db9d493e705566673f7e7c349a7a&h=libreoffice-5-1

tdf#94739 use GetScanlineSize instead of calculating it

It will be available in 5.1.0.1.

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 25 Michael Meeks 2015-12-07 16:12:26 UTC
GL disabled in 5.0.x as of now -> closed.
Comment 26 Cor Nouws 2015-12-07 18:40:26 UTC
Hi Michael,

Really good that the immediate problem is resolved!

But before closing this issue as Resolved, it looks logic that first the images behave correct with OpenGL enabled. I assume it is not the intention to move OpenGL-use to some unstable setting?

We can of course also change the summary/porte of this bug to some desired change in the setting, but that then is more QA-BugZilla-playing IMO.

What do you think?
Cheers,
Cor
Comment 27 Cor Nouws 2015-12-07 18:43:01 UTC
Hmm, but if you refer to the patch of comment#24, that makes use of a different way to render the images for PDF export, then of course...
Comment 28 Michael Meeks 2015-12-10 11:47:29 UTC
Pushed this to gerrit for -5-0 too (if that's what your comment means Cor) ?

https://gerrit.libreoffice.org/20595 tdf#94739 use GetScanlineSize instead of calculating it

So - re-closing.

Would love the bug to be verified in master or -5-1 - in case it persists =)
Comment 29 Commit Notification 2015-12-11 20:39:35 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ffe150ce903d9cdc62c25ad3437e61d24ede17d6&h=libreoffice-5-0

tdf#94739 use GetScanlineSize instead of calculating it

It will be available in 5.0.5.

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 30 Buovjaga 2015-12-14 11:47:30 UTC
*** Bug 96455 has been marked as a duplicate of this bug. ***
Comment 31 Caolán McNamara 2016-02-03 11:50:25 UTC
and now they are distorted diagonally when opengl rendering is not enabled
Comment 32 Caolán McNamara 2016-02-03 12:35:48 UTC
see bug 96653 for that problem