Bug 96653 - PNG graphics are corrupted when exported to PDF
Summary: PNG graphics are corrupted when exported to PDF
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.0.3 release
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:5.2.0 target:5.1.1 target:5.0.5
Keywords: bibisected, bisected, regression
: 97518 97758 97777 97929 97940 98049 98080 98280 98328 98329 98450 99168 99177 99254 (view as bug list)
Depends on:
Blocks: VCL-OpenGL
  Show dependency treegraph
 
Reported: 2015-12-21 23:44 UTC by David
Modified: 2018-04-02 13:34 UTC (History)
22 users (show)

See Also:
Crash report or crash signature:


Attachments
odt source document (116.56 KB, application/vnd.oasis.opendocument.text)
2015-12-21 23:44 UTC, David
Details
pdf output (108.16 KB, application/pdf)
2015-12-21 23:44 UTC, David
Details
diagonal lines appearing over images (22.70 KB, image/png)
2016-02-10 22:30 UTC, David
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David 2015-12-21 23:44:16 UTC
Created attachment 121486 [details]
odt source document

PNG images are corrupted when exported to a PDF document.  This did not happen with version 5.04.
Comment 1 David 2015-12-21 23:44:56 UTC
Created attachment 121487 [details]
pdf output
Comment 2 Gaurang 2015-12-24 07:04:14 UTC
But, if the png is compressed before exporting as pdf, it is exported correctly.
Comment 3 MM 2015-12-26 11:04:34 UTC
Unconfirmed with v5.0.4.2 under ubuntu 15.10 x64.
Confirmed with v5.1.0.1 under ubuntu 15.10 x64.
Comment 4 raal 2016-01-04 12:52:41 UTC
This seems to have begun at the below commit.
Adding Cc: to Tomaž Vajngerl ; Could you possibly take a look at this one? Thanks
 972022c62c591c20afa2da76184b8224ca9ee597 is the first bad commit
commit 972022c62c591c20afa2da76184b8224ca9ee597
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Wed Dec 9 01:46:14 2015 -0800

    source 82e0c38e1205a3c8a70234a95ca33ab1400fbe57

    source 82e0c38e1205a3c8a70234a95ca33ab1400fbe57

	author	Tomaž Vajngerl <tomaz.vajngerl@collabora.com>	2015-12-04 17:19:08 (GMT)
committer	Tomaž Vajngerl <tomaz.vajngerl@collabora.com>	2015-12-04 17:23:50 (GMT)
commit 82e0c38e1205a3c8a70234a95ca33ab1400fbe57 (patch)
tdf#94739 use GetScanlineSize instead of calculating it
Comment 5 Commit Notification 2016-02-03 12:47:00 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#96653 distorted images on export to pdf

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 6 Cor Nouws 2016-02-03 13:01:06 UTC
*** Bug 97518 has been marked as a duplicate of this bug. ***
Comment 7 Commit Notification 2016-02-04 13:50:56 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

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

Resolves: tdf#96653 distorted images on export to pdf

It will be available in 5.1.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 8 Commit Notification 2016-02-04 13:53:09 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

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

Resolves: tdf#96653 distorted images on export to pdf

It will be available in 5.0.6.

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 Commit Notification 2016-02-04 14:00:55 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-0-5":

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

Resolves: tdf#96653 distorted images on export to pdf

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 10 David 2016-02-10 22:29:51 UTC
Still present in LO 5.1.0.3 (linux 64bit)
Comment 11 David 2016-02-10 22:30:22 UTC
Created attachment 122514 [details]
diagonal lines appearing over images
Comment 12 Cor Nouws 2016-02-10 22:44:40 UTC
(In reply to David from comment #10)
> Still present in LO 5.1.0.3 (linux 64bit)

That is indeed expected David, since target is set to 5.1.1 (and others). Fix was too late apparently for the 5.1.0.3
Comment 13 David 2016-02-10 23:05:17 UTC
Issue resolved for me with LO Draw 5.0.6.0 linux 64bit daily. Thanks
Comment 14 David 2016-02-10 23:45:07 UTC
Issue resolved for me with LO Draw 5.1.1.0 linux 64bit daily. 
Much appreciated! Thanks
Comment 15 Cor Nouws 2016-02-11 07:00:28 UTC
Thanks a lot for verifying David!
Comment 16 Ben Hochstrasser 2016-02-12 15:56:11 UTC
*** Bug 97777 has been marked as a duplicate of this bug. ***
Comment 17 Buovjaga 2016-02-14 12:40:05 UTC
*** Bug 97758 has been marked as a duplicate of this bug. ***
Comment 18 V Stuart Foote 2016-02-15 20:38:08 UTC
*** Bug 97770 has been marked as a duplicate of this bug. ***
Comment 19 Buovjaga 2016-02-17 11:17:49 UTC
*** Bug 97929 has been marked as a duplicate of this bug. ***
Comment 20 steve 2016-02-22 08:42:39 UTC
*** Bug 98049 has been marked as a duplicate of this bug. ***
Comment 21 Buovjaga 2016-02-22 15:05:31 UTC
*** Bug 98080 has been marked as a duplicate of this bug. ***
Comment 22 Buovjaga 2016-02-29 18:20:47 UTC
*** Bug 98280 has been marked as a duplicate of this bug. ***
Comment 23 V Stuart Foote 2016-03-02 00:20:30 UTC
*** Bug 98328 has been marked as a duplicate of this bug. ***
Comment 24 Buovjaga 2016-03-04 14:44:32 UTC
*** Bug 98329 has been marked as a duplicate of this bug. ***
Comment 25 V Stuart Foote 2016-03-05 17:55:28 UTC
*** Bug 98450 has been marked as a duplicate of this bug. ***
Comment 26 Buovjaga 2016-03-10 07:38:36 UTC
*** Bug 97940 has been marked as a duplicate of this bug. ***
Comment 27 pmb 2016-03-12 15:05:38 UTC
Issue corrected in LO 5.1.1 from bug 98329 - images print and export to pdf

Thank You for your assistance.
Comment 28 Ingo Belka 2016-03-14 08:50:27 UTC
Win 7 64 bit, LO Version: 5.1.1.3 (x64) Build-ID: 89f508ef3ecebd2cfb8e1def0f0ba9a803b88a6d CPU-Threats: 4; BS-Version: Windows 6.1; UI-Render: Standard; Gebietsschema: de-DE (de_DE)

Everything works fine now. Thank you for your efforts.
Comment 29 V Stuart Foote 2016-04-09 15:57:53 UTC
*** Bug 99168 has been marked as a duplicate of this bug. ***
Comment 30 V Stuart Foote 2016-04-09 16:04:06 UTC
*** Bug 99177 has been marked as a duplicate of this bug. ***
Comment 31 Schubert 2016-04-10 13:43:25 UTC
On my png and on the corrupted jpgs there are also diagonal lines.
Schubert
Comment 32 V Stuart Foote 2016-04-10 14:51:45 UTC
*** Bug 99168 has been marked as a duplicate of this bug. ***
Comment 33 V Stuart Foote 2016-04-13 04:04:50 UTC
*** Bug 99254 has been marked as a duplicate of this bug. ***
Comment 34 dxt.tfg 2018-04-02 04:01:51 UTC
This issue still persists on LibreOffice 6.0.0.1 upto at least 6.0.2.1 (applied for JPG files). I use Linux Mint 18.3.

Additional info:
Version: 6.0.2.1
Build ID: f7f06a8f319e4b62f9bc5095aa112a65d2f3ac89
CPU threads: 4; OS: Linux 4.14; UI render: default; VCL: x11; 
Locale: en-US (en_US.UTF-8); Calc: CL

I tried disable/enable OpenCL, the result was still the same.

Sample file: http://i.imgur.com/txYK036.png
Sample output: http://i.imgur.com/a6zjDpo.png (opened with Foxit Reader on Linux)
Comment 35 V Stuart Foote 2018-04-02 13:33:46 UTC
(In reply to dxt.tfg from comment #34)
> This issue still persists on LibreOffice 6.0.0.1 upto at least 6.0.2.1
> (applied for JPG files). I use Linux Mint 18.3.
> 
> Additional info:
> Version: 6.0.2.1
> Build ID: f7f06a8f319e4b62f9bc5095aa112a65d2f3ac89
> CPU threads: 4; OS: Linux 4.14; UI render: default; VCL: x11; 
> Locale: en-US (en_US.UTF-8); Calc: CL
> 
> I tried disable/enable OpenCL, the result was still the same.

OpenCL has nothing to do with image export. Issue was OpenGL related export.

> 
> Sample file: http://i.imgur.com/txYK036.png
> Sample output: http://i.imgur.com/a6zjDpo.png (opened with Foxit Reader on
> Linux)

These are of no use. We'd need the ODF writer document or the PNG/JPEG image that is not being picked up for export.

Please open a new Bugzilla issue and fully explain the issue with Steps to Reproduce and sample documents.

This is => FIXED