From cb2913bea73e17c4628974fa5d1f652576c2b52c Mon Sep 17 00:00:00 2001
From: Bernhard Rosenkraenzer
Date: Mon, 31 Aug 2009 18:43:39 +0200
Subject: Adapt to libpng 1.4.0beta74 API change
From libpng changelog:
version 1.4.0beta74 [August 8, 2009]
Changed png_ptr and info_ptr member "trans" to "trans_alpha".
Merge-request: 1317
Reviewed-by: Thiago Macieira
---
src/gui/image/qpnghandler.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index b9dcf48..c4733cf 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -238,7 +238,11 @@ void setup_qt(QImage& image, png_structp png_ptr, png_infop info_ptr, float scre
info_ptr->palette[i].red,
info_ptr->palette[i].green,
info_ptr->palette[i].blue,
+#if PNG_LIBPNG_VER_MAJOR < 1 || (PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR < 4)
info_ptr->trans[i]
+#else
+ info_ptr->trans_alpha[i]
+#endif
)
);
i++;
--
cgit v0.12