Skip to content

Commit 3865e68

Browse files
fix: preserve PNG transparency in chat wallpapers
Remove .forceOpaque = true from ChooseFromFile in settings_chat.cpp, which was compositing transparent pixels against white via Opaque() for all non-JPEG files before the image reached the wallpaper pipeline.
1 parent b215e53 commit 3865e68

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Telegram/SourceFiles/settings/sections/settings_chat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ void ChooseFromFile(
707707
auto image = Images::Read({
708708
.path = result.paths.isEmpty() ? QString() : result.paths.front(),
709709
.content = result.remoteContent,
710-
.forceOpaque = true,
710+
.forceOpaque = false,
711711
}).image;
712712
if (image.isNull() || image.width() <= 0 || image.height() <= 0) {
713713
return;

0 commit comments

Comments
 (0)