From 2d378775fcce9dfd765560340e22ff30bda74f4b Mon Sep 17 00:00:00 2001 From: Mike Sperber Date: Thu, 16 Sep 2010 18:15:32 +0200 Subject: [PATCH] Unbreak compile for new libpng. From: Mariusz Ceier http://lists.racket-lang.org/dev/archive/2010-September/004328.html --- src/wxcommon/wxJPEG.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wxcommon/wxJPEG.cxx b/src/wxcommon/wxJPEG.cxx index 053a3ee440..a13d7601b7 100644 --- a/src/wxcommon/wxJPEG.cxx +++ b/src/wxcommon/wxJPEG.cxx @@ -726,7 +726,11 @@ int wx_read_png(char *file_name, wxBitmap *bm, int w_mask, wxColour *bg) png_set_strip_16(png_ptr); /* Expand grayscale images to the full 8 bits from 1, 2, or 4 bits/pixel */ +#if PNG_LIBPNG_VER >= 10400 + png_set_expand_gray_1_2_4_to_8(png_ptr); +#else png_set_gray_1_2_4_to_8(png_ptr); +#endif } /* Set the background color to draw transparent and alpha images over.