summaryrefslogtreecommitdiff
path: root/pngtrans.c
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2010-08-26 21:43:18 -0500
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2010-08-26 21:43:18 -0500
commit925d23b32a8ebc511479bd9ed46c378427aafb1b (patch)
tree82f195fc8a67c28ee38b54ca1b48784694689f1a /pngtrans.c
parent4e4876104d524d578b59be4981769edf4cce4c4d (diff)
downloadlibpng-925d23b32a8ebc511479bd9ed46c378427aafb1b.tar.gz
[devel] Conditionally compile parts of pngrtran.c and pngtrans.c
depending on PNG_16BIT_SUPPORTED
Diffstat (limited to 'pngtrans.c')
-rw-r--r--pngtrans.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pngtrans.c b/pngtrans.c
index f99459dad..240418929 100644
--- a/pngtrans.c
+++ b/pngtrans.c
@@ -241,6 +241,7 @@ png_do_invert(png_row_infop row_info, png_bytep row)
}
}
+#ifndef PNG_16BIT_SUPPORTED
else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&
row_info->bit_depth == 16)
{
@@ -255,9 +256,11 @@ png_do_invert(png_row_infop row_info, png_bytep row)
rp += 4;
}
}
+#endif
}
#endif
+#ifdef PNG_16BIT_SUPPORTED
#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
/* Swaps byte order on 16 bit depth images */
void /* PRIVATE */
@@ -280,6 +283,7 @@ png_do_swap(png_row_infop row_info, png_bytep row)
}
}
#endif
+#endif
#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED)
static PNG_CONST png_byte onebppswaptable[256] = {
@@ -626,6 +630,7 @@ png_do_bgr(png_row_infop row_info, png_bytep row)
}
}
+#ifdef PNG_16BIT_SUPPORTED
else if (row_info->bit_depth == 16)
{
if (row_info->color_type == PNG_COLOR_TYPE_RGB)
@@ -660,6 +665,7 @@ png_do_bgr(png_row_infop row_info, png_bytep row)
}
}
}
+#endif
}
}
#endif /* PNG_READ_BGR_SUPPORTED or PNG_WRITE_BGR_SUPPORTED */