From ee55c4856a1dadde42604bb70e2950626dbcf3b2 Mon Sep 17 00:00:00 2001 From: Peter Weilbacher Date: Wed, 6 Dec 2006 07:33:26 +0100 Subject: [PATCH] Work around deprecated libpng call --- src/cairo-png.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/cairo-png.c b/src/cairo-png.c index 3b33b54..a8a06ac 100644 --- a/src/cairo-png.c +++ b/src/cairo-png.c @@ -373,7 +373,11 @@ read_png (png_rw_ptr read_func, /* expand gray bit depth if needed */ if (color_type == PNG_COLOR_TYPE_GRAY && depth < 8) +#if PNG_LIBPNG_VER >= 10209 + png_set_expand_gray_1_2_4_to_8 (png); +#else png_set_gray_1_2_4_to_8 (png); +#endif /* transform transparency to alpha */ if (png_get_valid(png, info, PNG_INFO_tRNS)) png_set_tRNS_to_alpha (png); -- 1.4.3.5