Bug 157739 - FILEOPEN PPTX: images as shape fill do not render properly, but with a different contrast
Summary: FILEOPEN PPTX: images as shape fill do not render properly, but with a differ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.6.1.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium trivial
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Impress-Images
  Show dependency treegraph
 
Reported: 2023-10-13 08:52 UTC by zarifahnaf
Modified: 2023-10-14 13:21 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
The pdf file produced by LibreOffice (17.37 MB, application/pdf)
2023-10-13 08:53 UTC, zarifahnaf
Details
The pdf file produced by Microsoft Office (1.28 MB, application/pdf)
2023-10-13 08:54 UTC, zarifahnaf
Details
Original File (2.92 MB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2023-10-13 08:54 UTC, zarifahnaf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zarifahnaf 2023-10-13 08:52:50 UTC
Description:
So if I convert a file via Microsoft Office the pdf looks different from the one produced by Libreoffice

Steps to Reproduce:
1.Open powerpoint File
2.Convert to PDF


Actual Results:
PDF should look the same as the one produced by microsoft office

Expected Results:
The PDF looks different than the one produced by MicroSoft Office


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 1 zarifahnaf 2023-10-13 08:53:30 UTC
Created attachment 190184 [details]
The pdf file produced by LibreOffice
Comment 2 zarifahnaf 2023-10-13 08:54:16 UTC
Created attachment 190185 [details]
The pdf file produced by Microsoft Office
Comment 3 zarifahnaf 2023-10-13 08:54:34 UTC
Created attachment 190186 [details]
Original File
Comment 4 m_a_riosv 2023-10-13 23:11:40 UTC
The issue is with Impress opening that file, those images renders bad. Not exporting to PDF.

But opening with PowerPoint, seems something is wrong with the contrast of those images, they render more light, but they have a negative contrast. Changing the contrast to 0, looks like in Impress.

Seems Impress import it like 0 contrast.

And there are a lot of objects of the same type with the same name.

Please, @Regina could you take a look.
Comment 5 Regina Henschel 2023-10-14 13:07:47 UTC
The objects, which render wrong, are rectangles with bitmap fill.

The values for contrast and brightness belong to the "a:lum" attribute in ooxml. They are correctly read to maBlipProps in FillProperties. But they are not evaluated in FillProperties::pushToPropMap() in https://opengrok.libreoffice.org/xref/core/oox/source/drawingml/fillproperties.cxx?r=5fd0d769#409

These values should be applied to the graphic in case XML_blipFill, but they are not. There exist no attributes for these values for the rectangle, so they have to be applied to the graphic directly. It is likely, that something similar to lclGreysScaleGraphic in line 579-580 has to be done for contrast and brightness too.