[gtk/test-coverage: 3/7] png loader: gray can have alpha
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/test-coverage: 3/7] png loader: gray can have alpha
- Date: Sat, 16 Jul 2022 13:44:04 +0000 (UTC)
commit 14cb208ec209a944226709dea42788c043eb7982
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jul 15 23:07:59 2022 -0400
png loader: gray can have alpha
gdk/loaders/gdkpng.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gdk/loaders/gdkpng.c b/gdk/loaders/gdkpng.c
index 20711210d0..c049868caf 100644
--- a/gdk/loaders/gdkpng.c
+++ b/gdk/loaders/gdkpng.c
@@ -184,7 +184,8 @@ gdk_load_png (GBytes *bytes,
if (color_type == PNG_COLOR_TYPE_PALETTE)
png_set_palette_to_rgb (png);
- if (color_type == PNG_COLOR_TYPE_GRAY)
+ if (color_type == PNG_COLOR_TYPE_GRAY ||
+ color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
png_set_expand_gray_1_2_4_to_8 (png);
if (png_get_valid (png, info, PNG_INFO_tRNS))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]