📄 libmng_data.h
字号:
mng_uint16 iGlobalBKGDred; /* global bKGD fields */
mng_uint16 iGlobalBKGDgreen;
mng_uint16 iGlobalBKGDblue;
#endif /* MNG_SUPPORT_DISPLAY */
} mng_savedata;
typedef mng_savedata * mng_savedatap;
/* ************************************************************************** */
/* * * */
/* * Internal buffer structure for data push mechanisms * */
/* * * */
/* ************************************************************************** */
typedef struct {
mng_ptr pNext; /* for linked list */
mng_ptr pData; /* used for chunks & data */
mng_uint32 iLength;
mng_bool bOwned;
mng_uint8p pDatanext; /* only used for data */
mng_uint32 iRemaining;
} mng_pushdata;
typedef mng_pushdata * mng_pushdatap;
/* ************************************************************************** */
/* * * */
/* * The main libmng data structure * */
/* * * */
/* * The handle used in all functions points to this structure which * */
/* * contains all volatile data necessary to process the network graphic. * */
/* * * */
/* ************************************************************************** */
typedef struct mng_data_struct {
mng_uint32 iMagic; /* magic number to validate
a given handle */
mng_ptr pUserdata; /* application workdata */
mng_imgtype eSigtype; /* image information */
mng_imgtype eImagetype; /* initially zeroed */
mng_uint32 iWidth; /* filled after header is processed */
mng_uint32 iHeight;
mng_uint32 iTicks; /* these only after MHDR */
mng_uint32 iLayercount;
mng_uint32 iFramecount;
mng_uint32 iPlaytime;
mng_uint32 iSimplicity;
mng_uint8 iAlphadepth; /* indicates expected alpha-depth */
mng_uint32 iImagelevel; /* level of image inside a stream */
mng_uint32 iCanvasstyle; /* layout of the drawing-canvas */
mng_uint32 iBkgdstyle; /* layout of the background-canvas */
mng_int8 iMagnify; /* magnification factor (not used yet) */
mng_uint32 iOffsetx; /* x-offset for extremely large image */
mng_uint32 iOffsety; /* y-offset for extremely large image */
mng_uint32 iCanvaswidth; /* real canvas size */
mng_uint32 iCanvasheight; /* must be set by processheader callback */
mng_uint16 iBGred; /* default background color */
mng_uint16 iBGgreen; /* initially "black" */
mng_uint16 iBGblue;
mng_bool bUseBKGD; /* preferred use of bKGD for PNG */
mng_bool bIssRGB; /* indicates sRGB system */
#ifdef MNG_FULL_CMS /* little CMS variables */
mng_cmsprof hProf1; /* image input profile */
mng_cmsprof hProf2; /* default output profile */
mng_cmsprof hProf3; /* default sRGB profile */
mng_cmstrans hTrans; /* current transformation handle */
#endif
mng_float dViewgamma; /* gamma calculation variables */
mng_float dDisplaygamma; /* initially set for sRGB conditions */
mng_float dDfltimggamma;
mng_bool bStorechunks; /* switch for storing chunkdata */
mng_bool bSectionbreaks; /* indicate NEEDSECTIONWAIT breaks */
mng_bool bCacheplayback; /* switch to cache playback info */
mng_bool bDoProgressive; /* progressive refresh for large images */
mng_uint32 iCrcmode; /* CRC existence & checking flags */
mng_speedtype iSpeed; /* speed-modifier for animations */
mng_uint32 iMaxwidth; /* maximum canvas size */
mng_uint32 iMaxheight; /* initially set to 1024 x 1024 */
mng_int32 iErrorcode; /* error reporting fields */
mng_int8 iSeverity;
mng_int32 iErrorx1;
mng_int32 iErrorx2;
mng_pchar zErrortext;
mng_memalloc fMemalloc; /* callback pointers */
mng_memfree fMemfree; /* initially nulled */
mng_releasedata fReleasedata;
#ifndef MNG_NO_OPEN_CLOSE_STREAM
mng_openstream fOpenstream;
mng_closestream fClosestream;
#endif
mng_readdata fReaddata;
mng_writedata fWritedata;
mng_errorproc fErrorproc;
mng_traceproc fTraceproc;
mng_processheader fProcessheader;
mng_processtext fProcesstext;
mng_processsave fProcesssave;
mng_processseek fProcessseek;
mng_processneed fProcessneed;
mng_processmend fProcessmend;
mng_processunknown fProcessunknown;
mng_processterm fProcessterm;
mng_getcanvasline fGetcanvasline;
mng_getbkgdline fGetbkgdline;
mng_getalphaline fGetalphaline;
mng_refresh fRefresh;
mng_gettickcount fGettickcount;
mng_settimer fSettimer;
mng_processgamma fProcessgamma;
mng_processchroma fProcesschroma;
mng_processsrgb fProcesssrgb;
mng_processiccp fProcessiccp;
mng_processarow fProcessarow;
#if defined(MNG_SUPPORT_READ) || defined(MNG_SUPPORT_WRITE)
#ifndef MNG_NO_OLD_VERSIONS
mng_bool bPreDraft48; /* flags ancient style draft */
#endif
mng_chunkid iChunkname; /* read/write-state variables */
mng_uint32 iChunkseq;
mng_chunkp pFirstchunk; /* double-linked list of */
mng_chunkp pLastchunk; /* stored chunk-structures */
mng_bool bHasheader; /* first header chunk processed */
mng_bool bHasMHDR; /* inside a MHDR-MEND sequence */
mng_bool bHasIHDR; /* inside a IHDR-IEND sequence */
mng_bool bHasBASI; /* inside a BASI-IEND sequence */
mng_bool bHasDHDR; /* inside a DHDR-IEND sequence */
#ifdef MNG_INCLUDE_JNG
mng_bool bHasJHDR; /* inside a JHDR-IEND sequence */
mng_bool bHasJSEP; /* passed the JSEP separator */
mng_bool bHasJDAA; /* at least 1 JDAA processed */
mng_bool bHasJDAT; /* at least 1 JDAT processed */
#endif
mng_bool bHasPLTE; /* PLTE chunk processed */
mng_bool bHasTRNS; /* tRNS chunk processed */
mng_bool bHasGAMA; /* gAMA chunk processed */
mng_bool bHasCHRM; /* cHRM chunk processed */
mng_bool bHasSRGB; /* sRGB chunk processed */
mng_bool bHasICCP; /* iCCP chunk processed */
mng_bool bHasBKGD; /* bKGD chunk processed */
mng_bool bHasIDAT; /* at least 1 IDAT processed */
mng_bool bHasSAVE; /* SAVE chunk processed */
mng_bool bHasBACK; /* BACK chunk processed */
mng_bool bHasFRAM; /* FRAM chunk processed */
mng_bool bHasTERM; /* TERM chunk processed */
mng_bool bHasLOOP; /* at least 1 LOOP open */
mng_bool bHasglobalPLTE; /* global PLTE chunk processed */
mng_bool bHasglobalTRNS; /* global tRNS chunk processed */
mng_bool bHasglobalGAMA; /* global gAMA chunk processed */
mng_bool bHasglobalCHRM; /* global cHRM chunk processed */
mng_bool bHasglobalSRGB; /* global sRGB chunk processed */
mng_bool bHasglobalICCP; /* global iCCP chunk processed */
mng_bool bHasglobalBKGD; /* global bKGD chunk processed */
mng_uint32 iDatawidth; /* IHDR/BASI/DHDR fields */
mng_uint32 iDataheight; /* valid if inside IHDR-IEND, */
mng_uint8 iBitdepth; /* BASI-IEND or DHDR-IEND */
mng_uint8 iColortype;
mng_uint8 iCompression;
mng_uint8 iFilter;
mng_uint8 iInterlace;
mng_uint32 iPLTEcount; /* PLTE fields */
#ifdef MNG_INCLUDE_JNG
mng_uint8 iJHDRcolortype; /* JHDR fields */
mng_uint8 iJHDRimgbitdepth; /* valid if inside JHDR-IEND */
mng_uint8 iJHDRimgcompression;
mng_uint8 iJHDRimginterlace;
mng_uint8 iJHDRalphabitdepth;
mng_uint8 iJHDRalphacompression;
mng_uint8 iJHDRalphafilter;
mng_uint8 iJHDRalphainterlace;
#endif
#endif /* MNG_SUPPORT_READ || MNG_SUPPORT_WRITE */
#ifdef MNG_SUPPORT_READ
mng_bool bReading; /* read processing variables */
mng_bool bHavesig;
mng_bool bEOF;
mng_uint32 iReadbufsize;
mng_uint8p pReadbuf;
mng_uint32 iLargebufsize; /* temp for very large chunks */
mng_uint8p pLargebuf;
mng_uint32 iSuspendtime; /* tickcount at last suspension */
mng_bool bSuspended; /* input-reading has been suspended;
we're expecting a call to
mng_read_resume! */
mng_uint8 iSuspendpoint; /* indicates at which point the flow
was broken to suspend input-reading */
mng_bool bSuspensionmode; /* I/O-suspension variables */
mng_uint32 iSuspendbufsize;
mng_uint8p pSuspendbuf;
mng_uint8p pSuspendbufnext;
mng_uint32 iSuspendbufleft;
mng_uint32 iChunklen; /* chunk length */
mng_uint8p pReadbufnext; /* 32K+ suspension-processing */
mng_uint8p pLargebufnext;
mng_pushdatap pFirstpushchunk; /* variables for push mechanisms */
mng_pushdatap pLastpushchunk;
mng_pushdatap pFirstpushdata;
mng_pushdatap pLastpushdata;
#endif /* MNG_SUPPORT_READ */
#ifdef MNG_SUPPORT_WRITE
mng_bool bCreating; /* create/write processing variables */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -