📄 libmng_data.h
字号:
mng_uint16 iGlobalBKGDblue;
mng_ptr pDeltaImage; /* delta-image fields */
mng_uint8 iDeltaImagetype;
#endif /* MNG_SUPPORT_DISPLAY */
mng_uint8 iDeltatype; /* need this one in read processing !! */
#ifdef MNG_SUPPORT_DISPLAY
mng_uint32 iDeltaBlockwidth;
mng_uint32 iDeltaBlockheight;
mng_uint32 iDeltaBlockx;
mng_uint32 iDeltaBlocky;
mng_bool bDeltaimmediate;
mng_fptr fDeltagetrow; /* internal delta-proc callbacks */
mng_fptr fDeltaaddrow;
mng_fptr fDeltareplacerow;
mng_fptr fDeltaputrow;
#ifndef MNG_SKIPCHUNK_PROM
mng_fptr fPromoterow; /* internal PROM fields */
mng_fptr fPromBitdepth;
mng_ptr pPromBuf;
mng_uint8 iPromColortype;
mng_uint8 iPromBitdepth;
mng_uint8 iPromFilltype;
mng_uint32 iPromWidth;
mng_ptr pPromSrc;
mng_ptr pPromDst;
#endif
#ifndef MNG_SKIPCHUNK_MAGN
mng_uint16 iMAGNfromid;
mng_uint16 iMAGNcurrentid;
mng_uint16 iMAGNtoid;
#endif
#ifndef MNG_SKIPCHUNK_PAST
mng_uint16 iPASTid;
mng_int32 iPastx; /* target x/y of last PAST */
mng_int32 iPasty;
#endif
mng_objectp pLastseek; /* last processed ani_seek object */
#endif /* MNG_SUPPORT_DISPLAY */
#ifdef MNG_INCLUDE_ZLIB
z_stream sZlib; /* zlib (de)compression variables */
mng_int32 iZlevel; /* zlib compression parameters */
mng_int32 iZmethod;
mng_int32 iZwindowbits;
mng_int32 iZmemlevel;
mng_int32 iZstrategy;
mng_uint32 iMaxIDAT; /* maximum size of IDAT data */
mng_bool bInflating; /* indicates "inflate" in progress */
mng_bool bDeflating; /* indicates "deflate" in progress */
#endif /* MNG_INCLUDE_ZLIB */
#ifdef MNG_INCLUDE_JNG
mngjpeg_dctmethod eJPEGdctmethod; /* IJG compression variables */
mng_int32 iJPEGquality;
mng_int32 iJPEGsmoothing;
mng_bool bJPEGcompressprogr;
mng_bool bJPEGcompressopt;
mng_uint32 iMaxJDAT; /* maximum size of JDAT/JDAA data */
mngjpeg_compp pJPEGcinfo; /* compression structure */
mngjpeg_errorp pJPEGcerr; /* error-manager compress */
mngjpeg_decompp pJPEGdinfo; /* decompression structure (JDAT) */
mngjpeg_errorp pJPEGderr; /* error-manager decompress (JDAT) */
mngjpeg_sourcep pJPEGdsrc; /* source-manager decompress (JDAT) */
mngjpeg_decompp pJPEGdinfo2; /* decompression structure (JDAA) */
mngjpeg_errorp pJPEGderr2; /* error-manager decompress (JDAA) */
mngjpeg_sourcep pJPEGdsrc2; /* source-manager decompress (JDAA) */
mng_uint8p pJPEGbuf; /* buffer for JPEG (de)compression (JDAT) */
mng_uint32 iJPEGbufmax; /* allocated space for buffer (JDAT) */
mng_uint8p pJPEGcurrent; /* current pointer into buffer (JDAT) */
mng_uint32 iJPEGbufremain; /* remaining bytes in buffer (JDAT) */
mng_uint32 iJPEGtoskip; /* bytes to skip on next input-block (JDAT) */
mng_uint8p pJPEGbuf2; /* buffer for JPEG (de)compression (JDAA) */
mng_uint32 iJPEGbufmax2; /* allocated space for buffer (JDAA) */
mng_uint8p pJPEGcurrent2; /* current pointer into buffer (JDAA) */
mng_uint32 iJPEGbufremain2; /* remaining bytes in buffer (JDAA) */
mng_uint32 iJPEGtoskip2; /* bytes to skip on next input-block (JDAA) */
mng_uint8p pJPEGrow; /* buffer for a JPEG row of samples (JDAT) */
mng_uint32 iJPEGrowlen;
mng_uint8p pJPEGrow2; /* buffer for a JPEG row of samples (JDAA) */
mng_uint32 iJPEGrowlen2;
mng_bool bJPEGcompress; /* indicates "compress" initialized */
mng_bool bJPEGdecompress; /* indicates "decompress" initialized (JDAT) */
mng_bool bJPEGhasheader; /* indicates "readheader" succeeded (JDAT) */
mng_bool bJPEGdecostarted; /* indicates "decompress" started (JDAT) */
mng_bool bJPEGscanstarted; /* indicates "first scan" started (JDAT) */
mng_bool bJPEGscanending; /* indicates "finish_output" suspended (JDAT) */
mng_bool bJPEGprogressive; /* indicates a progressive image (JDAT) */
mng_bool bJPEGdecompress2; /* indicates "decompress" initialized (JDAA) */
mng_bool bJPEGhasheader2; /* indicates "readheader" succeeded (JDAA) */
mng_bool bJPEGdecostarted2; /* indicates "decompress" started (JDAA) */
mng_bool bJPEGscanstarted2; /* indicates "first scan" started (JDAA) */
mng_bool bJPEGprogressive2; /* indicates a progressive image (JDAA) */
mng_fptr fStorerow2; /* internal callback to store an
uncompressed/unfiltered row of JPEG-data (JDAT) */
mng_fptr fStorerow3; /* internal callback to store an
uncompressed/unfiltered row of JPEG-data (JDAA) */
mng_uint32 iJPEGrow; /* row-number for current JPEG row */
mng_uint32 iJPEGalpharow; /* nr. of rows filled with alpha */
mng_uint32 iJPEGrgbrow; /* nr. of rows filled with 'color'-info */
mng_uint32 iJPEGdisprow; /* nr. of rows already displayed "on-the-fly" */
#if defined(MNG_USE_SETJMP) && defined (MNG_INCLUDE_IJG6B)
jmp_buf sErrorbuf; /* setjmp/longjmp buffer (error-recovery) */
#endif
#endif /* MNG_INCLUDE_JNG */
#ifndef MNG_USE_ZLIB_CRC
mng_uint32 aCRCtable [256]; /* CRC prefab table */
mng_bool bCRCcomputed; /* "has been built" indicator */
#endif
#ifdef MNG_OPTIMIZE_FOOTPRINT_INIT
png_imgtype ePng_imgtype;
#endif
#if defined(MNG_NO_16BIT_SUPPORT)
mng_uint8 iPNGdepth; /* Real input depth */
mng_uint8 iPNGmult;
#endif
} mng_data;
typedef mng_data * mng_datap;
/* ************************************************************************** */
/* * * */
/* * Internal Callback-Function prototypes * */
/* * * */
/* ************************************************************************** */
typedef mng_retcode(*mng_displayrow) (mng_datap pData);
typedef mng_retcode(*mng_restbkgdrow) (mng_datap pData);
typedef mng_retcode(*mng_correctrow) (mng_datap pData);
typedef mng_retcode(*mng_retrieverow) (mng_datap pData);
typedef mng_retcode(*mng_storerow) (mng_datap pData);
typedef mng_retcode(*mng_processrow) (mng_datap pData);
typedef mng_retcode(*mng_initrowproc) (mng_datap pData);
typedef mng_retcode(*mng_differrow) (mng_datap pData);
typedef mng_retcode(*mng_scalerow) (mng_datap pData);
typedef mng_retcode(*mng_deltarow) (mng_datap pData);
typedef mng_retcode(*mng_promoterow) (mng_datap pData);
typedef mng_retcode(*mng_fliprow) (mng_datap pData);
typedef mng_retcode(*mng_tilerow) (mng_datap pData);
typedef mng_uint8 (*mng_bitdepth_8) (mng_uint8 iB);
typedef mng_uint16 (*mng_bitdepth_16) (mng_uint8 iB);
typedef mng_retcode(*mng_magnify_x) (mng_datap pData,
mng_uint16 iMX,
mng_uint16 iML,
mng_uint16 iMR,
mng_uint32 iWidth,
mng_uint8p iSrcline,
mng_uint8p iDstline);
typedef mng_retcode(*mng_magnify_y) (mng_datap pData,
mng_int32 iM,
mng_int32 iS,
mng_uint32 iWidth,
mng_uint8p iSrcline1,
mng_uint8p iSrcline2,
mng_uint8p iDstline);
/* ************************************************************************** */
/* * * */
/* * Routines for swapping byte-order from and to graphic files * */
/* * (This code is adapted from the libpng package) * */
/* * * */
/* ************************************************************************** */
#ifndef MNG_BIGENDIAN_SUPPORTED
mng_uint32 mng_get_uint32 (mng_uint8p pBuf);
mng_int32 mng_get_int32 (mng_uint8p pBuf);
mng_uint16 mng_get_uint16 (mng_uint8p pBuf);
void mng_put_uint32 (mng_uint8p pBuf,
mng_uint32 i);
void mng_put_int32 (mng_uint8p pBuf,
mng_int32 i);
void mng_put_uint16 (mng_uint8p pBuf,
mng_uint16 i);
#else /* MNG_BIGENDIAN_SUPPORTED */
#define mng_get_uint32(P) *(mng_uint32p)(P)
#define mng_get_int32(P) *(mng_int32p)(P)
#define mng_get_uint16(P) *(mng_uint16p)(P)
#define mng_put_uint32(P,I) *(mng_uint32p)(P) = (I)
#define mng_put_int32(P,I) *(mng_int32p)(P) = (I)
#define mng_put_uint16(P,I) *(mng_uint16p)(P) = (I)
#endif /* MNG_BIGENDIAN_SUPPORTED */
/* ************************************************************************** */
/* * * */
/* * Some handy(?) macro definitions * */
/* * * */
/* ************************************************************************** */
#define MAX_COORD(a, b) (((a) > (b)) ? (a) : (b))
#define MIN_COORD(a, b) (((a) < (b)) ? (a) : (b))
/* ************************************************************************** */
#endif /* _libmng_data_h_ */
/* ************************************************************************** */
/* * end of file * */
/* ************************************************************************** */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -