summaryrefslogtreecommitdiff
path: root/png.h
diff options
context:
space:
mode:
authorJohn Bowler <jbowler@acm.org>2011-09-09 17:21:44 -0500
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2011-09-09 17:21:44 -0500
commit751561218ffa1cfdd60a83236642a8e16f071130 (patch)
tree966755b0c694f8d4ab59c1b077964f4848f4e3ed /png.h
parentf0c19e6455d54340949ec9f85c9b386225bbbee0 (diff)
downloadlibpng-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.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/png.h b/png.h
index bf557f43a..6fe0a04bf 100644
--- a/png.h
+++ b/png.h
@@ -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