Commit 2db98792 authored by Michael Natterer's avatar Michael Natterer 😴

Bug 607242 - GIMP 2.7.0 fails to build against libpng 1.4.0

Depend on the libpng version that is in debian testing (1.2.42) and
use png_set_expand_gray_1_2_4_to_8() instead of the deprecated
png_set_gray_1_2_4_to_8().
parent a6d052f7
......@@ -60,6 +60,7 @@ m4_define([dbus_glib_required_version], [0.70])
m4_define([libhal_required_version], [0.5.7])
m4_define([exif_required_version], [0.6.15])
m4_define([lcms_required_version], [1.16])
m4_define([libpng_required_version], [1.2.42])
AC_INIT([GIMP], [gimp_version],
......@@ -1133,7 +1134,7 @@ AC_ARG_WITH(libpng, [ --without-libpng build without PNG support])
have_libpng=no
if test "x$with_libpng" != xno; then
have_libpng=yes
PKG_CHECK_MODULES(PNG, libpng,
PKG_CHECK_MODULES(PNG, libpng >= libpng_required_version,
FILE_PNG='file-png$(EXEEXT)',
[have_libpng="no (libpng not found)"
AC_MSG_ERROR([
......
......@@ -286,14 +286,14 @@ ico_read_png (FILE *fp,
switch (color_type)
{
case PNG_COLOR_TYPE_GRAY:
png_set_gray_1_2_4_to_8 (png_ptr);
png_set_expand_gray_1_2_4_to_8 (png_ptr);
if ( bit_depth == 16 )
png_set_strip_16 (png_ptr);
png_set_gray_to_rgb (png_ptr);
png_set_add_alpha (png_ptr, 0xff, PNG_FILLER_AFTER);
break;
case PNG_COLOR_TYPE_GRAY_ALPHA:
png_set_gray_1_2_4_to_8 (png_ptr);
png_set_expand_gray_1_2_4_to_8 (png_ptr);
if ( bit_depth == 16 )
png_set_strip_16 (png_ptr);
png_set_gray_to_rgb (png_ptr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment