diff options
author | John Bowler <jbowler@acm.org> | 2015-03-22 19:42:14 -0500 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2015-03-22 19:42:14 -0500 |
commit | 6eecfe38864a3596fe8fbbe400c6cb6111117d18 (patch) | |
tree | 7df16019878dbd352563e85b4d124a9c311a2307 /pngread.c | |
parent | b383798ac9d7d320849293563e4670527750b857 (diff) | |
download | libpng-6eecfe38864a3596fe8fbbe400c6cb6111117d18.tar.gz |
[libpng16] Fixed simplified 8-bit-linear to sRGB alpha. The calculated alpha
value was wrong. It's not clear if this affected the final stored
value; in the obvious code path the upper and lower 8-bits of the
alpha value were identical and the alpha was truncated to 8-bits
rather than dividing by 257 (John Bowler).
Diffstat (limited to 'pngread.c')
-rw-r--r-- | pngread.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1823,6 +1823,7 @@ png_create_colormap_entry(png_image_read_control *display, y = (y + 128) >> 8; y *= 255; y = PNG_sRGB_FROM_LINEAR((y + 64) >> 7); + alpha = PNG_DIV257(alpha); encoding = P_sRGB; } |