Bug 160960 - Conversion from PPT(X) to PDF via LibreOffice Headless distorts background color (gradient)
Summary: Conversion from PPT(X) to PDF via LibreOffice Headless distorts background co...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
7.5.9.2 release
Hardware: All Linux (All)
: medium trivial
Assignee: Not Assigned
URL: https://ask.libreoffice.org/t/powerpo...
Whiteboard:
Keywords:
Depends on:
Blocks: Impress-Gradient
  Show dependency treegraph
 
Reported: 2024-05-06 12:39 UTC by florian
Modified: 2024-05-24 03:17 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Test Powerpoint Document (35.41 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2024-05-06 12:41 UTC, florian
Details
Refrence Picture Colors Result PDF (142.00 KB, image/jpeg)
2024-05-06 12:41 UTC, florian
Details
Refrence Picture Colors Source PPTX (68.99 KB, image/jpeg)
2024-05-06 12:42 UTC, florian
Details
Compare 2-stop with 3-stop gradient in pptx (19.50 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2024-05-12 23:42 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description florian 2024-05-06 12:39:14 UTC
Description:
Conversion of PPTX files with a colored background to PDF shows a clearly visible shift in colors as if color space have been set wrong. 
There are no settings available to prevent this.

Tested on macOS (ARM), Linux (x86 and ARM)

Steps to Reproduce:
1. Create a PowerPoint Presentation with a Color-gradient background
2. Convert with `libreoffice --headless --convert-to pdf gradient_test.pptx`
3. See the difference in colors

Actual Results:
Colours are off and segmented in bars. Looks like some colorspace conversion I cannot control

Expected Results:
Same colors and gradients


Reproducible: Always


User Profile Reset: No

Additional Info:
See my Forum post for Example files and pictures :) 
https://ask.libreoffice.org/t/powerpoint-to-pdf-conversion-changes-colors/105199
Comment 1 florian 2024-05-06 12:41:20 UTC
Created attachment 193997 [details]
Test Powerpoint Document
Comment 2 florian 2024-05-06 12:41:48 UTC
Created attachment 193998 [details]
Refrence Picture Colors Result PDF
Comment 3 florian 2024-05-06 12:42:25 UTC
Created attachment 193999 [details]
Refrence Picture Colors Source PPTX
Comment 4 Regina Henschel 2024-05-12 23:42:02 UTC
Created attachment 194096 [details]
Compare 2-stop with 3-stop gradient in pptx

The interpolation of a two-stop-color gradient is different to a three-stop-color gradient in MS Office even if the third stop is at the same place and has the same color as the start or end stop of the two-stop-color gradient. MS Office seems to use a somehow quadratic interpolation in the two-stops-color gradient case.

Open attached document in PowerPoint. It has in the middle a rectangle with two-stop-color gradient and below it a rectangle with three-stop-color gradient. Above is a screenshot of the two rectangles as rendered in PowerPoint.
Then open the file in LibreOffice.

LibreOffice has only linear color interpolation, same as MS Office uses, if three or more stops are present.

So when you want the color interpolation to be the same in LibreOffice as in MS Office, you have to use at least three color stops in MS Office.

I have added a screenshot to the file, because MS Office does not export the two-stop-color interpolation the same way to png as it renders it.
Comment 5 Stéphane Guillou (stragu) 2024-05-21 23:42:29 UTC
Florian, can you please clarify:
- was the file created with MS PowerPoint or LibreOffice?
- are you comparing LO's PDF export with the document opened in LO? Or with the document opened in MS Office? Or with the MS Office PDF export?

@Regina: I'd go with your recommendation as to how to triage this report, you know infinitely more than most on the topic.

Thank you!
Comment 6 florian 2024-05-23 21:37:29 UTC
Hi!

I am converting a Powerpoint File (made with Powerpoint) to PDF with the help of Libre Office. 

And I am comparing MSOffice's view with the PDF. 

Libre Office is only used as conversion tool in this workflow :)
Comment 7 QA Administrators 2024-05-24 03:17:41 UTC Comment hidden (obsolete)