diff options
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2012-03-29 00:02:43 -0500 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2012-03-29 06:31:35 -0500 |
commit | b157898378385117c85de8bdfcff0c0a294ffe7c (patch) | |
tree | 14a04ac57081d3cd04af478fcb0d5e1294cf5b81 /pngrtran.c | |
parent | 7d76ba739364941aa87f57c01e2bc3e1ee301980 (diff) | |
download | libpng-b157898378385117c85de8bdfcff0c0a294ffe7c.tar.gz |
[libpng14] Imported from libpng-1.4.11.tarv1.4.11
Diffstat (limited to 'pngrtran.c')
-rw-r--r-- | pngrtran.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pngrtran.c b/pngrtran.c index f9c090be2..cdf6f1e16 100644 --- a/pngrtran.c +++ b/pngrtran.c @@ -1,8 +1,8 @@ /* pngrtran.c - transforms the data in a row for PNG readers * - * Last changed in libpng 1.4.8 [July 7, 2011] - * Copyright (c) 1998-2011 Glenn Randers-Pehrson + * Last changed in libpng 1.4.11 [March 29, 2012] + * Copyright (c) 1998-2012 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -1159,6 +1159,7 @@ png_init_read_transformations(png_structp png_ptr) #ifdef PNG_READ_SHIFT_SUPPORTED if ((png_ptr->transformations & PNG_SHIFT) && + !(png_ptr->transformations & PNG_EXPAND) && (color_type == PNG_COLOR_TYPE_PALETTE)) { png_uint_16 i; @@ -1179,6 +1180,8 @@ png_init_read_transformations(png_structp png_ptr) png_ptr->palette[i].green >>= sg; png_ptr->palette[i].blue >>= sb; } + + png_ptr->transformations &= ~PNG_SHIFT; } #endif /* PNG_READ_SHIFT_SUPPORTED */ } |