mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[alpha] Sync with libpng-1.4.0beta107
This commit is contained in:
6
ANNOUNCE
6
ANNOUNCE
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Libpng 1.4.1alpha02 - November 29, 2009
|
Libpng 1.4.1alpha02 - December 4, 2009
|
||||||
|
|
||||||
This is not intended to be a public release. It will be replaced
|
This is not intended to be a public release. It will be replaced
|
||||||
within a few weeks by a public version or by another test version.
|
within a few weeks by a public version or by another test version.
|
||||||
@@ -29,10 +29,10 @@ Changes since the last public release (1.4.0beta107):
|
|||||||
version 1.4.1alpha01 [November 27, 2009]
|
version 1.4.1alpha01 [November 27, 2009]
|
||||||
Based on 1.4.0beta107
|
Based on 1.4.0beta107
|
||||||
|
|
||||||
version 1.4.1alpha02 [November 29, 2009]
|
version 1.4.1alpha02 [December 4, 2009]
|
||||||
Restored premultiplied alpha feature from version 1.4.0beta105.
|
Restored premultiplied alpha feature from version 1.4.0beta105.
|
||||||
Added "double gamma" to parameters for png_set_premultiply_alpha().
|
Added "double gamma" to parameters for png_set_premultiply_alpha().
|
||||||
Added "float gamma_premultiply" member to the png_struct.
|
Added "float postmultiply_gamma" member to the png_struct.
|
||||||
Moved PNG_DIVIDE_BY_255, PNG_8_BIT_PREMULTIPLY(), etc., from
|
Moved PNG_DIVIDE_BY_255, PNG_8_BIT_PREMULTIPLY(), etc., from
|
||||||
png.h to pngpriv.h
|
png.h to pngpriv.h
|
||||||
Updated documentation about png_set_premultiply_alpha().
|
Updated documentation about png_set_premultiply_alpha().
|
||||||
|
|||||||
14
CHANGES
14
CHANGES
@@ -2408,13 +2408,23 @@ version 1.4.0beta106 [November 27, 2009]
|
|||||||
version 1.4.0beta107 [November 27, 2009]
|
version 1.4.0beta107 [November 27, 2009]
|
||||||
Updated README
|
Updated README
|
||||||
|
|
||||||
|
version 1.4.0beta107 [December 4, 2009]
|
||||||
|
Updated README
|
||||||
|
Added "#define PNG_NO_PEDANTIC_WARNINGS" in the libpng source files.
|
||||||
|
Removed "-DPNG_CONFIGURE_LIBPNG" from the makefiles and projects.
|
||||||
|
Revised scripts/makefile.netbsd, makefile.openbsd, and makefile.sco
|
||||||
|
to put png.h and pngconf.h in $prefix/include, like the other scripts,
|
||||||
|
instead of in $prefix/include/libpng. Also revised makefile.sco
|
||||||
|
to put them in $prefix/include/libpng14 instead of in
|
||||||
|
$prefix/include/libpng/libpng14.
|
||||||
|
|
||||||
version 1.4.1alpha01 [November 27, 2009]
|
version 1.4.1alpha01 [November 27, 2009]
|
||||||
Based on 1.4.0beta107
|
Based on 1.4.0beta107
|
||||||
|
|
||||||
version 1.4.1alpha02 [November 29, 2009]
|
version 1.4.1alpha02 [December 4, 2009]
|
||||||
Restored premultiplied alpha feature from version 1.4.0beta105.
|
Restored premultiplied alpha feature from version 1.4.0beta105.
|
||||||
Added "double gamma" to parameters for png_set_premultiply_alpha().
|
Added "double gamma" to parameters for png_set_premultiply_alpha().
|
||||||
Added "float gamma_premultiply" member to the png_struct.
|
Added "float postmultiply_gamma" member to the png_struct.
|
||||||
Moved PNG_DIVIDE_BY_255, PNG_8_BIT_PREMULTIPLY(), etc., from
|
Moved PNG_DIVIDE_BY_255, PNG_8_BIT_PREMULTIPLY(), etc., from
|
||||||
png.h to pngpriv.h
|
png.h to pngpriv.h
|
||||||
Updated documentation about png_set_premultiply_alpha().
|
Updated documentation about png_set_premultiply_alpha().
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#if 0 /* in case someone actually tries to compile this */
|
#if 0 /* in case someone actually tries to compile this */
|
||||||
|
|
||||||
/* example.c - an example of using libpng
|
/* example.c - an example of using libpng
|
||||||
* Last changed in libpng 1.4.0 [November 27, 2009]
|
* Last changed in libpng 1.4.0 [December 4, 2009]
|
||||||
* This file has been placed in the public domain by the authors.
|
* This file has been placed in the public domain by the authors.
|
||||||
* Maintained 1998-2009 Glenn Randers-Pehrson
|
* Maintained 1998-2009 Glenn Randers-Pehrson
|
||||||
* Maintained 1996, 1997 Andreas Dilger)
|
* Maintained 1996, 1997 Andreas Dilger)
|
||||||
|
|||||||
7
png.c
7
png.c
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* png.c - location for general purpose libpng functions
|
/* png.c - location for general purpose libpng functions
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.4.0 [November 27, 2009]
|
* Last changed in libpng 1.4.0 [December 4, 2009]
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define PNG_NO_EXTERN
|
#define PNG_NO_EXTERN
|
||||||
|
#define PNG_NO_PEDANTIC_WARNINGS
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
#include "pngpriv.h"
|
#include "pngpriv.h"
|
||||||
|
|
||||||
@@ -547,13 +548,13 @@ png_get_copyright(png_structp png_ptr)
|
|||||||
#else
|
#else
|
||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
return ((png_charp) PNG_STRING_NEWLINE \
|
return ((png_charp) PNG_STRING_NEWLINE \
|
||||||
"libpng version 1.4.1alpha02 - November 27, 2009" PNG_STRING_NEWLINE \
|
"libpng version 1.4.1alpha02 - December 4, 2009" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1998-2009 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
"Copyright (c) 1998-2009 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
||||||
PNG_STRING_NEWLINE);
|
PNG_STRING_NEWLINE);
|
||||||
#else
|
#else
|
||||||
return ((png_charp) "libpng version 1.4.1alpha02 - November 27, 2009\
|
return ((png_charp) "libpng version 1.4.1alpha02 - December 4, 2009\
|
||||||
Copyright (c) 1998-2009 Glenn Randers-Pehrson\
|
Copyright (c) 1998-2009 Glenn Randers-Pehrson\
|
||||||
Copyright (c) 1996-1997 Andreas Dilger\
|
Copyright (c) 1996-1997 Andreas Dilger\
|
||||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.");
|
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.");
|
||||||
|
|||||||
22
png.h
22
png.h
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* png.h - header file for PNG reference library
|
/* png.h - header file for PNG reference library
|
||||||
*
|
*
|
||||||
* libpng version 1.4.1alpha02 - November 29, 2009
|
* libpng version 1.4.1alpha02 - December 4, 2009
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
* Authors and maintainers:
|
* Authors and maintainers:
|
||||||
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
||||||
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||||
* libpng versions 0.97, January 1998, through 1.4.1alpha02 - November 29, 2009: Glenn
|
* libpng versions 0.97, January 1998, through 1.4.1alpha02 - December 4, 2009: Glenn
|
||||||
* See also "Contributing Authors", below.
|
* See also "Contributing Authors", below.
|
||||||
*
|
*
|
||||||
* Note about libpng version numbers:
|
* Note about libpng version numbers:
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
* 1.4.0beta15-36 14 10400 14.so.0.0[.0]
|
* 1.4.0beta15-36 14 10400 14.so.0.0[.0]
|
||||||
* 1.4.0beta37-87 14 10400 14.so.14.0[.0]
|
* 1.4.0beta37-87 14 10400 14.so.14.0[.0]
|
||||||
* 1.4.0rc01 14 10400 14.so.14.0[.0]
|
* 1.4.0rc01 14 10400 14.so.14.0[.0]
|
||||||
* 1.4.0beta88-107 14 10400 14.so.14.0[.0]
|
* 1.4.0beta88-108 14 10400 14.so.14.0[.0]
|
||||||
* 1.4.1alpha01-02 14 10401 14.so.14.0[.0]
|
* 1.4.1alpha01-02 14 10401 14.so.14.0[.0]
|
||||||
*
|
*
|
||||||
* Henceforth the source version will match the shared-library major
|
* Henceforth the source version will match the shared-library major
|
||||||
@@ -164,7 +164,7 @@
|
|||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
*
|
*
|
||||||
* libpng versions 1.2.6, August 15, 2004, through 1.4.1alpha02, November 29, 2009, are
|
* libpng versions 1.2.6, August 15, 2004, through 1.4.1alpha02, December 4, 2009, are
|
||||||
* Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are
|
* Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are
|
||||||
* distributed according to the same disclaimer and license as libpng-1.2.5
|
* distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
* with the following individual added to the list of Contributing Authors:
|
* with the following individual added to the list of Contributing Authors:
|
||||||
@@ -340,7 +340,7 @@
|
|||||||
/* Version information for png.h - this should match the version in png.c */
|
/* Version information for png.h - this should match the version in png.c */
|
||||||
#define PNG_LIBPNG_VER_STRING "1.4.1alpha02"
|
#define PNG_LIBPNG_VER_STRING "1.4.1alpha02"
|
||||||
#define PNG_HEADER_VERSION_STRING \
|
#define PNG_HEADER_VERSION_STRING \
|
||||||
" libpng version 1.4.1alpha02 - November 29, 2009\n"
|
" libpng version 1.4.1alpha02 - December 4, 2009\n"
|
||||||
|
|
||||||
#define PNG_LIBPNG_VER_SONUM 14
|
#define PNG_LIBPNG_VER_SONUM 14
|
||||||
#define PNG_LIBPNG_VER_DLLNUM 14
|
#define PNG_LIBPNG_VER_DLLNUM 14
|
||||||
@@ -1332,15 +1332,10 @@ struct png_struct_def
|
|||||||
/* New member added in libpng-1.2.30 */
|
/* New member added in libpng-1.2.30 */
|
||||||
png_charp chunkdata PNG_DEPSTRUCT; /* buffer for reading chunk data */
|
png_charp chunkdata PNG_DEPSTRUCT; /* buffer for reading chunk data */
|
||||||
|
|
||||||
/* New member added in libpng-1.2.41 */
|
/* New member added in libpng-1.4.0 */
|
||||||
#ifdef PNG_IO_STATE_SUPPORTED
|
#ifdef PNG_IO_STATE_SUPPORTED
|
||||||
png_uint_32 io_state PNG_DEPSTRUCT;
|
png_uint_32 io_state PNG_DEPSTRUCT;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* New member added in libpng-1.4.1 */
|
|
||||||
#ifdef PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED
|
|
||||||
float gamma_premultiply PNG_DEPSTRUCT;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -1529,11 +1524,6 @@ extern PNG_EXPORT(void,png_set_swap_alpha) PNGARG((png_structp png_ptr));
|
|||||||
extern PNG_EXPORT(void,png_set_invert_alpha) PNGARG((png_structp png_ptr));
|
extern PNG_EXPORT(void,png_set_invert_alpha) PNGARG((png_structp png_ptr));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED
|
|
||||||
extern PNG_EXPORT(void,png_set_premultiply_alpha)
|
|
||||||
PNGARG((png_structp png_ptr, double gamma));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
|
#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
|
||||||
/* Add a filler byte to 8-bit Gray or 24-bit RGB images. */
|
/* Add a filler byte to 8-bit Gray or 24-bit RGB images. */
|
||||||
extern PNG_EXPORT(void,png_set_filler) PNGARG((png_structp png_ptr,
|
extern PNG_EXPORT(void,png_set_filler) PNGARG((png_structp png_ptr,
|
||||||
|
|||||||
35
pngconf.h
35
pngconf.h
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngconf.h - machine configurable file for libpng
|
/* pngconf.h - machine configurable file for libpng
|
||||||
*
|
*
|
||||||
* libpng version 1.4.1alpha02 - November 29, 2009
|
* libpng version 1.4.1alpha02 - December 4, 2009
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
@@ -870,6 +870,7 @@
|
|||||||
|
|
||||||
#endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */
|
#endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */
|
||||||
|
|
||||||
|
|
||||||
#ifndef PNG_NO_READ_UNKNOWN_CHUNKS
|
#ifndef PNG_NO_READ_UNKNOWN_CHUNKS
|
||||||
# define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
|
# define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
|
||||||
# ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
|
# ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
|
||||||
@@ -1308,10 +1309,20 @@ typedef char FAR * FAR * FAR * png_charppp;
|
|||||||
*
|
*
|
||||||
* Added at libpng-1.2.41.
|
* Added at libpng-1.2.41.
|
||||||
*/
|
*/
|
||||||
#ifdef __GNUC__
|
|
||||||
# ifndef PNG_DEPRECATED
|
#ifndef PNG_NO_PEDANTIC_WARNINGS
|
||||||
# define PNG_DEPRECATED __attribute__((__deprecated__))
|
# ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED
|
||||||
|
# define PNG_PEDANTIC_WARNINGS_SUPPORTED
|
||||||
# endif
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED
|
||||||
|
/* Support for compiler specific function attributes. These are used
|
||||||
|
* so that where compiler support is available incorrect use of API
|
||||||
|
* functions in png.h will generate compiler warnings. Added at libpng
|
||||||
|
* version 1.2.41.
|
||||||
|
*/
|
||||||
|
# ifdef __GNUC__
|
||||||
# ifndef PNG_USE_RESULT
|
# ifndef PNG_USE_RESULT
|
||||||
# define PNG_USE_RESULT __attribute__((__warn_unused_result__))
|
# define PNG_USE_RESULT __attribute__((__warn_unused_result__))
|
||||||
# endif
|
# endif
|
||||||
@@ -1322,19 +1333,27 @@ typedef char FAR * FAR * FAR * png_charppp;
|
|||||||
# define PNG_ALLOCATED __attribute__((__malloc__))
|
# define PNG_ALLOCATED __attribute__((__malloc__))
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifndef PNG_CONFIGURE_LIBPNG
|
|
||||||
/* This specifically protects structure members that should only be
|
/* This specifically protects structure members that should only be
|
||||||
* accessed from within the library, therefore should be empty during
|
* accessed from within the library, therefore should be empty during
|
||||||
* a library build.
|
* a library build.
|
||||||
*/
|
*/
|
||||||
|
# ifndef PNG_DEPRECATED
|
||||||
|
# define PNG_DEPRECATED __attribute__((__deprecated__))
|
||||||
|
# endif
|
||||||
# ifndef PNG_DEPSTRUCT
|
# ifndef PNG_DEPSTRUCT
|
||||||
# define PNG_DEPSTRUCT __attribute__((__deprecated__))
|
# define PNG_DEPSTRUCT __attribute__((__deprecated__))
|
||||||
# endif
|
# endif
|
||||||
# ifndef PNG_PRIVATE
|
# ifndef PNG_PRIVATE
|
||||||
# define PNG_PRIVATE __attribute__((__deprecated__))
|
# if 0 /* Doesn't work so we use deprecated instead*/
|
||||||
# endif
|
# define PNG_PRIVATE \
|
||||||
# endif
|
__attribute__((warning("This function is not exported by libpng.")))
|
||||||
|
# else
|
||||||
|
# define PNG_PRIVATE \
|
||||||
|
__attribute__((__deprecated__))
|
||||||
# endif
|
# endif
|
||||||
|
# endif /* PNG_PRIVATE */
|
||||||
|
# endif /* __GNUC__ */
|
||||||
|
#endif /* PNG_PEDANTIC_WARNINGS */
|
||||||
|
|
||||||
#ifndef PNG_DEPRECATED
|
#ifndef PNG_DEPRECATED
|
||||||
# define PNG_DEPRECATED /* Use of this function is deprecated */
|
# define PNG_DEPRECATED /* Use of this function is deprecated */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngerror.c - stub functions for i/o and memory allocation
|
/* pngerror.c - stub functions for i/o and memory allocation
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.4.0 [November 27, 2009]
|
* Last changed in libpng 1.4.0 [December 4, 2009]
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
* at each function.
|
* at each function.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define PNG_NO_PEDANTIC_WARNINGS
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
||||||
#include "pngpriv.h"
|
#include "pngpriv.h"
|
||||||
|
|||||||
3
pngget.c
3
pngget.c
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngget.c - retrieval of values from info struct
|
/* pngget.c - retrieval of values from info struct
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.4.0 [November 27, 2009]
|
* Last changed in libpng 1.4.0 [December 4, 2009]
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define PNG_NO_PEDANTIC_WARNINGS
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
||||||
#include "pngpriv.h"
|
#include "pngpriv.h"
|
||||||
|
|||||||
3
pngmem.c
3
pngmem.c
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngmem.c - stub functions for memory allocation
|
/* pngmem.c - stub functions for memory allocation
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.4.0 [November 27, 2009]
|
* Last changed in libpng 1.4.0 [December 4, 2009]
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -17,6 +17,7 @@
|
|||||||
* identify the replacement functions.
|
* identify the replacement functions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define PNG_NO_PEDANTIC_WARNINGS
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
||||||
#include "pngpriv.h"
|
#include "pngpriv.h"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngpread.c - read a png file in push mode
|
/* pngpread.c - read a png file in push mode
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.4.0 [November 27, 2009]
|
* Last changed in libpng 1.4.0 [December 4, 2009]
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
* and license in png.h
|
* and license in png.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define PNG_NO_PEDANTIC_WARNINGS
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
|
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
|
||||||
#include "pngpriv.h"
|
#include "pngpriv.h"
|
||||||
|
|||||||
11
pngpriv.h
11
pngpriv.h
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngpriv.h - private declarations for use inside libpng
|
/* pngpriv.h - private declarations for use inside libpng
|
||||||
*
|
*
|
||||||
* libpng version 1.4.1alpha02 - November 28, 2009
|
* libpng version 1.4.1alpha02 - December 4, 2009
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
@@ -554,7 +554,8 @@ PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info,
|
|||||||
|
|
||||||
#ifdef PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED
|
#ifdef PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED
|
||||||
PNG_EXTERN void png_do_read_premultiply_alpha
|
PNG_EXTERN void png_do_read_premultiply_alpha
|
||||||
PNGARG((png_row_infop row_info, png_bytep row));
|
PNGARG((png_row_infop row_info, png_bytep row,
|
||||||
|
png_uint_16pp gamma_16_to_1));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
|
#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
|
||||||
@@ -952,19 +953,13 @@ extern void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr,
|
|||||||
|
|
||||||
#ifdef PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED
|
#ifdef PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED
|
||||||
# ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
|
# ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
|
||||||
# define PNG_DIVIDE_BY_255(v) \
|
|
||||||
((png_byte)(((png_uint_16)(v) + \
|
|
||||||
(((png_uint_16)(v) + 128) >> 8) + 128) >> 8))
|
|
||||||
# define PNG_DIVIDE_BY_65535(v) \
|
# define PNG_DIVIDE_BY_65535(v) \
|
||||||
((png_byte)(((png_uint_32)(v) + \
|
((png_byte)(((png_uint_32)(v) + \
|
||||||
(((png_uint_32)(v) + 32768L) >> 16) + 32768L) >> 16))
|
(((png_uint_32)(v) + 32768L) >> 16) + 32768L) >> 16))
|
||||||
# else
|
# else
|
||||||
# define PNG_DIVIDE_BY_255(v) (((png_uint_16)(v))/255)
|
|
||||||
# define PNG_DIVIDE_BY_65535(v) (((png_uint_32)(v))/65535L)
|
# define PNG_DIVIDE_BY_65535(v) (((png_uint_32)(v))/65535L)
|
||||||
# endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */
|
# endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */
|
||||||
|
|
||||||
# define PNG_8_BIT_PREMULTIPLY(color,alpha) \
|
|
||||||
PNG_DIVIDE_BY_255((color)*(alpha))
|
|
||||||
# define PNG_16_BIT_PREMULTIPLY(color,alpha)\
|
# define PNG_16_BIT_PREMULTIPLY(color,alpha)\
|
||||||
PNG_DIVIDE_BY_65535((color)*(alpha))
|
PNG_DIVIDE_BY_65535((color)*(alpha))
|
||||||
#endif /* PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED */
|
#endif /* PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngread.c - read a PNG file
|
/* pngread.c - read a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.4.0 [November 27, 2009]
|
* Last changed in libpng 1.4.0 [December 4, 2009]
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
* read a PNG file or stream.
|
* read a PNG file or stream.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define PNG_NO_PEDANTIC_WARNINGS
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
#ifdef PNG_READ_SUPPORTED
|
#ifdef PNG_READ_SUPPORTED
|
||||||
#include "pngpriv.h"
|
#include "pngpriv.h"
|
||||||
|
|||||||
3
pngrio.c
3
pngrio.c
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngrio.c - functions for data input
|
/* pngrio.c - functions for data input
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.4.0 [November 27, 2009]
|
* Last changed in libpng 1.4.0 [December 4, 2009]
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -18,6 +18,7 @@
|
|||||||
* libpng use it at run time with png_set_read_fn(...).
|
* libpng use it at run time with png_set_read_fn(...).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define PNG_NO_PEDANTIC_WARNINGS
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
#ifdef PNG_READ_SUPPORTED
|
#ifdef PNG_READ_SUPPORTED
|
||||||
#include "pngpriv.h"
|
#include "pngpriv.h"
|
||||||
|
|||||||
62
pngrtran.c
62
pngrtran.c
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.4.0 [November 29, 2009]
|
* Last changed in libpng 1.4.0 [December 4, 2009]
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
* in pngtrans.c.
|
* in pngtrans.c.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define PNG_NO_PEDANTIC_WARNINGS
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
#ifdef PNG_READ_SUPPORTED
|
#ifdef PNG_READ_SUPPORTED
|
||||||
#include "pngpriv.h"
|
#include "pngpriv.h"
|
||||||
@@ -142,21 +143,15 @@ png_set_strip_alpha(png_structp png_ptr)
|
|||||||
|
|
||||||
#ifdef PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED
|
#ifdef PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_set_premultiply_alpha(png_structp png_ptr, double gamma)
|
png_set_premultiply_alpha(png_structp png_ptr)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_set_premultiply_alpha");
|
png_debug(1, "in png_set_premultiply_alpha");
|
||||||
|
|
||||||
if(png_ptr == NULL)
|
if(png_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
png_ptr->transformations |=
|
png_ptr->transformations |=
|
||||||
(PNG_PREMULTIPLY_ALPHA | PNG_EXPAND_tRNS);
|
(PNG_PREMULTIPLY_ALPHA | PNG_EXPAND_tRNS | PNG_EXPAND);
|
||||||
png_ptr->transformations |=
|
|
||||||
PNG_EXPAND;
|
|
||||||
png_ptr->flags &= ~PNG_FLAG_ROW_INIT;
|
png_ptr->flags &= ~PNG_FLAG_ROW_INIT;
|
||||||
/* Check for overflow */
|
|
||||||
if (gamma == 0 || gamma > 21474.83)
|
|
||||||
png_error(png_ptr, "Invalid gamma for premultiply");
|
|
||||||
png_ptr->gamma_premultiply = (float)gamma;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -758,7 +753,7 @@ png_set_read_user_transform_fn(png_structp png_ptr, png_user_transform_ptr
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize everything needed for the read. This includes modifying
|
/* Initialize everything needed for the read. This includes modifying
|
||||||
* the palette.
|
* the palette and building any needed gamma tables.
|
||||||
*/
|
*/
|
||||||
void /* PRIVATE */
|
void /* PRIVATE */
|
||||||
png_init_read_transformations(png_structp png_ptr)
|
png_init_read_transformations(png_structp png_ptr)
|
||||||
@@ -1531,17 +1526,14 @@ png_do_read_transformations(png_structp png_ptr)
|
|||||||
|
|
||||||
#ifdef PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED
|
#ifdef PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED
|
||||||
|
|
||||||
/* TO DO: build 16-bit gamma tables */
|
|
||||||
|
|
||||||
if (png_ptr->transformations & PNG_PREMULTIPLY_ALPHA)
|
if (png_ptr->transformations & PNG_PREMULTIPLY_ALPHA)
|
||||||
png_do_read_premultiply_alpha(&(png_ptr->row_info),
|
{
|
||||||
png_ptr->row_buf + 1);
|
png_do_gamma(&(png_ptr->row_info), png_ptr->row_buf + 1,
|
||||||
|
png_ptr->gamma_table, png_ptr->gamma_16_table,
|
||||||
|
png_ptr->gamma_shift);
|
||||||
|
|
||||||
/* TO DO: apply png_ptr->gamma_premultiply to the premultiplied
|
png_do_read_premultiply_alpha(&(png_ptr->row_info),
|
||||||
* samples, using the 16-bit gamma table. We may need to set
|
png_ptr->row_buf + 1, png_ptr->gamma_16_to_1);
|
||||||
* png_ptr->screen_gamma to our output gamma, even though it is
|
|
||||||
* not necessarily destined to a screen.
|
|
||||||
*/
|
|
||||||
|
|
||||||
# ifdef PNG_READ_16_TO_8_SUPPORTED
|
# ifdef PNG_READ_16_TO_8_SUPPORTED
|
||||||
if (!(png_ptr->transformations & PNG_PREMULTIPLY_ALPHA))
|
if (!(png_ptr->transformations & PNG_PREMULTIPLY_ALPHA))
|
||||||
@@ -1550,6 +1542,7 @@ png_do_read_transformations(png_structp png_ptr)
|
|||||||
png_do_chop(&(png_ptr->row_info), png_ptr->row_buf + 1);
|
png_do_chop(&(png_ptr->row_info), png_ptr->row_buf + 1);
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -2043,7 +2036,8 @@ png_do_read_invert_alpha(png_row_infop row_info, png_bytep row)
|
|||||||
|
|
||||||
#ifdef PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED
|
#ifdef PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED
|
||||||
void /* PRIVATE */
|
void /* PRIVATE */
|
||||||
png_do_read_premultiply_alpha(png_row_infop row_info, png_bytep row)
|
png_do_read_premultiply_alpha(png_row_infop row_info, png_bytep row,
|
||||||
|
png_uint_16pp gamma_16_to_1)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* TO DO: apply gamma before premultiply */
|
/* TO DO: apply gamma before premultiply */
|
||||||
@@ -2063,9 +2057,12 @@ png_do_read_premultiply_alpha(png_row_infop row_info, png_bytep row)
|
|||||||
for (i = 0; i < row_width; i++)
|
for (i = 0; i < row_width; i++)
|
||||||
{
|
{
|
||||||
a = *(--sp); --dp;
|
a = *(--sp); --dp;
|
||||||
sp--; *(--dp) = PNG_16_BIT_PREMULTIPLY((*sp), a);
|
sp--; *(--dp) = gamma_16_to_1[(int)(*sp)];
|
||||||
sp--; *(--dp) = PNG_16_BIT_PREMULTIPLY((*sp), a);
|
*(dp) = PNG_16_BIT_PREMULTIPLY((*dp), a);
|
||||||
sp--; *(--dp) = PNG_16_BIT_PREMULTIPLY((*sp), a);
|
sp--; *(--dp) = gamma_16_to_1[(int)(*sp)];
|
||||||
|
*(dp) = PNG_16_BIT_PREMULTIPLY((*dp), a);
|
||||||
|
sp--; *(--dp) = gamma_16_to_1[*sp];
|
||||||
|
*(dp) = PNG_16_BIT_PREMULTIPLY((*dp), a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2080,7 +2077,8 @@ png_do_read_premultiply_alpha(png_row_infop row_info, png_bytep row)
|
|||||||
for (i = 0; i < row_width; i++)
|
for (i = 0; i < row_width; i++)
|
||||||
{
|
{
|
||||||
a = *(--sp); --dp;
|
a = *(--sp); --dp;
|
||||||
sp--; *(--dp) = PNG_16_BIT_PREMULTIPLY((*sp), a);
|
sp--; *(--dp) = gamma_16_to_1[*sp];
|
||||||
|
*(dp) = PNG_16_BIT_PREMULTIPLY((*dp), a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4022,17 +4020,23 @@ static PNG_CONST int png_gamma_shift[] =
|
|||||||
* OR
|
* OR
|
||||||
*
|
*
|
||||||
* RGB_to_gray transformation is being performed
|
* RGB_to_gray transformation is being performed
|
||||||
|
*
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* AND
|
* AND
|
||||||
* {
|
* {
|
||||||
* the screen_gamma is different from the reciprocal of the
|
* the screen_gamma is different from the reciprocal of
|
||||||
* file_gamma by more than the specified threshold
|
* the file_gamma by more than the specified threshold
|
||||||
*
|
*
|
||||||
* OR
|
* OR
|
||||||
*
|
*
|
||||||
* a background color has been specified and the file_gamma
|
* a background color has been specified and the file_gamma
|
||||||
* and screen_gamma are not 1.0, within the specified threshold.
|
* and screen_gamma are not 1.0, within the specified threshold.
|
||||||
|
*
|
||||||
|
* OR
|
||||||
|
*
|
||||||
|
* premultiplication by alpha is being performed and the file_gamma
|
||||||
|
* and postmultiply_gamma are not 1.0, within the specified threshold.
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -4096,7 +4100,12 @@ png_build_gamma_table(png_structp png_ptr)
|
|||||||
}
|
}
|
||||||
#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */
|
#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED
|
||||||
|
if (png_ptr->transformations & PNG_PREMULTIPLY_ALPHA)
|
||||||
|
#else
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
double g;
|
double g;
|
||||||
int i, j, shift, num;
|
int i, j, shift, num;
|
||||||
@@ -4201,6 +4210,7 @@ png_build_gamma_table(png_structp png_ptr)
|
|||||||
|
|
||||||
#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \
|
#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \
|
||||||
defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
|
defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
|
||||||
|
/* PREMULTIPLY */
|
||||||
if (png_ptr->transformations & (PNG_BACKGROUND | PNG_RGB_TO_GRAY))
|
if (png_ptr->transformations & (PNG_BACKGROUND | PNG_RGB_TO_GRAY))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngrutil.c - utilities to read a PNG file
|
/* pngrutil.c - utilities to read a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.4.0 [November 27, 2009]
|
* Last changed in libpng 1.4.0 [December 4, 2009]
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
* libpng itself during the course of reading an image.
|
* libpng itself during the course of reading an image.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define PNG_NO_PEDANTIC_WARNINGS
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
#ifdef PNG_READ_SUPPORTED
|
#ifdef PNG_READ_SUPPORTED
|
||||||
#include "pngpriv.h"
|
#include "pngpriv.h"
|
||||||
|
|||||||
3
pngset.c
3
pngset.c
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngset.c - storage of image information into info struct
|
/* pngset.c - storage of image information into info struct
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.4.0 [November 27, 2009]
|
* Last changed in libpng 1.4.0 [December 4, 2009]
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
* info struct and allows us to change the structure in the future.
|
* info struct and allows us to change the structure in the future.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define PNG_NO_PEDANTIC_WARNINGS
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
||||||
#include "pngpriv.h"
|
#include "pngpriv.h"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngtest.c - a simple test program to test libpng
|
/* pngtest.c - a simple test program to test libpng
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.4.0 [November 27, 2009]
|
* Last changed in libpng 1.4.0 [December 4, 2009]
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.4.0 [November 27, 2009]
|
* Last changed in libpng 1.4.0 [December 4, 2009]
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
* and license in png.h
|
* and license in png.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define PNG_NO_PEDANTIC_WARNINGS
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
||||||
#include "pngpriv.h"
|
#include "pngpriv.h"
|
||||||
|
|||||||
3
pngwio.c
3
pngwio.c
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngwio.c - functions for data output
|
/* pngwio.c - functions for data output
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.4.0 [November 27, 2009]
|
* Last changed in libpng 1.4.0 [December 4, 2009]
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -18,6 +18,7 @@
|
|||||||
* them at run time with png_set_write_fn(...).
|
* them at run time with png_set_write_fn(...).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define PNG_NO_PEDANTIC_WARNINGS
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
#ifdef PNG_WRITE_SUPPORTED
|
#ifdef PNG_WRITE_SUPPORTED
|
||||||
#include "pngpriv.h"
|
#include "pngpriv.h"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngwrite.c - general routines to write a PNG file
|
/* pngwrite.c - general routines to write a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.4.0 [November 27, 2009]
|
* Last changed in libpng 1.4.0 [December 4, 2009]
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Get internal access to png.h */
|
/* Get internal access to png.h */
|
||||||
|
#define PNG_NO_PEDANTIC_WARNINGS
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
#ifdef PNG_WRITE_SUPPORTED
|
#ifdef PNG_WRITE_SUPPORTED
|
||||||
#include "pngpriv.h"
|
#include "pngpriv.h"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngwtran.c - transforms the data in a row for PNG writers
|
/* pngwtran.c - transforms the data in a row for PNG writers
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.4.0 [November 27, 2009]
|
* Last changed in libpng 1.4.0 [December 4, 2009]
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
* and license in png.h
|
* and license in png.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define PNG_NO_PEDANTIC_WARNINGS
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
#ifdef PNG_WRITE_SUPPORTED
|
#ifdef PNG_WRITE_SUPPORTED
|
||||||
#include "pngpriv.h"
|
#include "pngpriv.h"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngwutil.c - utilities to write a PNG file
|
/* pngwutil.c - utilities to write a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.4.0 [November 27, 2009]
|
* Last changed in libpng 1.4.0 [December 4, 2009]
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
* and license in png.h
|
* and license in png.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define PNG_NO_PEDANTIC_WARNINGS
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
#ifdef PNG_WRITE_SUPPORTED
|
#ifdef PNG_WRITE_SUPPORTED
|
||||||
#include "pngpriv.h"
|
#include "pngpriv.h"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ It needs to depend on pngpriv.h
|
|||||||
|
|
||||||
It needs to *not* depend on pnggccrd.c or pngvcrd.c
|
It needs to *not* depend on pnggccrd.c or pngvcrd.c
|
||||||
|
|
||||||
It needs to DEFINE PNG_CONFIGURE_LIBPNG while building
|
It needs to DEFINE PNG_NO_PEDANTIC_WARNING while building
|
||||||
the library, but not while building an application.
|
the library, but not while building an application.
|
||||||
|
|
||||||
If an updated version is not received, this project will
|
If an updated version is not received, this project will
|
||||||
|
|||||||
@@ -52,8 +52,8 @@ MTL=midl.exe
|
|||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
RSC=rc.exe
|
RSC=rc.exe
|
||||||
# ADD BASE RSC /l 0x409 /d "PNG_CONFIGURE_LIBPNG" /d "NDEBUG"
|
# ADD BASE RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG"
|
||||||
# ADD RSC /l 0x409 /i "..\.." /d "PNG_CONFIGURE_LIBPNG" /d "NDEBUG"
|
# ADD RSC /l 0x409 /i "..\.." /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
@@ -83,8 +83,8 @@ MTL=midl.exe
|
|||||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
RSC=rc.exe
|
RSC=rc.exe
|
||||||
# ADD BASE RSC /l 0x409 /d "PNG_CONFIGURE_LIBPNG" /d "_DEBUG"
|
# ADD BASE RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "_DEBUG"
|
||||||
# ADD RSC /l 0x409 /i "..\.." /d "PNG_CONFIGURE_LIBPNG" /d "_DEBUG" /d PNG_DEBUG=1
|
# ADD RSC /l 0x409 /i "..\.." /d "PNG_NO_PEDANTIC_WARNINGS" /d "_DEBUG" /d PNG_DEBUG=1
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
@@ -114,8 +114,8 @@ MTL=midl.exe
|
|||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
RSC=rc.exe
|
RSC=rc.exe
|
||||||
# ADD BASE RSC /l 0x409 /d "PNG_CONFIGURE_LIBPNG" /d "NDEBUG"
|
# ADD BASE RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG"
|
||||||
# ADD RSC /l 0x409 /i "..\.." /d "PNG_CONFIGURE_LIBPNG" /d "NDEBUG" /dPNG_LIBPNG_DLLFNAME_POSTFIX=""""VB"""" /dPNG_LIBPNG_SPECIALBUILD=""""__stdcall calling convention used for exported functions""""
|
# ADD RSC /l 0x409 /i "..\.." /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG" /dPNG_LIBPNG_DLLFNAME_POSTFIX=""""VB"""" /dPNG_LIBPNG_SPECIALBUILD=""""__stdcall calling convention used for exported functions""""
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
@@ -147,8 +147,8 @@ CPP=cl.exe
|
|||||||
# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /FD /c
|
# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /FD /c
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
RSC=rc.exe
|
RSC=rc.exe
|
||||||
# ADD BASE RSC /l 0x409 /d "PNG_CONFIGURE_LIBPNG" /d "NDEBUG"
|
# ADD BASE RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG"
|
||||||
# ADD RSC /l 0x409 /i "..\.." /d "PNG_CONFIGURE_LIBPNG" /d "NDEBUG"
|
# ADD RSC /l 0x409 /i "..\.." /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
@@ -174,8 +174,8 @@ CPP=cl.exe
|
|||||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D PNG_DEBUG=1 /FD /GZ /c
|
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D PNG_DEBUG=1 /FD /GZ /c
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
RSC=rc.exe
|
RSC=rc.exe
|
||||||
# ADD BASE RSC /l 0x409 /d "PNG_CONFIGURE_LIBPNG" /d "_DEBUG"
|
# ADD BASE RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "_DEBUG"
|
||||||
# ADD RSC /l 0x409 /d "PNG_CONFIGURE_LIBPNG" /d "_DEBUG"
|
# ADD RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "_DEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
|
|||||||
@@ -138,7 +138,7 @@
|
|||||||
Name="VCPreLinkEventTool"/>
|
Name="VCPreLinkEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCResourceCompilerTool"
|
Name="VCResourceCompilerTool"
|
||||||
AdditionalOptions="/d PNG_CONFIGURE_LIBPNG /d PNG_LIBPNG_DLLFNAME_POSTFIX=""""VB"""" /d PNG_LIBPNG_SPECIALBUILD=""""__stdcall calling convention used for exported functions"""""
|
AdditionalOptions="/d PNG_NO_PEDANTIC_WARNINGS /d PNG_LIBPNG_DLLFNAME_POSTFIX=""""VB"""" /d PNG_LIBPNG_SPECIALBUILD=""""__stdcall calling convention used for exported functions"""""
|
||||||
PreprocessorDefinitions="NDEBUG"
|
PreprocessorDefinitions="NDEBUG"
|
||||||
Culture="1033"
|
Culture="1033"
|
||||||
AdditionalIncludeDirectories="..\..;..\..\..\zlib;$(IntDir)"/>
|
AdditionalIncludeDirectories="..\..;..\..\..\zlib;$(IntDir)"/>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ The xcode project has not been entirely updated to libpng-1.4.0.
|
|||||||
|
|
||||||
It needs to *not* depend on pnggccrd.c or pngvcrd.c
|
It needs to *not* depend on pnggccrd.c or pngvcrd.c
|
||||||
|
|
||||||
It needs to PNG_CONFIGURE_LIBPNG in the CFLAGS while building
|
It needs to PNG_NO_PEDANTIC_WARNINGS in the CFLAGS while building
|
||||||
the library, but not while building an application.
|
the library, but not while building an application.
|
||||||
|
|
||||||
If an updated version is not received, this project will
|
If an updated version is not received, this project will
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Makefiles for libpng version 1.4.1alpha02 - November 27, 2009
|
Makefiles for libpng version 1.4.1alpha02 - December 4, 2009
|
||||||
|
|
||||||
makefile.linux => Linux/ELF makefile
|
makefile.linux => Linux/ELF makefile
|
||||||
(gcc, creates libpng14.so.14.1.4.1alpha02)
|
(gcc, creates libpng14.so.14.1.4.1alpha02)
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ ZLIBINC=/usr/include
|
|||||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -I$(ZLIBINC) $(SUN_CC_FLAGS) \
|
CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \
|
||||||
# $(WARNMORE) -g -DPNG_DEBUG=5
|
# $(WARNMORE) -g -DPNG_DEBUG=5
|
||||||
LDFLAGS=$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) libpng.a -lz -lm
|
LDFLAGS=$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) libpng.a -lz -lm
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ ZLIBINC=/usr/include
|
|||||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -I$(ZLIBINC) $(SUN_CC_FLAGS) \
|
CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \
|
||||||
# $(WARNMORE) -g -DPNG_DEBUG=5
|
# $(WARNMORE) -g -DPNG_DEBUG=5
|
||||||
LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm
|
LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
|
|
||||||
# Toolflags:
|
# Toolflags:
|
||||||
CCflags = -DPNG_CONFIGURE_LIBPNG -c -depend !Depend -IC:,Zlib: -g -throwback -DRISCOS -fnah
|
CCflags = -c -depend !Depend -IC:,Zlib: -g -throwback -DRISCOS -fnah
|
||||||
C++flags = -c -depend !Depend -IC: -throwback
|
C++flags = -c -depend !Depend -IC: -throwback
|
||||||
Linkflags = -aif -c++ -o $@
|
Linkflags = -aif -c++ -o $@
|
||||||
ObjAsmflags = -throwback -NoCache -depend !Depend
|
ObjAsmflags = -throwback -NoCache -depend !Depend
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ LDDEBUG =
|
|||||||
CRELEASE = -O2
|
CRELEASE = -O2
|
||||||
LDRELEASE = -s
|
LDRELEASE = -s
|
||||||
WARNMORE=-W -Wall
|
WARNMORE=-W -Wall
|
||||||
CFLAGS = -DPNG_CONFIGURE_LIBPNG -I$(ZLIBINC) $(WARNMORE) $(CRELEASE)
|
CFLAGS = -I$(ZLIBINC) $(WARNMORE) $(CRELEASE)
|
||||||
LDFLAGS = -L. -L$(ZLIBLIB) -lpng14 -lz -lm $(LDRELEASE)
|
LDFLAGS = -L. -L$(ZLIBLIB) -lpng14 -lz -lm $(LDRELEASE)
|
||||||
|
|
||||||
# File extensions
|
# File extensions
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ CC=sc
|
|||||||
#compiler flags
|
#compiler flags
|
||||||
# WARNING: a bug in V6.51 causes bad code with OPTGO
|
# WARNING: a bug in V6.51 causes bad code with OPTGO
|
||||||
# So use V6.55 or set NOOPTGO!!!!!!!!!
|
# So use V6.55 or set NOOPTGO!!!!!!!!!
|
||||||
CFLAGS= -DPNG_CONFIGURE_LIBPNG NOSTKCHK PARMS=REG OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL\
|
CFLAGS= NOSTKCHK PARMS=REG OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL\
|
||||||
OPTLOOP OPTRDEP=4 OPTDEP=4 OPTCOMP=4 INCLUDEDIR=$(ZLIB) \
|
OPTLOOP OPTRDEP=4 OPTDEP=4 OPTCOMP=4 INCLUDEDIR=$(ZLIB) \
|
||||||
DEFINE=PNG_INTERNAL
|
DEFINE=PNG_INTERNAL
|
||||||
#linker flags
|
#linker flags
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
# Modified for LC56/ATARI assumes libz.lib is in same dir and uses default
|
# Modified for LC56/ATARI assumes libz.lib is in same dir and uses default
|
||||||
# rules for library management
|
# rules for library management
|
||||||
#
|
#
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -I..\zlib -O
|
CFLAGS=-I..\zlib -O
|
||||||
LBR = png.lib
|
LBR = png.lib
|
||||||
LDFLAGS=-lpng -lz -lm
|
LDFLAGS=-lpng -lz -lm
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ LDEBUG=$(LDEBUG) -N
|
|||||||
# -d merge duplicate strings
|
# -d merge duplicate strings
|
||||||
# -k- turn off standard stack frame
|
# -k- turn off standard stack frame
|
||||||
# -w display all warnings
|
# -w display all warnings
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -I$(ZLIB_DIR) -O2 -d -k- -w $(TARGET_CPU) $(CDEBUG)
|
CFLAGS=-I$(ZLIB_DIR) -O2 -d -k- -w $(TARGET_CPU) $(CDEBUG)
|
||||||
|
|
||||||
# -M generate map file
|
# -M generate map file
|
||||||
LDFLAGS=-L$(ZLIB_DIR) -M $(LDEBUG)
|
LDFLAGS=-L$(ZLIB_DIR) -M $(LDEBUG)
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
|||||||
|
|
||||||
# On BeOS, -O1 is actually better than -O3. This is a known bug but it's
|
# On BeOS, -O1 is actually better than -O3. This is a known bug but it's
|
||||||
# still here in R4.5
|
# still here in R4.5
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -I$(ZLIBINC) -W -Wall -O1 -funroll-loops \
|
CFLAGS=-I$(ZLIBINC) -W -Wall -O1 -funroll-loops \
|
||||||
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||||
# LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz
|
# LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz
|
||||||
LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz
|
LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ LDEBUG=$(LDEBUG) -N
|
|||||||
# -w set all warnings on
|
# -w set all warnings on
|
||||||
# -O2 optimize for speed
|
# -O2 optimize for speed
|
||||||
# -Z global optimization
|
# -Z global optimization
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -O2 -Z -X- -w -I$(ZLIB_DIR) -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG)
|
CFLAGS=-O2 -Z -X- -w -I$(ZLIB_DIR) -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG)
|
||||||
|
|
||||||
# -M generate map file
|
# -M generate map file
|
||||||
LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG)
|
LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG)
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ copy-src:
|
|||||||
|
|
||||||
compilation:
|
compilation:
|
||||||
@echo " * Compilation of $(PACKAGE)"
|
@echo " * Compilation of $(PACKAGE)"
|
||||||
cd $(PACKAGE) && CPPFLAGS="$(CPPFLAGS) -DPNG_BUILD_DLL -DPNG_CONSOLE_IO_SUPPORTED -DPNG_NO_MMX_CODE -D_WIN32_WCE=0x0420" CFLAGS="$(CFLAGS) -DPNG_CONFIGURE_LIBPNG -mms-bitfields -O3 -pipe -fomit-frame-pointer" LDFLAGS="$(LDFLAGS) -Wl,--enable-auto-import -Wl,-s" ./configure --prefix=/opt/wince --host=arm-mingw32ce && make
|
cd $(PACKAGE) && CPPFLAGS="$(CPPFLAGS) -DPNG_BUILD_DLL -DPNG_CONSOLE_IO_SUPPORTED -DPNG_NO_MMX_CODE -D_WIN32_WCE=0x0420" CFLAGS="$(CFLAGS) -mms-bitfields -O3 -pipe -fomit-frame-pointer" LDFLAGS="$(LDFLAGS) -Wl,--enable-auto-import -Wl,-s" ./configure --prefix=/opt/wince --host=arm-mingw32ce && make
|
||||||
|
|
||||||
copy:
|
copy:
|
||||||
@echo " * Copy of binary and development files"
|
@echo " * Copy of binary and development files"
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ DESTDIR=
|
|||||||
|
|
||||||
CC=gcc
|
CC=gcc
|
||||||
ifdef MINGW
|
ifdef MINGW
|
||||||
MINGW_CCFLAGS=-DPNG_CONFIGURE_LIBPNG -mno-cygwin -I/usr/include/mingw
|
MINGW_CCFLAGS=-mno-cygwin -I/usr/include/mingw
|
||||||
MINGW_LDFLAGS=-mno-cygwin -L/usr/lib/mingw
|
MINGW_LDFLAGS=-mno-cygwin -L/usr/lib/mingw
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ LN_SF=ln -sf
|
|||||||
RANLIB=ranlib
|
RANLIB=ranlib
|
||||||
RM_F=/bin/rm -f
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
# CFLAGS=--DPNG_CONFIGURE_LIBPNG I$(ZLIBINC) -W -Wall -O3 -funroll-loops
|
# CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -I$(ZLIBINC) -W -Wall -O -funroll-loops
|
CFLAGS=-I$(ZLIBINC) -W -Wall -O -funroll-loops
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng14 -lz
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng14 -lz
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ DM=$(DESTDIR)$(MANPATH)
|
|||||||
ZLIBLIB=../zlib
|
ZLIBLIB=../zlib
|
||||||
ZLIBINC=../zlib
|
ZLIBINC=../zlib
|
||||||
|
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -std -w1 -I$(ZLIBINC) -O # -g -DPNG_DEBUG=1
|
CFLAGS=-std -w1 -I$(ZLIBINC) -O # -g -DPNG_DEBUG=1
|
||||||
LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm
|
LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ INCPATH=$(prefix)/include
|
|||||||
LIBPATH=$(prefix)/lib
|
LIBPATH=$(prefix)/lib
|
||||||
|
|
||||||
CC=gcc
|
CC=gcc
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -I../zlib -O
|
CFLAGS=-I../zlib -O
|
||||||
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
|
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
|
||||||
|
|
||||||
RANLIB=ranlib
|
RANLIB=ranlib
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
|||||||
|
|
||||||
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
||||||
|
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -W -Wall -D_REENTRANT -O2 \
|
CFLAGS=-W -Wall -D_REENTRANT -O2 \
|
||||||
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||||
|
|
||||||
LDFLAGS=-L. -lpng14
|
LDFLAGS=-L. -lpng14
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \
|
|||||||
LDADD+= -lm -lz
|
LDADD+= -lm -lz
|
||||||
DPADD+= ${LIBM} ${LIBZ}
|
DPADD+= ${LIBM} ${LIBZ}
|
||||||
|
|
||||||
CFLAGS+= -DPNG_CONFIGURE_LIBPNG -I.
|
CFLAGS+= -I.
|
||||||
|
|
||||||
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
||||||
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ CDEBUG = -g -DPNG_DEBUG=5
|
|||||||
LDDEBUG =
|
LDDEBUG =
|
||||||
CRELEASE = -O2
|
CRELEASE = -O2
|
||||||
LDRELEASE = -s
|
LDRELEASE = -s
|
||||||
#CFLAGS = -DPNG_CONFIGURE_LIBPNG -W -Wall $(CDEBUG)
|
#CFLAGS = -W -Wall $(CDEBUG)
|
||||||
CFLAGS = -DPNG_CONFIGURE_LIBPNG -W -Wall $(CRELEASE)
|
CFLAGS = -W -Wall $(CRELEASE)
|
||||||
#LDFLAGS = $(LDDEBUG)
|
#LDFLAGS = $(LDDEBUG)
|
||||||
LDFLAGS = $(LDRELEASE)
|
LDFLAGS = $(LDRELEASE)
|
||||||
LIBS = -lz -lm
|
LIBS = -lz -lm
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ ZLIBINC=/opt/zlib/include
|
|||||||
# Note that if you plan to build a libpng shared library, zlib must also
|
# Note that if you plan to build a libpng shared library, zlib must also
|
||||||
# be a shared library, which zlib's configure does not do. After running
|
# be a shared library, which zlib's configure does not do. After running
|
||||||
# zlib's configure, edit the appropriate lines of makefile to read:
|
# zlib's configure, edit the appropriate lines of makefile to read:
|
||||||
# CFLAGS=-DPNG_CONFIGURE_LIBPNG -O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \
|
# CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \
|
||||||
# LDSHARED=ld -b
|
# LDSHARED=ld -b
|
||||||
# SHAREDLIB=libz.sl
|
# SHAREDLIB=libz.sl
|
||||||
|
|
||||||
@@ -40,10 +40,10 @@ LN_SF=ln -sf
|
|||||||
RANLIB=ranlib
|
RANLIB=ranlib
|
||||||
RM_F=/bin/rm -f
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -I$(ZLIBINC) -O -Ae -Wl,+vnocompatwarnings +DD64 \
|
CFLAGS=-I$(ZLIBINC) -O -Ae -Wl,+vnocompatwarnings +DD64 \
|
||||||
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Z -DHAVE_UNISTD_H -DUSE_MMAP
|
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Z -DHAVE_UNISTD_H -DUSE_MMAP
|
||||||
# Caution: be sure you have built zlib with the same CFLAGS.
|
# Caution: be sure you have built zlib with the same CFLAGS.
|
||||||
CCFLAGS=-DPNG_CONFIGURE_LIBPNG -I$(ZLIBINC) -O -Ae -Wl,+vnocompatwarnings +DD64 \
|
CCFLAGS=-I$(ZLIBINC) -O -Ae -Wl,+vnocompatwarnings +DD64 \
|
||||||
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Z -DHAVE_UNISTD_H -DUSE_MMAP
|
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Z -DHAVE_UNISTD_H -DUSE_MMAP
|
||||||
|
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
|||||||
|
|
||||||
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
||||||
|
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -I$(ZLIBINC) -W -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE \
|
CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE \
|
||||||
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||||
#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng14 -lz -lm
|
#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng14 -lz -lm
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng14 -lz -lm
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng14 -lz -lm
|
||||||
|
|||||||
@@ -48,9 +48,9 @@ LIBPATH=$(exec_prefix)/lib
|
|||||||
MANPATH=$(prefix)/man
|
MANPATH=$(prefix)/man
|
||||||
BINPATH=$(exec_prefix)/bin
|
BINPATH=$(exec_prefix)/bin
|
||||||
|
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
|
CFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
|
||||||
# Caution: be sure you have built zlib with the same CFLAGS.
|
# Caution: be sure you have built zlib with the same CFLAGS.
|
||||||
CCFLAGS=-DPNG_CONFIGURE_LIBPNG -I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
|
CCFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||||
|
|
||||||
# override DESTDIR= on the make install command line to easily support
|
# override DESTDIR= on the make install command line to easily support
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ LD = ilink
|
|||||||
AR = ilib
|
AR = ilib
|
||||||
RM = del
|
RM = del
|
||||||
|
|
||||||
CFLAGS = -DPNG_CONFIGURE_LIBPNG -I$(ZLIBINC) -Mc -O2 -W3
|
CFLAGS = -I$(ZLIBINC) -Mc -O2 -W3
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
|
|
||||||
# File extensions
|
# File extensions
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ CALLING=r # __fastcall
|
|||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
|
|
||||||
CC=icl -c
|
CC=icl -c
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -O2 -G$(CPU)$(CALLING) -Qip -Qunroll4 -I$(ZLIBINC) -nologo
|
CFLAGS=-O2 -G$(CPU)$(CALLING) -Qip -Qunroll4 -I$(ZLIBINC) -nologo
|
||||||
LD=link
|
LD=link
|
||||||
LDFLAGS=/SUBSYSTEM:CONSOLE /NOLOGO
|
LDFLAGS=/SUBSYSTEM:CONSOLE /NOLOGO
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ LIBPATH=$(prefix)/lib
|
|||||||
DESTDIR=
|
DESTDIR=
|
||||||
|
|
||||||
CC=cc
|
CC=cc
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -I../zlib -O
|
CFLAGS=-I../zlib -O
|
||||||
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
|
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
|
||||||
# flags for ansi2knr
|
# flags for ansi2knr
|
||||||
ANSI2KNRFLAGS=
|
ANSI2KNRFLAGS=
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
|||||||
|
|
||||||
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
||||||
|
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -I$(ZLIBINC) -W -Wall -O3 -funroll-loops \
|
CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops \
|
||||||
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||||
|
|
||||||
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng14 -lz -lm
|
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng14 -lz -lm
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
|||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||||
|
|
||||||
CFLAGS= -DPNG_CONFIGURE_LIBPNG $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
|
CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
|
||||||
-W -Wall -O3 $(ALIGN) -funroll-loops \
|
-W -Wall -O3 $(ALIGN) -funroll-loops \
|
||||||
-fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
|
-fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ LIBPATH=$(prefix)/lib
|
|||||||
DESTDIR=
|
DESTDIR=
|
||||||
|
|
||||||
CC=cc
|
CC=cc
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -I../zlib -O -systype sysv -DSYSV -w -Dmips
|
CFLAGS=-I../zlib -O -systype sysv -DSYSV -w -Dmips
|
||||||
#CFLAGS=-DPNG_CONFIGURE_LIBPNG -O
|
#CFLAGS=-O
|
||||||
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
|
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
|
||||||
|
|
||||||
#RANLIB=ranlib
|
#RANLIB=ranlib
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
# -------- Microsoft C 5.1 and later, does not use assembler code --------
|
# -------- Microsoft C 5.1 and later, does not use assembler code --------
|
||||||
MODEL=L
|
MODEL=L
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -Oait -Gs -nologo -W3 -A$(MODEL) -I..\zlib
|
CFLAGS=-Oait -Gs -nologo -W3 -A$(MODEL) -I..\zlib
|
||||||
#-Ox generates bad code with MSC 5.1
|
#-Ox generates bad code with MSC 5.1
|
||||||
CC=cl
|
CC=cl
|
||||||
LD=link
|
LD=link
|
||||||
|
|||||||
@@ -2,18 +2,18 @@
|
|||||||
# make obj && make depend && make && make test
|
# make obj && make depend && make && make test
|
||||||
# make includes && make install
|
# make includes && make install
|
||||||
# Copyright (C) 2002 Patrick R.L. Welche
|
# Copyright (C) 2002 Patrick R.L. Welche
|
||||||
# Copyright (C) 2007, 2009 Glenn Randers-Pehrson
|
# Copyright (C) 2007-2009 Glenn Randers-Pehrson
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
# For conditions of distribution and use, see the disclaimer
|
# For conditions of distribution and use, see the disclaimer
|
||||||
# and license in png.h
|
# and license in png.h
|
||||||
|
|
||||||
# You should also run makefile.ne0bsd
|
# You should also run makefile.ne14bsd
|
||||||
|
|
||||||
LOCALBASE?=/usr/local
|
LOCALBASE?=/usr/local
|
||||||
LIBDIR= ${LOCALBASE}/lib
|
LIBDIR= ${LOCALBASE}/lib
|
||||||
MANDIR= ${LOCALBASE}/man
|
MANDIR= ${LOCALBASE}/man
|
||||||
INCSDIR=${LOCALBASE}/include/libpng
|
INCSDIR=${LOCALBASE}/include
|
||||||
|
|
||||||
LIB= png
|
LIB= png
|
||||||
SHLIB_MAJOR= 3
|
SHLIB_MAJOR= 3
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# makefile for libpng
|
# makefile for libpng
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
# Copyright (C) 2007-2008 Glenn Randers-Pehrson
|
# Copyright (C) 2007-2009 Glenn Randers-Pehrson
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
# For conditions of distribution and use, see the disclaimer
|
# For conditions of distribution and use, see the disclaimer
|
||||||
@@ -20,7 +20,7 @@ SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
|
|||||||
|
|
||||||
HDRS= png.h pngconf.h
|
HDRS= png.h pngconf.h
|
||||||
|
|
||||||
CFLAGS+= -DPNG_CONFIGURE_LIBPNG -W -Wall
|
CFLAGS+= -W -Wall
|
||||||
CPPFLAGS+= -I${.CURDIR}
|
CPPFLAGS+= -I${.CURDIR}
|
||||||
|
|
||||||
NOPROFILE= Yes
|
NOPROFILE= Yes
|
||||||
@@ -42,7 +42,7 @@ test: pngtest
|
|||||||
|
|
||||||
beforeinstall:
|
beforeinstall:
|
||||||
if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \
|
if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \
|
||||||
${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include/libpng; \
|
${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include; \
|
||||||
fi
|
fi
|
||||||
if [ ! -d ${DESTDIR}${LIBDIR} ]; then \
|
if [ ! -d ${DESTDIR}${LIBDIR} ]; then \
|
||||||
${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \
|
${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \
|
||||||
@@ -67,7 +67,7 @@ afterinstall:
|
|||||||
@rm -f ${DESTDIR}${PREFIX}/include/pngconf.h
|
@rm -f ${DESTDIR}${PREFIX}/include/pngconf.h
|
||||||
@rmdir ${DESTDIR}${LIBDIR}/debug 2>/dev/null || true
|
@rmdir ${DESTDIR}${LIBDIR}/debug 2>/dev/null || true
|
||||||
${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
|
${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
|
||||||
-m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include/libpng
|
-m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include
|
||||||
${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
|
${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
|
||||||
-m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include
|
-m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include
|
||||||
${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
|
${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ ZLIBINC=../zlib
|
|||||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||||
CFLAGS=--DPNG_CONFIGURE_LIBPNG I$(ZLIBINC) -W -Wall -O6 -funroll-loops -malign-loops=2 \
|
CFLAGS=-I$(ZLIBINC) -W -Wall -O6 -funroll-loops -malign-loops=2 \
|
||||||
-malign-functions=2 #$(WARNMORE) -g -DPNG_DEBUG=5
|
-malign-functions=2 #$(WARNMORE) -g -DPNG_DEBUG=5
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lzdll -Zcrtdll
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lzdll -Zcrtdll
|
||||||
AR=emxomfar
|
AR=emxomfar
|
||||||
|
|||||||
@@ -41,10 +41,10 @@ exec_prefix=$(prefix)
|
|||||||
ZLIBLIB=../zlib
|
ZLIBLIB=../zlib
|
||||||
ZLIBINC=../zlib
|
ZLIBINC=../zlib
|
||||||
|
|
||||||
CFLAGS= -DPNG_CONFIGURE_LIBPNG -dy -belf -I$(ZLIBINC) -O3
|
CFLAGS= -dy -belf -I$(ZLIBINC) -O3
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng14 -lz -lm
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng14 -lz -lm
|
||||||
|
|
||||||
INCPATH=$(prefix)/include/libpng
|
INCPATH=$(prefix)/include
|
||||||
LIBPATH=$(exec_prefix)/lib
|
LIBPATH=$(exec_prefix)/lib
|
||||||
MANPATH=$(prefix)/man
|
MANPATH=$(prefix)/man
|
||||||
BINPATH=$(exec_prefix)/bin
|
BINPATH=$(exec_prefix)/bin
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ ZLIBINC=../zlib
|
|||||||
ABI=
|
ABI=
|
||||||
|
|
||||||
WARNMORE= # -g -DPNG_DEBUG=5
|
WARNMORE= # -g -DPNG_DEBUG=5
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG $(ABI) -I$(ZLIBINC) -O $(WARNMORE) -fPIC -mabi=n32
|
CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -fPIC -mabi=n32
|
||||||
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||||
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
|
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
|
||||||
-set_version sgi$(PNGMAJ).0
|
-set_version sgi$(PNGMAJ).0
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ ABI=
|
|||||||
|
|
||||||
WARNMORE=-fullwarn
|
WARNMORE=-fullwarn
|
||||||
# Note: -KPIC is the default anyhow
|
# Note: -KPIC is the default anyhow
|
||||||
#CFLAGS= -DPNG_CONFIGURE_LIBPNG $(ABI) -I$(ZLIBINC) -O $(WARNMORE) -KPIC # -g -DPNG_DEBUG=5
|
#CFLAGS= $(ABI) -I$(ZLIBINC) -O $(WARNMORE) -KPIC # -g -DPNG_DEBUG=5
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG $(ABI) -I$(ZLIBINC) -O $(WARNMORE)
|
CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE)
|
||||||
LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng14 -lz -lm
|
LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng14 -lz -lm
|
||||||
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||||
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
|
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ ZLIBINC=/usr/include
|
|||||||
#WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
#WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||||
#CFLAGS=-DPNG_CONFIGURE_LIBPNG -I$(ZLIBINC) -W -Wall -O3 $(WARNMORE) -g -DPNG_DEBUG=5 -DPNG_NO_MMX_CODE
|
#CFLAGS=-I$(ZLIBINC) -W -Wall -O3 $(WARNMORE) -g -DPNG_DEBUG=5 -DPNG_NO_MMX_CODE
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -I$(ZLIBINC) -O3 -DPNG_NO_MMX_CODE
|
CFLAGS=-I$(ZLIBINC) -O3 -DPNG_NO_MMX_CODE
|
||||||
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm
|
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ ZLIBINC=/usr/local/include
|
|||||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -I$(ZLIBINC) -W -Wall -O \
|
CFLAGS=-I$(ZLIBINC) -W -Wall -O \
|
||||||
# $(WARNMORE) -g -DPNG_DEBUG=5
|
# $(WARNMORE) -g -DPNG_DEBUG=5
|
||||||
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm
|
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ LN_SF=ln -sf
|
|||||||
RANLIB=ranlib
|
RANLIB=ranlib
|
||||||
RM_F=rm -f
|
RM_F=rm -f
|
||||||
|
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
|
CFLAGS=-I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ LN_SF=ln -f -s
|
|||||||
RANLIB=ranlib
|
RANLIB=ranlib
|
||||||
RM_F=/bin/rm -f
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -I$(ZLIBINC) -O # $(WARNMORE) -DPNG_DEBUG=5
|
CFLAGS=-I$(ZLIBINC) -O # $(WARNMORE) -DPNG_DEBUG=5
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
# ----- Turbo C 3.00 (can be modified to work with earlier versions) -----
|
# ----- Turbo C 3.00 (can be modified to work with earlier versions) -----
|
||||||
|
|
||||||
MODEL=l
|
MODEL=l
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -O2 -Z -m$(MODEL) -I..\zlib
|
CFLAGS=-O2 -Z -m$(MODEL) -I..\zlib
|
||||||
#CFLAGS=-DPNG_CONFIGURE_LIBPNG -D_NO_PROTO -O2 -Z -m$(MODEL) -I..\zlib # Turbo C older than 3.00
|
#CFLAGS=-D_NO_PROTO -O2 -Z -m$(MODEL) -I..\zlib # Turbo C older than 3.00
|
||||||
CC=tcc
|
CC=tcc
|
||||||
LD=tcc
|
LD=tcc
|
||||||
LIB=tlib
|
LIB=tlib
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
CC = cl
|
CC = cl
|
||||||
LD = link
|
LD = link
|
||||||
AR = lib
|
AR = lib
|
||||||
CFLAGS = -DPNG_CONFIGURE_LIBPNG -nologo -MD -O2 -W3 -I..\zlib
|
CFLAGS = -nologo -MD -O2 -W3 -I..\zlib
|
||||||
LDFLAGS = -nologo
|
LDFLAGS = -nologo
|
||||||
ARFLAGS = -nologo
|
ARFLAGS = -nologo
|
||||||
RM = del
|
RM = del
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ CALLING=r # registers
|
|||||||
|
|
||||||
|
|
||||||
CC=wcc386
|
CC=wcc386
|
||||||
CFLAGS=-DPNG_CONFIGURE_LIBPNG -$(CPU)$(CALLING) -fp$(CPU) -fpi87 -oneatx -mf -bt=$(OS) -i=$(ZLIBINC) -zq
|
CFLAGS=-$(CPU)$(CALLING) -fp$(CPU) -fpi87 -oneatx -mf -bt=$(OS) -i=$(ZLIBINC) -zq
|
||||||
LD=wcl386
|
LD=wcl386
|
||||||
LDFLAGS=-zq
|
LDFLAGS=-zq
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user