summaryrefslogtreecommitdiff
path: root/gutils
diff options
context:
space:
mode:
authorpfaedit <pfaedit>2010-04-27 15:37:09 +0000
committerpfaedit <pfaedit>2010-04-27 15:37:09 +0000
commita861d915bb4722120719b8a9c45e86b00bbfe07d (patch)
treeae0654a8913078db810c9b1574c175f9526522a0 /gutils
parent0f6aec497a01d90dca281de85d678a8b98852bba (diff)
Slight tweak to the new code to make it compile with old versions of gcc.
Diffstat (limited to 'gutils')
-rw-r--r--gutils/gimagereadpng.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gutils/gimagereadpng.c b/gutils/gimagereadpng.c
index 587050eb..7c42189e 100644
--- a/gutils/gimagereadpng.c
+++ b/gutils/gimagereadpng.c
@@ -219,12 +219,13 @@ return( NULL );
base = ret->u.image;
if ( (info_ptr->valid&PNG_INFO_tRNS) && info_ptr->num_trans>0 ) {
if ( info_ptr->color_type==PNG_COLOR_TYPE_RGB || info_ptr->color_type==PNG_COLOR_TYPE_RGB_ALPHA )
- base->trans = COLOR_CREATE(
#if ( PNG_LIBPNG_VER_MAJOR > 1 || PNG_LIBPNG_VER_MINOR > 2 )
+ base->trans = COLOR_CREATE(
(info_ptr->trans_color.red>>8),
(info_ptr->trans_color.green>>8),
(info_ptr->trans_color.blue>>8));
#else
+ base->trans = COLOR_CREATE(
(info_ptr->trans_values.red>>8),
(info_ptr->trans_values.green>>8),
(info_ptr->trans_values.blue>>8));