Imported from pngcrush-1.4.5.tar

This commit is contained in:
Glenn Randers-Pehrson
2000-07-01 07:10:39 -05:00
parent 52ab58fb21
commit 55c878d8e5
33 changed files with 2225 additions and 1340 deletions

View File

@@ -6,11 +6,23 @@
#ifndef PNGCRUSH_H
#define PNGCRUSH_H
#ifdef PNG_LIBPNG_VER
#define PNGCRUSH_LIBPNG_VER PNG_LIBPNG_VER
#else
/* This must agree with PNG_LIBPNG_VER; you have to define it manually
here if you are using libpng-1.0.6h or earlier */
#define PNGCRUSH_LIBPNG_VER 10007
#endif
#ifndef PNG_USER_MEM_SUPPORTED
# define PNG_USER_MEM_SUPPORTED
#endif
#define PNG_NO_LEGACY_SUPPORTED
#define PNG_SETJMP_NOT_SUPPORTED
#if PNG_LIBPNG_VER > 10006
#if PNGCRUSH_LIBPNG_VER > 10006
#define PNG_NO_FLOATING_POINT_SUPPORTED
#define PNG_READ_GRAY_TO_RGB_SUPPORTED
#endif
@@ -19,8 +31,6 @@
#define PNG_NO_WRITE_cHRM
#define PNG_NO_READ_hIST
#define PNG_NO_WRITE_hIST
#define PNG_NO_READ_iCCP
#define PNG_NO_WRITE_iCCP
#define PNG_NO_READ_pCAL
#define PNG_NO_WRITE_pCAL
#define PNG_NO_READ_sCAL
@@ -32,7 +42,7 @@
#define PNG_NO_INFO_IMAGE
#define PNG_NO_READ_USER_CHUNKS
#define PNG_NO_EASY_ACCESS
#define PNG_EASY_ACCESS
#define PNG_NO_READ_DITHER
#define PNG_NO_READ_EMPTY_PLTE
#define PNG_NO_WRITE_TRANSFORMS
@@ -45,27 +55,31 @@
#define PNG_READ_EXPAND_SUPPORTED
#define PNG_READ_FILLER_SUPPORTED
#if (PNG_LIBPNG_VER > 10002)
#if (PNGCRUSH_LIBPNG_VER > 10002)
/* versions 0.96 through 1.0.2 have a stub png_rgb_to_gray() with the
* wrong number of parameters */
# define PNG_READ_RGB_TO_GRAY_SUPPORTED
#endif
#ifndef PNG_NO_iTXt_SUPPORTED
# define PNG_iTXt_SUPPORTED
#endif
#ifndef PNG_NO_FLOATING_POINT_SUPPORTED
# define PNG_READ_GRAY_TO_RGB_SUPPORTED
# define PNG_READ_BACKGROUND_SUPPORTED
# define PNG_READ_GAMMA_SUPPORTED
#else
# if (PNG_LIBPNG_VER < 10007)
# if (PNGCRUSH_LIBPNG_VER < 10007)
# define PNG_NO_READ_RGB_TO_GRAY
# endif
#endif
#if !defined(PNG_ZBUF_SIZE) && (PNG_LIBPNG_VER > 97)
#if !defined(PNG_ZBUF_SIZE) && (PNGCRUSH_LIBPNG_VER > 97)
# define PNG_ZBUF_SIZE 524288 /* increases the IDAT size */
#endif
/* Changed in version 0.99 */
#if PNG_LIBPNG_VER < 99
#if PNGCRUSH_LIBPNG_VER < 99
#undef PNG_CONST
#ifndef PNG_NO_CONST
# define PNG_CONST const
@@ -74,11 +88,10 @@
#endif
#endif
/* We are not supporting legacy code so we don't need the reserved space */
/* This allows png_default_error() to return, when it is called after our
own exception handling, which only returns after "Too many IDAT's",
that we want to handle as a warning instead of an error. */
or anything else that we might want to handle as a warning instead of
an error. */
#define PNG_ABORT()
#endif