From f9c8d5bafa4c56e3ed0732d3371e7d53f7c61326 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Fri, 26 Feb 2010 10:25:57 +0000 Subject: [PATCH] libpng-1.2.36 already needs png_set_strip_alpha git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@423 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/0e6a1e5b371962a357a40c6352bea3f3cd4cfb48 Author: Stefan Seyfried Date: 2010-02-26 (Fri, 26 Feb 2010) --- src/driver/pictureviewer/png.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/driver/pictureviewer/png.cpp b/src/driver/pictureviewer/png.cpp index a0c81e73a..38a60e664 100644 --- a/src/driver/pictureviewer/png.cpp +++ b/src/driver/pictureviewer/png.cpp @@ -78,10 +78,10 @@ int fh_png_load(const char *name,unsigned char **buffer,int* /*xp*/,int* /*yp*/) png_set_background(png_ptr, (png_color_16*)&my_background, PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); } - /* this test does not trigger for 8bit-paletted PNGs with newer libpng (1.2.40 at least), + /* this test does not trigger for 8bit-paletted PNGs with newer libpng (1.2.36 at least), but the data delivered is with alpha channel anyway, so always strip alpha for now */ -#if PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR <= 2 && PNG_LIBPNG_VER_RELEASE < 40 +#if PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR <= 2 && PNG_LIBPNG_VER_RELEASE < 36 if (color_type & PNG_COLOR_MASK_ALPHA) #endif png_set_strip_alpha(png_ptr);