diff options
author | John Bowler <jbowler@acm.org> | 2011-09-09 17:21:44 -0500 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2011-09-09 17:21:44 -0500 |
commit | 751561218ffa1cfdd60a83236642a8e16f071130 (patch) | |
tree | 966755b0c694f8d4ab59c1b077964f4848f4e3ed /png.h | |
parent | f0c19e6455d54340949ec9f85c9b386225bbbee0 (diff) | |
download | libpng-751561218ffa1cfdd60a83236642a8e16f071130.tar.gz |
[libpng15] Constant changes for 64-bit compatibility (removal of L suffixes).
The 16-bit cases still use "L" as we don't have a 16-bit test system.
Diffstat (limited to 'png.h')
-rw-r--r-- | png.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -2515,14 +2515,14 @@ PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type, { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) \ * (png_uint_16)(alpha) \ + (png_uint_16)(bg)*(png_uint_16)(255 \ - - (png_uint_16)(alpha)) + (png_uint_16)128); \ + - (png_uint_16)(alpha)) + 128); \ (composite) = (png_byte)((temp + (temp >> 8)) >> 8); } # define png_composite_16(composite, fg, alpha, bg) \ { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) \ * (png_uint_32)(alpha) \ - + (png_uint_32)(bg)*(png_uint_32)(65535L \ - - (png_uint_32)(alpha)) + (png_uint_32)32768L); \ + + (png_uint_32)(bg)*(65535 \ + - (png_uint_32)(alpha)) + 32768); \ (composite) = (png_uint_16)((temp + (temp >> 16)) >> 16); } #else /* Standard method using integer division */ @@ -2530,12 +2530,12 @@ PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type, # define png_composite(composite, fg, alpha, bg) \ (composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) + \ (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \ - (png_uint_16)127) / 255) + 127) / 255) # define png_composite_16(composite, fg, alpha, bg) \ (composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \ - (png_uint_32)(bg)*(png_uint_32)(65535L - (png_uint_32)(alpha)) + \ - (png_uint_32)32767) / (png_uint_32)65535L) + (png_uint_32)(bg)*(png_uint_32)(65535 - (png_uint_32)(alpha)) + \ + 32767) / 65535) #endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */ #ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED |