⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pngconf.h

📁 Qt/Embedded是一个多平台的C++图形用户界面应用程序框架
💻 H
📖 第 1 页 / 共 3 页
字号:
/* pngconf.h - machine configurable file for libpng * * libpng 1.0.7 - July 1, 2000 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) *//* Any machine specific code is near the front of this file, so if you * are configuring libpng for a machine, you may want to read the section * starting here down to where it starts to typedef png_color, png_text, * and png_info. */#ifndef PNGCONF_H#define PNGCONF_H/* This is the size of the compression buffer, and thus the size of * an IDAT chunk.  Make this whatever size you feel is best for your * machine.  One of these will be allocated per png_struct.  When this * is full, it writes the data to the disk, and does some other * calculations.  Making this an extremely small size will slow * the library down, but you may want to experiment to determine * where it becomes significant, if you are concerned with memory * usage.  Note that zlib allocates at least 32Kb also.  For readers, * this describes the size of the buffer available to read the data in. * Unless this gets smaller than the size of a row (compressed), * it should not make much difference how big this is. */#ifndef PNG_ZBUF_SIZE#define PNG_ZBUF_SIZE 8192#endif#ifndef PNG_NO_FLOATING_POINT_SUPPORTED #define PNG_FLOATING_POINT_SUPPORTED#endif/* If you are running on a machine where you cannot allocate more * than 64K of memory at once, uncomment this.  While libpng will not * normally need that much memory in a chunk (unless you load up a very * large file), zlib needs to know how big of a chunk it can use, and * libpng thus makes sure to check any memory allocation to verify it * will fit into memory.#define PNG_MAX_MALLOC_64K */#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K)#define PNG_MAX_MALLOC_64K#endif/* This protects us against compilers that run on a windowing system * and thus don't have or would rather us not use the stdio types: * stdin, stdout, and stderr.  The only one currently used is stderr * in png_error() and png_warning().  #defining PNG_NO_CONSOLE_IO will * prevent these from being compiled and used. #defining PNG_NO_STDIO * will also prevent these, plus will prevent the entire set of stdio * macros and functions (FILE *, printf, etc.) from being compiled and used, * unless (PNG_DEBUG > 0) has been #defined. * * #define PNG_NO_CONSOLE_IO * #define PNG_NO_STDIO */#ifdef PNG_BUILD_DLL#  ifndef PNG_CONSOLE_IO_SUPPORTED#    ifndef PNG_NO_CONSOLE_IO#      define PNG_NO_CONSOLE_IO#    endif#  endif#endif#  ifdef PNG_NO_STDIO#    ifndef PNG_NO_CONSOLE_IO#      define PNG_NO_CONSOLE_IO#    endif#    ifdef PNG_DEBUG#      if (PNG_DEBUG > 0)#        include <stdio.h>#      endif#    endif#  else#    include <stdio.h>#  endif/* This macro protects us against machines that don't have function * prototypes (ie K&R style headers).  If your compiler does not handle * function prototypes, define this macro and use the included ansi2knr. * I've always been able to use _NO_PROTO as the indicator, but you may * need to drag the empty declaration out in front of here, or change the * ifdef to suit your own needs. */#ifndef PNGARG#ifdef OF /* zlib prototype munger */#define PNGARG(arglist) OF(arglist)#else#ifdef _NO_PROTO#define PNGARG(arglist) ()#else#define PNGARG(arglist) arglist#endif /* _NO_PROTO */#endif /* OF */#endif /* PNGARG *//* Try to determine if we are compiling on a Mac.  Note that testing for * just __MWERKS__ is not good enough, because the Codewarrior is now used * on non-Mac platforms. */#ifndef MACOS#if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \    defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)#define MACOS#endif#endif/* enough people need this for various reasons to include it here */#if !defined(MACOS) && !defined(RISCOS)#include <sys/types.h>#endif#ifndef PNG_SETJMP_NOT_SUPPORTED#  define PNG_SETJMP_SUPPORTED#endif#ifdef PNG_SETJMP_SUPPORTED/* This is an attempt to force a single setjmp behaviour on Linux.  If * the X config stuff didn't define _BSD_SOURCE we wouldn't need this. */#  ifdef __linux__#    ifdef _BSD_SOURCE#      define PNG_SAVE_BSD_SOURCE#      undef _BSD_SOURCE#    endif#    ifdef _SETJMP_H      __png.h__ already includes setjmp.h;      __dont__ include it again.;#    endif#endif /* __linux__ *//* include setjmp.h for error handling */#include <setjmp.h>#  ifdef __linux__#    ifdef PNG_SAVE_BSD_SOURCE#      define _BSD_SOURCE#      undef PNG_SAVE_BSD_SOURCE#    endif#  endif /* __linux__ */#endif /* PNG_SETJMP_SUPPORTED *//*   Trolltech note: this xlc preprocessor bug seems connected to the use of   the -qlanglvl=classic option which is broken. We don't use this option   anymore so let's get rid of the workaround.*/#if 0 && defined(_AIX) && defined(__xlC__)/* This prevents "AIX/xlC" from generating an "index(s,c)" macro in strings.h * that conflicts with libpng's png_color_16.index */#undef __STR__#endif#ifdef BSD#include <strings.h>#else#include <string.h>#endif/* Other defines for things like memory and the like can go here.  */#ifdef PNG_INTERNAL#include <stdlib.h>/* The functions exported by PNG_EXTERN are PNG_INTERNAL functions, which * aren't usually used outside the library (as far as I know), so it is * debatable if they should be exported at all.  In the future, when it is * possible to have run-time registry of chunk-handling functions, some of * these will be made available again.#define PNG_EXTERN extern */#define PNG_EXTERN/* Other defines specific to compilers can go here.  Try to keep * them inside an appropriate ifdef/endif pair for portability. */#if defined(PNG_FLOATING_POINT_SUPPORTED)#if defined(MACOS)/* We need to check that <math.h> hasn't already been included earlier * as it seems it doesn't agree with <fp.h>, yet we should really use * <fp.h> if possible. */#if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)#include <fp.h>#endif#else#include <math.h>#endif#if defined(_AMIGA) && defined(__SASC) && defined(_M68881)/* Amiga SAS/C: We must include builtin FPU functions when compiling using * MATH=68881 */#include <m68881.h>#endif#endif/* Codewarrior on NT has linking problems without this. */#if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__)#define PNG_ALWAYS_EXTERN#endif/* For some reason, Borland C++ defines memcmp, etc. in mem.h, not * stdlib.h like it should (I think).  Or perhaps this is a C++ * "feature"? */#ifdef __TURBOC__#include <mem.h>#include "alloc.h"#endif#ifdef _MSC_VER#include <malloc.h>#endif/* This controls how fine the dithering gets.  As this allocates * a largish chunk of memory (32K), those who are not as concerned * with dithering quality can decrease some or all of these. */#ifndef PNG_DITHER_RED_BITS#define PNG_DITHER_RED_BITS 5#endif#ifndef PNG_DITHER_GREEN_BITS#define PNG_DITHER_GREEN_BITS 5#endif#ifndef PNG_DITHER_BLUE_BITS#define PNG_DITHER_BLUE_BITS 5#endif/* This controls how fine the gamma correction becomes when you * are only interested in 8 bits anyway.  Increasing this value * results in more memory being used, and more pow() functions * being called to fill in the gamma tables.  Don't set this value * less then 8, and even that may not work (I haven't tested it). */#ifndef PNG_MAX_GAMMA_8#define PNG_MAX_GAMMA_8 11#endif/* This controls how much a difference in gamma we can tolerate before * we actually start doing gamma conversion. */#ifndef PNG_GAMMA_THRESHOLD#define PNG_GAMMA_THRESHOLD 0.05#endif#endif /* PNG_INTERNAL *//* The following uses const char * instead of char * for error * and warning message functions, so some compilers won't complain. * If you do not want to use const, define PNG_NO_CONST here. */#ifndef PNG_NO_CONST#  define PNG_CONST const#else#  define PNG_CONST#endif/* The following defines give you the ability to remove code from the * library that you will not be using.  I wish I could figure out how to * automate this, but I can't do that without making it seriously hard * on the users.  So if you are not using an ability, change the #define * to and #undef, and that part of the library will not be compiled.  If * your linker can't find a function, you may want to make sure the * ability is defined here.  Some of these depend upon some others being * defined.  I haven't figured out all the interactions here, so you may * have to experiment awhile to get everything to compile.  If you are * creating or using a shared library, you probably shouldn't touch this, * as it will affect the size of the structures, and this will cause bad * things to happen if the library and/or application ever change. *//* Any features you will not be using can be undef'ed here *//* GR-P, 0.96a: Set "*TRANSFORMS_SUPPORTED as default but allow user * to turn it off with "*TRANSFORMS_NOT_SUPPORTED" or *PNG_NO_*_TRANSFORMS * on the compile line, then pick and choose which ones to define without * having to edit this file. It is safe to use the *TRANSFORMS_NOT_SUPPORTED * if you only want to have a png-compliant reader/writer but don't need * any of the extra transformations.  This saves about 80 kbytes in a * typical installation of the library. (PNG_NO_* form added in version * 1.0.1c, for consistency) *//* The size of the png_text structure changed in libpng-1.0.6 when * iTXt is supported.  It is turned off by default, to support old apps * that malloc the png_text structure instead of calling png_set_text() * and letting libpng malloc it.  It will be turned on by default in * libpng-2.0.0. */#ifndef PNG_iTXt_SUPPORTED#  ifndef PNG_READ_iTXt_SUPPORTED#    define PNG_NO_READ_iTXt#  endif#  ifndef PNG_WRITE_iTXt_SUPPORTED#    define PNG_NO_WRITE_iTXt#  endif#endif/* The following support, added after version 1.0.0, can be turned off here en * masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility * with old applications that require the length of png_struct and png_info * to remain unchanged. */#ifdef PNG_LEGACY_SUPPORTED#define PNG_NO_FREE_ME#define PNG_NO_READ_UNKNOWN_CHUNKS#define PNG_NO_WRITE_UNKNOWN_CHUNKS#define PNG_NO_READ_USER_CHUNKS#define PNG_NO_READ_iCCP#define PNG_NO_WRITE_iCCP#define PNG_NO_READ_iTXt#define PNG_NO_WRITE_iTXt#define PNG_NO_READ_sCAL#define PNG_NO_WRITE_sCAL#define PNG_NO_READ_sPLT#define PNG_NO_WRITE_sPLT#define PNG_NO_INFO_IMAGE#define PNG_NO_READ_RGB_TO_GRAY#define PNG_NO_READ_USER_TRANSFORM#define PNG_NO_WRITE_USER_TRANSFORM#define PNG_NO_USER_MEM#define PNG_NO_READ_EMPTY_PLTE#define PNG_NO_FIXED_POINT_SUPPORTED#endif/* Ignore attempt to turn off both floating and fixed point support */#if !defined(PNG_FLOATING_POINT_SUPPORTED) || \ !defined(PNG_NO_FIXED_POINT_SUPPORTED)#define PNG_FIXED_POINT_SUPPORTED#endif#ifndef PNG_NO_FREE_ME#define PNG_FREE_ME_SUPPORTED#endif#if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \    !defined(PNG_NO_READ_TRANSFORMS)#define PNG_READ_TRANSFORMS_SUPPORTED#endif#if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \    !defined(PNG_NO_WRITE_TRANSFORMS)#define PNG_WRITE_TRANSFORMS_SUPPORTED#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -