Bug 157570 - FILEOPEN: Image is no visible
Summary: FILEOPEN: Image is no visible
Status: RESOLVED DUPLICATE of bug 157636
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Patrick Luby (volunteer)
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2023-10-03 11:09 UTC by Xisco Faulí
Modified: 2023-10-12 04:19 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Comparsion MSO vs LibreOffice 24.2 master (699.44 KB, image/png)
2023-10-03 11:09 UTC, Xisco Faulí
Details
another document where the background is not displayed (422.50 KB, application/msword)
2023-10-04 12:19 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2023-10-03 11:09:18 UTC
Created attachment 189972 [details]
Comparsion MSO vs LibreOffice 24.2 master

Steps to reproduce:
1. Open attachment 49470 [details] from bug 37192

-> The logo in the top right corner of the first page is not displayed. See comparison

Reproduced in

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

[Bug found by office-interoperability-tools]
Comment 1 Xisco Faulí 2023-10-03 11:10:12 UTC
Regression introduced by:

author	Noel Grandin <noelgrandin@gmail.com>	2021-04-16 20:33:10 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2023-07-25 08:38:12 +0200
commit 81994cb2b8b32453a92bcb011830fcb884f22ff3 (patch)
tree ae1750e92421ad2e0ec3f50351c3be6581841598
parent dabedcaf27b0af1e38a611b8d8e48444f848e01d (diff)
Convert internal vcl bitmap formats transparency->alpha (II)

Bisected with: bibisect-linux64-24.2

Adding Cc: to Noel Grandin
Comment 2 Patrick Luby (volunteer) 2023-10-03 13:06:21 UTC
Is it possible to attach the .odp file?
Comment 3 Xisco Faulí 2023-10-03 13:28:53 UTC
(In reply to Patrick Luby from comment #2)
> Is it possible to attach the .odp file?

Hi Patrick,
Which .odp file do you mean ?
Comment 4 Patrick Luby (volunteer) 2023-10-03 13:31:51 UTC
(In reply to Xisco Faulí from comment #3)
> Hi Patrick,
> Which .odp file do you mean ?

The source file that you opened (.odp or .pptx?) when you took the attached screen snapshot.

I am hoping to reproduce the bug in my local build.
Comment 5 Xisco Faulí 2023-10-03 13:35:12 UTC
(In reply to Patrick Luby from comment #4)
> (In reply to Xisco Faulí from comment #3)
> > Hi Patrick,
> > Which .odp file do you mean ?
> 
> The source file that you opened (.odp or .pptx?) when you took the attached
> screen snapshot.
> 
> I am hoping to reproduce the bug in my local build.

it's not a .odp file but a .doc file. Read the description above:

Steps to reproduce:
1. Open attachment 49470 [details] from bug 37192
Comment 6 Patrick Luby (volunteer) 2023-10-03 13:57:44 UTC
(In reply to Xisco Faulí from comment #5)
> it's not a .odp file but a .doc file. Read the description above:
> 
> Steps to reproduce:
> 1. Open attachment 49470 [details] from bug 37192

Thanks, I see the link now.

I can reproduce this bug on macOS with Skia/Metal, Skia/Raster, and Skia disabled. The image is getting loaded as I can see a very faint rendering of the image if I set the image's background fill to white.

I don't see any special settings for the image so I am guessing we just need an AlphaMask::Invert() to turn the very faint rendering to nearly opaque. I will try to find where this image is drawn in the LibreOffice code.
Comment 7 Patrick Luby (volunteer) 2023-10-03 18:14:09 UTC
Note for myself: the image doesn't appear regardless of whether the document is printed or exported to PDF. Usually, those are separate drawing paths so I am guessing that, in this particular case, the bug is occurring during or very soon after loading the .png instead of when it is drawn.
Comment 8 Xisco Faulí 2023-10-04 12:19:36 UTC
Created attachment 190001 [details]
another document where the background is not displayed
Comment 9 Patrick Luby (volunteer) 2023-10-10 13:08:46 UTC
This bug appears to be a duplicate of https://bugs.documentfoundation.org/show_bug.cgi?id=157636.
Comment 10 Patrick Luby (volunteer) 2023-10-11 14:06:32 UTC
Closing as a duplicate as the patch in https://bugs.documentfoundation.org/show_bug.cgi?id=157636#c9 also fixes this bug.

*** This bug has been marked as a duplicate of bug 157636 ***