WPF wants to display transparent WebP images correctly

Asked 2 years ago, Updated 2 years ago, 104 views

You can now view WebP in Windows 10, but when you try to view transparent WebP in WPF, the transparent part becomes corrupted.

Is there a way to display it correctly?

Broken image

<Image Source="1_webp_a.webp"/>

We have tested the images using the Lossless and Alpha Gallery in WebP.

Development Environment - Windows 10 Pro 64bit (1809)
- VisualStudio 2017
- .NET Framework 4.7.2

.net wpf

2022-09-30 21:38

1 Answers

At the time of the question, the WebP library was probably 1.0.2 version, and when I displayed the image file without changing the vertical and horizontal sizes, the transparent part of the question was broken.
Even at this point, when I changed the vertical and horizontal sizes of the image file, it was displayed successfully.

As @nee confirmed, it was probably a bug.

The current WebP library is 1.1.0 and probably has been modified, so try it.

Entire WebP Archive
Index of downloads.webmproject.org/releases/webp
1.0.2 Version Series

libwebp-1.0.2-windows-x64-no-wic.zip 2019-01-19T07:59:14Z 4.4 MiB
libwebp-1.0.2-windows-x64-no-wic.zip.asc 2019-01-19T07:59:13Z833B
libwebp-1.0.2-windows-x64.zip 2019-01-19T07:59:14Z 3.55 MiB
libwebp-1.0.2-windows-x64.zip.asc 2019-01-19T07:59:13Z833B
libwebp-1.0.2-windows-x86-no-wic.zip 2019-01-19T07:59:14Z 3.77 MiB
libwebp-1.0.2-windows-x86-no-wic.zip.asc 2019-01-19T07:59:13Z833B
libwebp-1.0.2-windows-x86.zip 2019-01-19T07:59:14Z 3.01 MiB
libwebp-1.0.2-windows-x86.zip.asc 2019-01-19T07:59:13Z833B

1.1.0 Series

libwebp-1.1.0-windows-x64-no-wic.zip 2020-01-06T23:53:55Z4.77MiB
libwebp-1.1.0-windows-x64-no-wic.zip.asc 2020-01-06T23:53:53Z833B
libwebp-1.1.0-windows-x64.zip 2020-01-06T23:53:55Z 3.6MiB
libwebp-1.1.0-windows-x64.zip.asc 2020-01-06T23:53:53Z833B

Current version of the sample program used for verification
ImageUltimate30-day trial


2022-09-30 21:38

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.