Bug 142722 - [WMF] BitBlt is wrong and StretchBlt is not implemented
Summary: [WMF] BitBlt is wrong and StretchBlt is not implemented
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Bartosz
URL:
Whiteboard: target:7.2.0
Keywords:
Depends on:
Blocks: EMF-WMF
  Show dependency treegraph
 
Reported: 2021-06-08 21:25 UTC by Valek Filippov
Modified: 2024-04-11 23:09 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
WMF sample with StretchBlt with bitmap (484 bytes, image/x-wmf)
2021-06-08 21:26 UTC, Valek Filippov
Details
How it should look like (1007 bytes, image/png)
2021-06-08 21:27 UTC, Valek Filippov
Details
WMF BitBlt with 32bpp bitmap (480 bytes, image/x-wmf)
2021-06-08 21:31 UTC, Valek Filippov
Details
How BitBlt with 32bpp bitmap should look like (520 bytes, image/png)
2021-06-08 21:33 UTC, Valek Filippov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Valek Filippov 2021-06-08 21:25:05 UTC
Description:
LO doesn't support WMF StretchBlt MR and shows nothing.

Steps to Reproduce:
Open attached WMF sample.

Actual Results:
LO shows empty object.

Expected Results:
It should show a small rectangle filled with color gradient.


Reproducible: Always


User Profile Reset: No



Additional Info:
tdf#142708 has a sample of StretchBlt variant w/o bitmap.
Comment 1 Valek Filippov 2021-06-08 21:26:04 UTC
Created attachment 172712 [details]
WMF sample with StretchBlt with bitmap
Comment 2 Valek Filippov 2021-06-08 21:27:33 UTC
Created attachment 172713 [details]
How it should look like
Comment 3 Valek Filippov 2021-06-08 21:31:44 UTC
Created attachment 172714 [details]
WMF BitBlt with 32bpp bitmap

Looks like BitBlt implementation of "with bitmap" variant is also incomplete.
It seems to have incorrect support for 1bpp bitmaps only.
Comment 4 Valek Filippov 2021-06-08 21:33:29 UTC
Created attachment 172715 [details]
How BitBlt with 32bpp bitmap should look like
Comment 5 raal 2021-06-08 22:00:30 UTC
Confirm with Version: 7.2.0.0.alpha1+ / LibreOffice Community
Build ID: ec629c5ee22d02f99d66a5cf975ce239876b7f4d
CPU threads: 4; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 6 Commit Notification 2021-06-09 18:20:51 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/01ded1e6d362dbcd7148334c6965d6ad00981d4a

WMF tdf#55058 tdf#142722 Add implementation of BitBlt and StretchBlt

It will be available in 7.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.