Bug 162815 - Images (BMP?) in Writer document not (all) correct in export to PDF (Windows and macOS)
Summary: Images (BMP?) in Writer document not (all) correct in export to PDF (Windows ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.2.0 target:24.8.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2024-09-05 16:34 UTC by alessandro
Modified: 2024-11-26 18:28 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Demo document (58.98 KB, application/pdf)
2024-09-05 18:13 UTC, BogdanB
Details
File that replicate error (171.35 KB, application/x-zip-compressed)
2024-09-06 10:01 UTC, alessandro
Details
screenshot (106.74 KB, image/png)
2024-09-08 10:44 UTC, BogdanB
Details
screenshot for PDF (97.80 KB, image/png)
2024-09-08 10:45 UTC, BogdanB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alessandro 2024-09-05 16:34:07 UTC
Description:
Hi,
when I export a writer document in the pdf format of files with inserted or linked bmp images, in the pdf file the bmp images appear as black pages.
The latest version that does not have this problem is 7.5.9.2

I tried the latest version today (24.2.6) and the same problem still occurs. I reinstalled version 7.5.9.2 and the pdf file is complete with images

Steps to Reproduce:
1.create a file write
2.insert or collegate a image in bmp format
3.export in pdf format

Actual Results:
The image appears as a black rectangle

Expected Results:
displaying the image in the pdf file


Reproducible: Always


User Profile Reset: No

Additional Info:
I have performed the tests only with bmp images in b\n format with a resolution of 200 pixels/inch, obtained from LibreOffice Draw
Comment 1 BogdanB 2024-09-05 18:13:35 UTC
Created attachment 196265 [details]
Demo document

Working well exporting with
Version: 24.8.1.1 (X86_64) / LibreOffice Community
Build ID: ef51c4a0cd35185debf25ad9d0db6a1c14bed5a0
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded

Working well with
Version: 7.3.7.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: ro-RO
Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.6
Calc: threaded
Comment 2 BogdanB 2024-09-05 18:14:48 UTC
Can you create a demo document that is creating you problems? With a simple bmp (created from Draw) file included into a odt file?
Comment 3 alessandro 2024-09-06 10:01:45 UTC
Created attachment 196274 [details]
File that replicate error

Hi BogdanB,
I created a file with the latest version of LO (24.2.6) by importing 3 different bmp images into the odt file. One made with Corel Draw, one with LO latest version and one with LO with version 7.5.9.2.
In the file "EXAMPLE last version LO" there are the comments of the various imported examples.
Comment 4 BogdanB 2024-09-08 10:44:09 UTC
Created attachment 196310 [details]
screenshot

I see all 3 images in LibreOffice, and also after exporting to PDF. See screenshot.
Comment 5 BogdanB 2024-09-08 10:45:22 UTC
Also a screenshot for the PDF generated with
Version: 24.8.1.1 (X86_64) / LibreOffice Community
Build ID: ef51c4a0cd35185debf25ad9d0db6a1c14bed5a0
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 6 BogdanB 2024-09-08 10:45:45 UTC
Created attachment 196311 [details]
screenshot for PDF
Comment 7 alessandro 2024-09-08 13:23:34 UTC
What tests do you suggest I do to solve the problem? The problem occurs with LO installed in Win 10.

Do you see the pdf file I sent you correctly?

I forgot to point out that even when printing I get a completely black print.
Comment 8 alessandro 2024-09-08 13:48:27 UTC
I tried on pc with win 11 but the problem is the same
Comment 9 BogdanB 2024-09-08 13:57:05 UTC
I'm using Linux, lets wait for someone with Windows to test and confirm this bug. What you can do meanwhile is to reset LibreOffice: Go to Help - Restart in Safe Mode and choose the 2 options from Reset to Factory Settings. And please test again after this.
Comment 10 alessandro 2024-09-09 07:35:48 UTC
I make the reset following your instruction, but the export not work fine
Comment 11 BogdanB 2024-09-09 10:41:49 UTC
Ok. We need to wait for some other testers to see if someone else can reproduce your problem.
Comment 12 Telesto 2024-09-09 14:28:57 UTC
Confirm; same issue as comment 0

1. I opened "EXAMPLE last version LO.odt"
2. Exported it to PDF
3. Opened the file with 
A) Chromium webbrowser
B. LibreOffice

Both show black square on page 1 and 3

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c52f139b4f7140033144dde29f70a39ebedb6aa0
CPU threads: 4; OS: Windows 8.1 X86_64 (6.3 build 9600); UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: nl-NL
Calc: CL threaded

same issue with
Version: 7.6.3.0.0+ (X86_64) / LibreOffice Community
Build ID: 35f19e5cb93ce218787904e99c2bedfd40e725cc
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded

exported PDF fine with
Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 4bb730be0909d9cf55b7a44d7e916aa5de16b9f7
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 13 BogdanB 2024-09-09 15:17:08 UTC
Telesto, it seems a Windows only bug.
Comment 14 BogdanB 2024-09-10 07:59:06 UTC
I reproduce on Windows, on page 1 and 3.
Version: 24.8.1.1 (X86_64) / LibreOffice Community
Build ID: ef51c4a0cd35185debf25ad9d0db6a1c14bed5a0
CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: ro-RO (en_US); UI: en-US
Calc: threaded
Comment 15 Chika 2024-11-24 08:50:24 UTC
Hello,

I have used git bisect to identify the range of commits where the issue occurs in LibreOffice when opening the document EXAMPLE last version LO.odt and exporting it to PDF. The image that should appear in the document turns into a black square after exporting to PDF.

The issue occurs in the following commits:

• Commit 1: 13a9d32cd1d6f8f95efbea5f6a85d50159d3baaa >> (Observed crash upon opening - The crash happens when trying to open the document. I couldn't proceed with exporting to PDF in this case because LibreOffice crashes immediately after opening.)
• Commit 2: b50d9685e8bbb9549e68e3ff0a1b625fa44e6907
• Commit 3: 55eabf68ff48762d620b69daefd4116c2023cb0c
• Commit 4: bb9594a3b6d9c71fb2d817291ca7e02470cccd11
• Commit 5: 743713648e1abc124fc5783f3ea6a20b7d73701d
• Commit 6: a54172be5a8ec756586fbb5c463364e084aac079
• Commit 7: 21734247d58a6e915b058d8fa55ece949d049613

Environment: 
• LibreOffice version: 7.6
• OS: macOS
• Git version: 2.47.0

If needed, I can provide more details about my environment or specific tests I performed.

Sincerely,

Chika
Comment 16 Chika 2024-11-26 09:28:41 UTC
Comment Update:
The cause is identified as 21734247d58a6e915b058d8fa55ece949d049613.
Comment 17 Commit Notification 2024-11-26 16:29:25 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/668dbfd99ada1888d5919cffedcfd7486c101717

tdf#162815 Greyscale images not corrrectly exported to PDF

It will be available in 25.2.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 18 Commit Notification 2024-11-26 18:28:48 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/0edf32e4c6832b9e2c5a0306ae0088fb25d44cc0

tdf#162815 Greyscale images not corrrectly exported to PDF

It will be available in 24.8.4.

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.