summaryrefslogtreecommitdiff
path: root/png.h
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>1999-10-12 17:36:36 -0500
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2009-04-06 16:04:40 -0500
commit33b25bf1a845317f15534da29f291e983c918ef4 (patch)
tree6b9b3d12f45e9c12461273df01922e11a2b24320 /png.h
parent18c415f5b5543a4d01567a379591738783db343b (diff)
downloadlibpng-33b25bf1a845317f15534da29f291e983c918ef4.tar.gz
Imported from libpng-1.0.4f.tarv1.0.4f
Diffstat (limited to 'png.h')
-rw-r--r--png.h55
1 files changed, 34 insertions, 21 deletions
diff --git a/png.h b/png.h
index bd86eef3d..d3ab30e7e 100644
--- a/png.h
+++ b/png.h
@@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
- * libpng version 1.0.4e - October 10, 1999
+ * libpng version 1.0.4f - October 12, 1999
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, 1999 Glenn Randers-Pehrson
@@ -9,19 +9,19 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.89c, May 1996: Guy Schalnat
* libpng versions 0.90, December 1996, through 0.96, May 1997: Andreas Dilger
- * libpng versions 0.97, January 1998, through 1.0.4e - October 10, 1999: Glenn
+ * libpng versions 0.97, January 1998, through 1.0.4f - October 12, 1999: Glenn
* See also "Contributing Authors", below.
*
* Y2K compliance in libpng:
* =========================
*
- * October 10, 1999
+ * October 12, 1999
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
*
* This is your unofficial assurance that libpng from version 0.71 and
- * upward through 1.0.4e are Y2K compliant. It is my belief that earlier
+ * upward through 1.0.4f are Y2K compliant. It is my belief that earlier
* versions were also Y2K compliant.
*
* Libpng only has three year fields. One is a 2-byte unsigned integer
@@ -95,7 +95,7 @@
* 1.0.3 1.0.3 10003 2.1.0.3
* 1.0.3a-d 1.0.3a-d 10004 2.1.0.3a-d
* 1.0.4 1.0.4 10004 2.1.0.4
- * 1.0.4a-e 1.0.4a-e 10005 2.1.0.4a-e
+ * 1.0.4a-f 1.0.4a-f 10005 2.1.0.4a-f
* 1.0.5 1.0.5 10005 2.1.0.5
*
* Henceforth the source version will match the shared-library minor
@@ -109,7 +109,9 @@
* See libpng.txt or libpng.3 for more information. The PNG specification
* is available as RFC 2083 <ftp://ftp.uu.net/graphics/png/documents/>
* and as a W3C Recommendation <http://www.w3.org/TR/REC.png.html>
- *
+ */
+
+/*
* COPYRIGHT NOTICE:
*
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
@@ -117,7 +119,7 @@
* Copyright (c) 1996, 1997 Andreas Dilger
* (libpng versions 0.90, December 1996, through 0.96, May 1997)
* Copyright (c) 1998, 1999 Glenn Randers-Pehrson
- * (libpng versions 0.97, January 1998, through 1.0.4e, October 10, 1999)
+ * (libpng versions 0.97, January 1998, through 1.0.4f, October 12, 1999)
*
* For the purposes of this copyright and license, "Contributing Authors"
* is defined as the following set of individuals:
@@ -168,7 +170,16 @@
*/
/*
- *
+ * A "png_get_copyright" function is available, for convenient use in "about"
+ * boxes and the like:
+ *
+ * printf("%s",png_get_copyright(NULL));
+ *
+ * Also, the PNG logo (in PNG format, of course) is supplied in the
+ * file "pngnow.png".
+ */
+
+/*
* Libpng is OSI Certified Open Source Software. OSI Certified is a
* certification mark of the Open Source Initiative.
*/
@@ -208,7 +219,7 @@ extern "C" {
*/
/* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.0.4e"
+#define PNG_LIBPNG_VER_STRING "1.0.4f"
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
* We must not include leading zeros.
@@ -806,9 +817,9 @@ struct png_struct_def
};
/* This prevents a compiler error in png_get_copyright() in png.c if png.c
-and png.h are both at * version 1.0.4e
+and png.h are both at * version 1.0.4f
*/
-typedef png_structp version_1_0_4e;
+typedef png_structp version_1_0_4f;
typedef png_struct FAR * FAR * png_structpp;
@@ -1624,12 +1635,14 @@ extern PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp png_ptr)
#ifdef PNG_NO_EXTERN
/* this only gets included in png.c */
-png_charp
-png_get_header_version(png_structp png_ptr)
-{
- if(png_ptr == NULL)
- /* silence compiler warning about unused png_ptr */ ;
- return("\n libpng version 1.0.4e - October 10, 1999 (header)\n");
+
+#define PNG_GET_HEADER \
+png_charp \
+png_get_header_version(png_structp png_ptr) \
+{ \
+ if(png_ptr != NULL) /* silence compiler warning about unused png_ptr */ \
+ return("\n libpng version 1.0.4f - October 12, 1999 (header)\n"); \
+ return("\n libpng version 1.0.4f - October 12, 1999 (header)\n"); \
}
#endif
@@ -1649,14 +1662,14 @@ png_get_header_version(png_structp png_ptr)
/* fg and bg should be in `gamma 1.0' space; alpha is the opacity */
# define png_composite(composite, fg, alpha, bg) \
- { png_uint_16 temp = ((png_uint_16)(fg) * (png_uint_16)(alpha) + \
- (png_uint_16)(bg)*(png_uint_16)(255 - \
+ { 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); \
(composite) = (png_byte)((temp + (temp >> 8)) >> 8); }
# define png_composite_16(composite, fg, alpha, bg) \
- { png_uint_32 temp = ((png_uint_32)(fg) * (png_uint_32)(alpha) + \
- (png_uint_32)(bg)*(png_uint_32)(65535L - \
+ { 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); \
(composite) = (png_uint_16)((temp + (temp >> 16)) >> 16); }