nanogui: [PATCH] Make PNG image support compatible with modern libpng library
Subject:
[PATCH] Make PNG image support compatible with modern libpng library
From:
Daniel ####@####.####
Date:
24 Mar 2015 10:50:13 -0000
Message-Id: <1427194182-9494-1-git-send-email-daniel.nystrom@timeterminal.se>
It was never intended for png_struct to expose it's members,
and now it is fully hidden. So to get the io_ptr we have to use
the png_get_io_ptr() helper function to maintain compatibility.
Signed-off-by: Daniel Nyström ####@####.####
---
src/engine/image_png.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/engine/image_png.c b/src/engine/image_png.c
index 2212531..781b5b5 100644
--- a/src/engine/image_png.c
+++ b/src/engine/image_png.c
@@ -32,7 +32,7 @@
static void
png_read_buffer(png_structp pstruct, png_bytep pointer, png_size_t size)
{
- GdImageBufferRead(pstruct->io_ptr, pointer, size);
+ GdImageBufferRead(png_get_io_ptr(pstruct), pointer, size);
}
PSD
--
1.9.1