diff options
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2004-09-11 21:17:42 -0500 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2011-09-03 12:23:18 -0500 |
commit | df8fc6680e8b0fbcd78a44cddb285161e3dc5225 (patch) | |
tree | c3ddc9ac1c30edbb4e10918aa2717e9bb7a774e4 /pngrtran.c | |
parent | f47b4b1bf7c6fc0a0824fad91f9dd2a80fc80c18 (diff) | |
download | libpng-df8fc6680e8b0fbcd78a44cddb285161e3dc5225.tar.gz |
[libpng10] Imported from libpng-1.0.17.tarv1.0.17
Diffstat (limited to 'pngrtran.c')
-rw-r--r-- | pngrtran.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pngrtran.c b/pngrtran.c index 7894e391e..d6c483f40 100644 --- a/pngrtran.c +++ b/pngrtran.c @@ -1,7 +1,7 @@ /* pngrtran.c - transforms the data in a row for PNG readers * - * libpng version 1.0.16 - August 15, 2004 + * libpng version 1.0.17 - September 12, 2004 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2004 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -1135,8 +1135,10 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr) (info_ptr->color_type == PNG_COLOR_TYPE_GRAY))) { info_ptr->channels++; -#if 0 /* if adding a true alpha channel not just filler */ - info_ptr->color_type |= PNG_COLOR_MASK_ALPHA; + /* if adding a true alpha channel not just filler */ +#if !defined(PNG_1_0_X) + if (png_ptr->transformations & PNG_ADD_ALPHA) + info_ptr->color_type |= PNG_COLOR_MASK_ALPHA; #endif } #endif @@ -1927,7 +1929,6 @@ png_do_read_filler(png_row_infop row_info, png_bytep row, row_info->rowbytes = row_width * 4; } } - row_info->color_type |= PNG_COLOR_MASK_ALPHA; } /* COLOR_TYPE == GRAY */ else if (row_info->color_type == PNG_COLOR_TYPE_RGB) { @@ -2012,7 +2013,6 @@ png_do_read_filler(png_row_infop row_info, png_bytep row, row_info->rowbytes = row_width * 8; } } - row_info->color_type |= PNG_COLOR_MASK_ALPHA; } /* COLOR_TYPE == RGB */ } #endif |