Updates for libpng-1.4
Signed-off-by: Geoff Levand <geoff@infradead.org>
diff --git a/configure.ac b/configure.ac
index 3cf1496..9cd4c65 100644
--- a/configure.ac
+++ b/configure.ac
@@ -119,7 +119,7 @@
if test "x$twin_png" = "xyes"
then
- PKG_CHECK_MODULES(PNG, libpng12, twin_png="yes", twin_png="no")
+ PKG_CHECK_MODULES(PNG, libpng, twin_png="yes", twin_png="no")
fi
AC_SUBST(PNG_CFLAGS)
diff --git a/libtwin/twin_png.c b/libtwin/twin_png.c
index 0135ddc..10a0dc9 100644
--- a/libtwin/twin_png.c
+++ b/libtwin/twin_png.c
@@ -105,7 +105,7 @@
DEBUG("reading picture infos ...\n");
png_read_info(png, info);
png_get_IHDR(png, info, &width, &height, &depth, &ctype, &interlace,
- int_p_NULL, int_p_NULL);
+ NULL, NULL);
DEBUG(" 1- size/depth/ctype/int = %ldx%ld/%d/%d/%d\n",
width, height, depth, ctype, interlace);
@@ -115,12 +115,12 @@
if (ctype == PNG_COLOR_TYPE_PALETTE)
png_set_palette_to_rgb(png);
if (ctype == PNG_COLOR_TYPE_GRAY && depth < 8)
- png_set_gray_1_2_4_to_8(png);
+ png_set_expand_gray_1_2_4_to_8(png);
if (png_get_valid(png, info, PNG_INFO_tRNS))
png_set_tRNS_to_alpha(png);
png_get_IHDR(png, info, &width, &height, &depth, &ctype, &interlace,
- int_p_NULL, int_p_NULL);
+ NULL, NULL);
DEBUG(" 2- size/depth/ctype/int = %ldx%ld/%d/%d/%d\n",
width, height, depth, ctype, interlace);
@@ -143,7 +143,7 @@
png_set_gray_to_rgb(png);
png_get_IHDR(png, info, &width, &height, &depth, &ctype,
- &interlace, int_p_NULL, int_p_NULL);
+ &interlace, NULL, NULL);
DEBUG(" 3- size/depth/ctype/int = %ldx%ld/%d/%d/%d\n",
width, height, depth, ctype, interlace);
@@ -178,7 +178,7 @@
fail_free:
if (rowp)
free(rowp);
- png_destroy_read_struct(&png, &info, png_infopp_NULL);
+ png_destroy_read_struct(&png, &info, NULL);
fail_close:
close(fd);
fail: