Bug 158743 - SLIDESHOW: SVG images rendering full black/white during presentation
Summary: SLIDESHOW: SVG images rendering full black/white during presentation
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.6.4.1 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Armin Le Grand
URL:
Whiteboard: target:24.8.0 target:24.2.0.2 target:...
Keywords: bibisected, bisected, regression
: 155830 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-12-17 09:29 UTC by Maxime
Modified: 2024-01-26 09:46 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
An impress document with incorrect SVG rendering (34.34 KB, application/vnd.oasis.opendocument.presentation)
2023-12-17 09:40 UTC, Maxime
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime 2023-12-17 09:29:47 UTC
Description:
When I insert a SVG file in an .odp document all colours are correctly displayed in edit mode, but it fails to render colours in presentation mode. It is shown as either entirely white or black.
This regression appears in 7.6.X fresh branch; it worked as intended in last stable version: 7.5.9.2

Steps to Reproduce:
1. Create a new document in LibreOffice Impress
2. Go to Insert > Image on the Menu bar
3. Select an image in SVG format in the Insert Image dialog
4. Open it in the current Impress document (embedded mode)
5. Go to Slide Show > Start from First Slide on the Menu bar

Actual Results:
The SVG image appears either white (if it is white) or black (if it has colours).

Expected Results:
The SVG image in presentation mode should remain the same as in edit mode: with colours and details, not just a global shape.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: 60(Build:1)
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Debian package version: 4:7.6.4~rc1-1~bpo12+1
Calc: threaded
Comment 1 Maxime 2023-12-17 09:40:13 UTC
Created attachment 191465 [details]
An impress document with incorrect SVG rendering

An example with each step described above completed.
Comment 2 raal 2023-12-17 13:25:34 UTC
Confirm with Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 0f82e9d42822e627edd1fb3b3c87e1f8a22136a4
CPU threads: 4; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

Works in Version: 7.3.7.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 4; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: cs-CZ
Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.4
Calc: threaded
Comment 3 raal 2023-12-17 13:42:25 UTC
This seems to have begun at the below commit in bibisect repository/OS linux-64-7.6.
Adding Cc: to Armin Le Grand ; Could you possibly take a look at this one?
Thanks
 421a4d9d013bb37529ba67a472f963d3d8fe1c1e is the first bad commit
commit 421a4d9d013bb37529ba67a472f963d3d8fe1c1e
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Mon Oct 30 10:11:35 2023 +0100

    source f6c753cc0f42e94f89361b7d1c41dae069ed73aa

152392: MCGR: tdf#155437 handling of TransparencePrimitive2D for metafiles | https://gerrit.libreoffice.org/c/core/+/152392
Comment 4 Armin Le Grand 2023-12-29 15:07:44 UTC
Also in PrintPreview & ExportToPDF
Comment 5 Armin Le Grand 2023-12-29 15:09:26 UTC
Also in contextMenu/ConvertToMetafile
Comment 6 Armin Le Grand 2023-12-29 16:09:55 UTC
Seems to be an error in the preparation to Bitmap conversion in VclMetafileProcessor2D::processTransparencePrimitive2D. While for calculating the LogicRange maCurrentTransformation is used (and that is correct) it is *not* used in the embedding for calling convertToBitmapEx. It is correct to get back to logic/world coordinates for calculating the embedding, but maCurrentTransformation is needed to define the correct full embedding. I might have overlooked that because maCurrentTransformation is local to the VclMetafileProcessor2D in action right at that moment and is usually empty for simple cases, but - as can be seen - not always.
Comment 7 Armin Le Grand 2023-12-29 16:13:02 UTC
Should be fixed for all cases with https://gerrit.libreoffice.org/c/core/+/161409
Comment 8 Commit Notification 2023-12-29 19:24:46 UTC
Armin Le Grand (allotropia) committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4bea19cf84c125ab3f66dbb40d2379f2d385a865

tdf#158743 use maCurrentTransformation for embedding

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Xisco Faulí 2024-01-05 09:13:18 UTC
Verified in

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4d8b5a91a76262d6dd58342b248e542ddea1fdaf
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded

@Armin, thanks for fixing this issue!!
Comment 10 Commit Notification 2024-01-05 09:14:05 UTC
Armin Le Grand (allotropia) committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/547d19d19c757eb4ebfa2a45009d71a40d8bae53

tdf#158743 use maCurrentTransformation for embedding

It will be available in 24.2.0.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2024-01-05 09:14:08 UTC
Armin Le Grand (allotropia) committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/6abfcb0f96a0e4c138da43c9800a34dd9c2f773f

tdf#158743 use maCurrentTransformation for embedding

It will be available in 7.6.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2024-01-05 22:42:16 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/25276df12abd9d002f7f899900434617b256f745

tdf#158743: sd_png_export: Add unittest

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Maxime 2024-01-23 17:15:09 UTC
Verified in 24.2.0.2. Thanks for fixing the issue so quickly!

Version: 24.2.0.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Debian package version: 4:24.2.0~rc2-2~bpo12+1
Calc: threaded
Comment 14 Xisco Faulí 2024-01-26 09:40:27 UTC
*** Bug 155830 has been marked as a duplicate of this bug. ***