Bug 161833 - Wrap > Contour clips semi-transparent shadow
Summary: Wrap > Contour clips semi-transparent shadow
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.7.2 release
Hardware: All All
: medium normal
Assignee: Patrick (volunteer)
URL:
Whiteboard: target:25.2.0 target:24.2.6 target:24...
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-28 22:20 UTC by Patrick (volunteer)
Modified: 2024-07-26 23:57 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Image with semi-transparent shadow pixels are clipped when Wrap > Contour context menu is checked (687.40 KB, application/vnd.oasis.opendocument.text)
2024-06-28 22:20 UTC, Patrick (volunteer)
Details
Top half is snapshot of Microsoft Word and bottom half is snapshot of LibreOffice nightly build (380.36 KB, image/png)
2024-06-28 22:22 UTC, Patrick (volunteer)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick (volunteer) 2024-06-28 22:20:31 UTC
Created attachment 195046 [details]
Image with semi-transparent shadow pixels are clipped when Wrap > Contour context menu is checked

While testing my fix for tdf#161498 with the following, I noticed that since at least LibreOffice 7.6.7, the semi-transparent shadow that surrounds the opaque part of the following image is treated as fully transparent when the image is put within a paragraph in a Writer document and Wrap > Contour is selected from the context menu.

To reproduce this bug, open Writer in a build that has the fix for tdf#161498 and then open the attached sample document. Scroll down to the image half-way down the first page and note that the image has a jagged outer edge and the text is laid out very close to the image edge.

Then, right-click or Command-click on the image and uncheck Wrap > Contour. Note that the unwrapped image has a gray shadow around the edge. In Microsoft Word on macOS, opening the attached sample document shows the gray shadow and the text is laid out to make room for the shadow.

Interestingly, opening the attached sample document in NeoOffice 2022.7 (which is based on LibreOffice 4.4) looks similar to Microsoft Word so this used to work in LibreOffice at some point in the past.
Comment 1 Patrick (volunteer) 2024-06-28 22:22:29 UTC
Created attachment 195047 [details]
Top half is snapshot of Microsoft Word and bottom half is snapshot of LibreOffice nightly build
Comment 2 Patrick (volunteer) 2024-06-28 22:24:14 UTC
(In reply to Patrick Luby (volunteer) from comment #1)
> Created attachment 195047 [details]
> Top half is snapshot of Microsoft Word and bottom half is snapshot of
> LibreOffice nightly build

Correction: the top half is after I uncheck contour wrapping but even with contour wrapping, I see the shadow in Microsoft Word.
Comment 3 Patrick (volunteer) 2024-06-28 22:44:25 UTC
I have submitted the following patch that fixes this bug:

https://gerrit.libreoffice.org/c/core/+/169745

Note that when a document is first loaded, Writer appears to use a contour wrapped polygon saved within the document and the user must uncheck Wrap > Contour, and then check it again before Writer will recalculate the contour wrapping polygon.

Not sure if this is what we want or not. For comparison, Microsoft Word on macOS recalculates the contour wrapping polygon when the document is loaded so this bug never appears in Word with the attached sample document.
Comment 4 Commit Notification 2024-07-04 11:50:29 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3da1d8a791cff6cf2dad29b64c9ad15b1a65d5b3

tdf#161833 treat semi-transparent pixels as opaque

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 5 Commit Notification 2024-07-04 13:18:42 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/59ec65756a766720ac4fba0ac880f272ec7d19df

tdf#161833 treat semi-transparent pixels as opaque

It will be available in 24.2.6.

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 6 Commit Notification 2024-07-04 13:18:45 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/9acb4d4605411c308c8e064b4a4855615046c7f1

tdf#161833 treat semi-transparent pixels as opaque

It will be available in 24.8.0.0.beta2.

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 7 Commit Notification 2024-07-10 08:39:37 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "libreoffice-24-2-5":

https://git.libreoffice.org/core/commit/ae7fcb6492b5d6a701ffbcde2edb52b49141eb4e

tdf#161833 treat semi-transparent pixels as opaque

It will be available in 24.2.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 8 Commit Notification 2024-07-17 19:37:05 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ee76e5041c79843ef0942c6427d4cd3717820ff6

tdf#162062 only apply fix for tdf#161833 if there is a palette

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 9 Commit Notification 2024-07-23 12:01:34 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/69e84cd448e359bf63ead6ed647c380b6ddc2c6c

tdf#162062 only apply fix for tdf#161833 if there is a palette

It will be available in 24.8.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 10 Commit Notification 2024-07-26 23:57:03 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/796a3e836e5c2379b22e6b73aba5986f406d8c38

tdf#162062 only apply fix for tdf#161833 if there is a palette

It will be available in 24.2.6.

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.