Bug Hunting Session
Bug 98324 - .bmp and .png images in .ods printed as black squares when "convert colors to grayscale" option is ticked
Summary: .bmp and .png images in .ods printed as black squares when "convert colors to...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
5.1.0.3 release
Hardware: IA64 (Itanium) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.2.0 target:5.1.2
Keywords: regression
Depends on:
Blocks: VCL-OpenGL
  Show dependency treegraph
 
Reported: 2016-03-01 20:52 UTC by Eion MacDonald
Modified: 2016-10-25 19:08 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Typical calc invoice withlogo and signature inserts (32.22 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-03-01 20:52 UTC, Eion MacDonald
Details
Photo of bad and correct results (413.33 KB, image/png)
2016-03-02 20:21 UTC, Eion MacDonald
Details
the file used to get bad print with ticked colour to greyscale (52.02 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-03-02 20:22 UTC, Eion MacDonald
Details
Test file, PNG prints as black block WITH OpenGL, prints OK without OpenGL (19.85 KB, application/vnd.oasis.opendocument.text)
2016-03-12 21:35 UTC, JohnHardy
Details
opengl_device.log file from John Hardy (320 bytes, text/plain)
2016-03-13 18:08 UTC, JohnHardy
Details
print file sample plus log (21.56 KB, application/vnd.oasis.opendocument.text)
2016-03-13 19:51 UTC, Eion MacDonald
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eion MacDonald 2016-03-01 20:52:53 UTC
Created attachment 123124 [details]
Typical calc invoice withlogo and signature inserts

CALC.  Old documents(invoices) with a) bmp signature insert and b)logo in png format used for years (since 2006) in LibreOffice (previously OpenOffice) up to LibreOffice 5.04 now shows on screen as required but prints out these bmp and png inserts as a black square. 
No other change than upgrade from LibreOffice version 5.0.4 to version 5.1 took place. Machinery Dell Latidude E6530 with Windows 10 and Oki printer OkiB431dn.
After removing LibreOffice 5.1 and reinstalling version 5.0.4 printer gave correct output. 
Copy of calc Ver 5.04 bare invoice attached
Comment 1 m.a.riosv 2016-03-02 01:10:34 UTC
Hi @Eion, thanks for reporting.

Do you see it in the Menu/File/Print box, you can resize it to see it better.

If so, please verify the options in Menu/Tools/Options/LibreOffice/Print.
Comment 2 Eion MacDonald 2016-03-02 17:50:29 UTC
20160302 Ex Eionmac


Answer:
Printed Ok in LibreOffice 5.0.4
upgraded again to 5.1.0.3
Prints bad (Black Blocks where images located)
4 attempts with different options tried from
menu>>tools>options.>LibreOffice>print  tried.
All bad.
After removing tick in print options of 'print to greyscale'  print
became OK.
I have a mono black only printer so always set it to print to greyscale.
and
 All options in print setting box under
> tools>options.>LibreOffice>print needed to be unticked!

Thus response is not the same from the two versions when the same
document is loaded , or on set-up LibreOffice 5.1.0.3 changes  things
(Shades of Windows 10 updates!)

Problem solved for now.
It was just frustrating when I needed to print invoices to get them to
client to be paid on time.
Comment 3 tommy27 2016-03-02 18:16:55 UTC
do you mean that "print to greyscale" is broken in 5.1.0.3 and works fine in 5.0.4.2?
Comment 4 Adolfo Jayme 2016-03-02 18:25:35 UTC
Let’s close as WORKSFORME. The FIXED status is reserved to problems explicitly fixed by a commit pushed to one of our Git repositories.
Comment 5 tommy27 2016-03-02 19:19:21 UTC
probably it's not even a worksforme

as far as I see he had a problem with 5.1.x which had a different behaviour than 5.0.x

he said it's fixed since after downgrading to 5.0.x he doesn't sees the issue again, but probably he stumped upon a 5.1.x regression
Comment 6 Eion MacDonald 2016-03-02 20:21:12 UTC
Created attachment 123149 [details]
Photo of bad and correct results

Only photo attached as I see no way to also send file.
Old 123124 Typical calc invoice is the same file.
Comment 7 Eion MacDonald 2016-03-02 20:22:31 UTC
Created attachment 123150 [details]
the file used to get bad print with ticked colour to greyscale
Comment 8 Eion MacDonald 2016-03-02 20:26:13 UTC
(In reply to tommy27 from comment #3)
> do you mean that "print to greyscale" is broken in 5.1.0.3 and works fine in
> 5.0.4.2?

YES. tick box works differently in the two versions.
Ticked or unticked works ok to mono printer in version 5.0.4
UNTICKED work ok to mono printer in version 5.1.0.3
TICKED gives black squares using mono printer in version 5.1.0.3
See uploaded photo.
Comment 9 tommy27 2016-03-02 21:05:11 UTC
I don't reproduce your issue using LibO 5.2.0.0 alpha under Win7 x64 using an HP Officejet Pro 8100 color printer.

ticking the "convert colors to grayscale" prints correctly the images.

I'll retest tomorrow with 5.1.0.3
Comment 10 Buovjaga 2016-03-10 10:10:29 UTC
Please disable Tools - Options - LibO - View - Use OpenGL for all rendering
Comment 11 JohnHardy 2016-03-12 21:35:58 UTC
Created attachment 123531 [details]
Test file, PNG prints as black block WITH OpenGL, prints OK without OpenGL

I had the same problem of png graphics printing as a solid black block in Draw and in Writer. Following Buovjaga's advice I disabled “Use OpenGL for all rendering (on restart)” under Tools/Options/LibreOffice/View. Then I restarted LO. The problem went away.

I am using Version: 5.1.0.3 (x64)
Build ID: 5e3e00a007d9b3b6efb6797a8b8e57b51ab1f737
Windows 10, 64-bit
Comment 12 Buovjaga 2016-03-13 10:50:39 UTC
5.1.1 is now out and fixes a lot of OpenGL issues. Maybe printing now works even with OpenGL enabled?
Comment 13 JohnHardy 2016-03-13 17:53:19 UTC
I just updated from LO Version 5.1.0.3 (x64) to Version 5.1.1.3 (x64), Windows 10. Same situation. PNG graphic prints as a solid black block if “Use OpenGL for all rendering (on restart)” is checked, prints OK if OpenGL is unchecked.

Version: 5.1.1.3 (x64)
Build ID: 89f508ef3ecebd2cfb8e1def0f0ba9a803b88a6d
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
Locale: en-US (en_US)
Comment 14 Buovjaga 2016-03-13 17:59:29 UTC
Ok, then I'll set to NEW.
Comment 15 Buovjaga 2016-03-13 18:00:50 UTC
Eion and John: please paste the contents of your
C:\Users\User\AppData\Roaming\LibreOffice\4\cache\opengl_device.log
Comment 16 JohnHardy 2016-03-13 18:08:43 UTC
Created attachment 123541 [details]
opengl_device.log file from John Hardy

As requested, the contents of the opengl_device.log file.
Comment 17 Eion MacDonald 2016-03-13 19:51:42 UTC
Created attachment 123543 [details]
print file sample plus log

After downloading and updating 5.1.1.3 I printed sample bothwith and without convert colours to greyscale ticked. Both versions printed ok. see sample witk requested log inserted
Comment 18 Buovjaga 2016-03-13 19:55:37 UTC
Eion's log:
DriverVersion: 10.18.10.4276
DriverDate: 8-17-2015
DeviceID: PCI\VEN_8086&DEV_0166&SUBSYS_05351028&REV_09
AdapterVendorID: 0x8086
AdapterDeviceID: 0x0166
AdapterSubsysID: 0x05351028
DeviceKey: System\CurrentControlSet\Control\Video\{A0FB39BB-498D-4F90-AFB0-F8B78EC06B63}\0000
DeviceString: Intel(R) HD Graphics 4000
Comment 19 Michael Meeks 2016-03-15 11:53:26 UTC
Hi Eion; do I interpret:

> After downloading and updating 5.1.1.3 I printed sample bothwith and without
> convert colours to greyscale ticked. Both versions printed ok. see sample with
> requested log inserted

As "works for me" for 5.1.1.3 ? =) If so, then we still have JohnHardy on NVidia with the issue - which needs investigation.

Marco - could you look at this next ? [ if we can reproduce it ]
Comment 20 JohnHardy 2016-03-15 22:20:45 UTC
I took my own test file and opened it in LO 5.1.1.3 (64 bit) on a different computer, a Windows 10 computer that uses the video circuitry of the Intel i5-4690K processor. It has the same results: The file prints OK when OpenGL is off, prints as a black block when OpenGL is ON. Note that the "Print Preview" looks OK both ways, but the final print to a Lexmark E260DN laser printer has the results as described earlier.
Comment 21 Marco Cecchetti 2016-03-21 09:22:04 UTC
A fix to this bug is available here for review:

https://gerrit.libreoffice.org/#/c/23377/
Comment 22 Commit Notification 2016-03-21 09:47:03 UTC
Marco Cecchetti committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

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

tdf#98324 - PNG prints as black block with OpenGL - fixed

It will be available in 5.1.3.

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 23 Commit Notification 2016-03-21 09:49:47 UTC
Marco Cecchetti committed a patch related to this issue.
It has been pushed to "master":

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

tdf#98324 - PNG prints as black block with OpenGL - fixed

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 2016-03-23 10:07:22 UTC
Marco Cecchetti committed a patch related to this issue.
It has been pushed to "libreoffice-5-1-2":

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

tdf#98324 - PNG prints as black block with OpenGL - fixed

It will be available in 5.1.2.

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 JohnHardy 2016-04-04 00:05:34 UTC
There still isn't a Win-64 version via the link that was provided, but I found a Pre-Release version at the following link:

http://dev-builds.libreoffice.org/pre-releases/win/x86_64/

At the top of the long list is a 64-bit version which I downloaded and installed. The version that I just installed is:

Version: 5.1.2.2 (x64)
Build ID: d3bf12ecb743fc0d20e0be0c58ca359301eb705f
CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; 
Locale: en-US (en_US)

I was able to successfully print the .png image with OpenGL turned on. Thank you.