nanogui: [PATCH] Make PNG image support compatible with modern libpng library
Subject:
Re: [PATCH] Make PNG image support compatible with modern libpng library
From:
LM ####@####.####
Date:
24 Mar 2015 13:48:21 -0000
Message-Id: <CAFipMOHiJU2Q=_+_d2asQoKeh8tgaiqE_o4tETyC46QmjsYycg@mail.gmail.com>
Wouldn't it be safer to use something like the following code, just in
case some users are still working with an old version of libpng? That
way it works for everyone.
#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
GdImageBufferRead(png_get_io_ptr(pstruct), pointer, size);
#else
GdImageBufferRead(pstruct->io_ptr, pointer, size);
#endif