[cairo-commit] 3 commits - src/cairo-png.c

Peter Weilbacher pmw at kemper.freedesktop.org
Mon Apr 23 14:27:29 PDT 2007


 src/cairo-png.c |    4 ++++
 1 files changed, 4 insertions(+)

New commits:
diff-tree ac0ef0302e68ba17ec5a59c689579f1854c7386c (from parents)
Merge: d3cf2144dbd42737d5e2c45908fbca082dd54022 260dcb316e14945e7600406954e4876e8827a777
Author: Peter Weilbacher <mozilla at weilbacher.org>
Date:   Mon Apr 23 23:18:05 2007 +0200

    Merge branch 'master' of git+ssh://pmw@git.freedesktop.org/git/cairo

diff-tree d3cf2144dbd42737d5e2c45908fbca082dd54022 (from parents)
Merge: 6c129611408ddb5cf0a9a821b30bbb8148af08d9 abdcbf896af69677058490d1d08ba58672c429ec
Author: Peter Weilbacher <mozilla at weilbacher.org>
Date:   Sat Apr 21 13:50:30 2007 +0200

    Merge branch 'master' of git+ssh://pmw@git.freedesktop.org/git/cairo

diff-tree 6c129611408ddb5cf0a9a821b30bbb8148af08d9 (from 735be3f09d1d150909305ff3232fda42efcb87bd)
Author: Peter Weilbacher <mozilla at weilbacher.org>
Date:   Sat Apr 21 13:49:04 2007 +0200

    Use deprecated png symbol only when compiling against old version
    
    png_set_gray_1_2_4_to_8 is deprecated in libpng >= 1.2.9, the identical
    substitute for it is png_set_expand_gray_1_2_4_to_8

diff --git a/src/cairo-png.c b/src/cairo-png.c
index 7422622..24b6ba6 100644
--- a/src/cairo-png.c
+++ b/src/cairo-png.c
@@ -379,7 +379,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);


More information about the cairo-commit mailing list