📄 libmng.h
字号:
MNG_EXT mng_retcode MNG_DECL mng_set_jpeg_maxjdat (mng_handle hHandle, mng_uint32 iMaxJDAT);#endif /* MNG_INCLUDE_JNG *//* Suspension-mode setting *//* use this to activate the internal suspension-buffer to improve read-suspension processing *//* TODO: write-suspension ??? */ #if defined(MNG_SUPPORT_READ)MNG_EXT mng_retcode MNG_DECL mng_set_suspensionmode (mng_handle hHandle, mng_bool bSuspensionmode);#endif/* Speed setting *//* use this to influence the display-speed of animations */#if defined(MNG_SUPPORT_DISPLAY)MNG_EXT mng_retcode MNG_DECL mng_set_speed (mng_handle hHandle, mng_speedtype iSpeed);#endif/* ************************************************************************** *//* * * *//* * Property get functions * *//* * * *//* ************************************************************************** *//* see _set_ */MNG_EXT mng_ptr MNG_DECL mng_get_userdata (mng_handle hHandle);/* Network Graphic header details *//* these get filled once the graphics header is processed, so they are available in the processheader callback; before that they are zeroed out and imagetype is set to it_unknown *//* this might be a good point for the app to initialize the drawing-canvas! *//* note that some fields are only set for the first(!) header-chunk: MNG/MHDR (imagetype = mng_it_mng) - ticks thru simplicity PNG/IHDR (imagetype = mng_it_png) - bitdepth thru interlace JNG/JHDR (imagetype = mng_it_jng) - bitdepth thru compression & interlace thru alphainterlace */MNG_EXT mng_imgtype MNG_DECL mng_get_sigtype (mng_handle hHandle);MNG_EXT mng_imgtype MNG_DECL mng_get_imagetype (mng_handle hHandle);MNG_EXT mng_uint32 MNG_DECL mng_get_imagewidth (mng_handle hHandle);MNG_EXT mng_uint32 MNG_DECL mng_get_imageheight (mng_handle hHandle);MNG_EXT mng_uint32 MNG_DECL mng_get_ticks (mng_handle hHandle);MNG_EXT mng_uint32 MNG_DECL mng_get_framecount (mng_handle hHandle);MNG_EXT mng_uint32 MNG_DECL mng_get_layercount (mng_handle hHandle);MNG_EXT mng_uint32 MNG_DECL mng_get_playtime (mng_handle hHandle);MNG_EXT mng_uint32 MNG_DECL mng_get_simplicity (mng_handle hHandle);MNG_EXT mng_uint8 MNG_DECL mng_get_bitdepth (mng_handle hHandle);MNG_EXT mng_uint8 MNG_DECL mng_get_colortype (mng_handle hHandle);MNG_EXT mng_uint8 MNG_DECL mng_get_compression (mng_handle hHandle);MNG_EXT mng_uint8 MNG_DECL mng_get_filter (mng_handle hHandle);MNG_EXT mng_uint8 MNG_DECL mng_get_interlace (mng_handle hHandle);MNG_EXT mng_uint8 MNG_DECL mng_get_alphabitdepth (mng_handle hHandle);MNG_EXT mng_uint8 MNG_DECL mng_get_alphacompression(mng_handle hHandle);MNG_EXT mng_uint8 MNG_DECL mng_get_alphafilter (mng_handle hHandle);MNG_EXT mng_uint8 MNG_DECL mng_get_alphainterlace (mng_handle hHandle);/* indicates the predicted alpha-depth required to properly display the image *//* gets set once the graphics header is processed and is available in the processheader callback for any type of input-image (PNG, JNG or MNG) *//* possible values are 0,1,2,4,8,16 0 = no transparency required 1 = on/off transparency required (alpha-values are 0 or 2^bit_depth-1) 2+ = semi-transparency required (values will be scaled to the bitdepth of the canvasstyle supplied by the application) */MNG_EXT mng_uint8 MNG_DECL mng_get_alphadepth (mng_handle hHandle);/* defines whether a refresh() callback is called for an interlace pass (PNG) or progressive scan (JNG) *//* returns the interlace pass number for PNG or a fabricated pass number for JNG; returns 0 in all other cases *//* only useful if the image_type = mng_it_png or mng_it_jng and if the image is actually interlaced (PNG) or progressive (JNG) */MNG_EXT mng_uint8 MNG_DECL mng_get_refreshpass (mng_handle hHandle);/* see _set_ */MNG_EXT mng_uint32 MNG_DECL mng_get_canvasstyle (mng_handle hHandle);MNG_EXT mng_uint32 MNG_DECL mng_get_bkgdstyle (mng_handle hHandle);/* see _set_ */MNG_EXT mng_retcode MNG_DECL mng_get_bgcolor (mng_handle hHandle, mng_uint16* iRed, mng_uint16* iGreen, mng_uint16* iBlue);/* see _set_ */MNG_EXT mng_bool MNG_DECL mng_get_usebkgd (mng_handle hHandle);/* see _set_ */MNG_EXT mng_bool MNG_DECL mng_get_storechunks (mng_handle hHandle);/* see _set_ */MNG_EXT mng_bool MNG_DECL mng_get_sectionbreaks (mng_handle hHandle);/* see _set_ */MNG_EXT mng_bool MNG_DECL mng_get_cacheplayback (mng_handle hHandle);/* see _set_ */MNG_EXT mng_bool MNG_DECL mng_get_doprogressive (mng_handle hHandle);/* see _set_ */#if defined(MNG_SUPPORT_DISPLAY) && defined(MNG_FULL_CMS)MNG_EXT mng_bool MNG_DECL mng_get_srgb (mng_handle hHandle);#endif/* see _set_ */MNG_EXT mng_float MNG_DECL mng_get_viewgamma (mng_handle hHandle);MNG_EXT mng_float MNG_DECL mng_get_displaygamma (mng_handle hHandle);MNG_EXT mng_float MNG_DECL mng_get_dfltimggamma (mng_handle hHandle);MNG_EXT mng_uint32 MNG_DECL mng_get_viewgammaint (mng_handle hHandle);MNG_EXT mng_uint32 MNG_DECL mng_get_displaygammaint (mng_handle hHandle);MNG_EXT mng_uint32 MNG_DECL mng_get_dfltimggammaint (mng_handle hHandle);/* see _set_ */MNG_EXT mng_uint32 MNG_DECL mng_get_maxcanvaswidth (mng_handle hHandle);MNG_EXT mng_uint32 MNG_DECL mng_get_maxcanvasheight (mng_handle hHandle);/* see _set_ */#ifdef MNG_INCLUDE_ZLIBMNG_EXT mng_int32 MNG_DECL mng_get_zlib_level (mng_handle hHandle);MNG_EXT mng_int32 MNG_DECL mng_get_zlib_method (mng_handle hHandle);MNG_EXT mng_int32 MNG_DECL mng_get_zlib_windowbits (mng_handle hHandle);MNG_EXT mng_int32 MNG_DECL mng_get_zlib_memlevel (mng_handle hHandle);MNG_EXT mng_int32 MNG_DECL mng_get_zlib_strategy (mng_handle hHandle);MNG_EXT mng_uint32 MNG_DECL mng_get_zlib_maxidat (mng_handle hHandle);#endif /* MNG_INCLUDE_ZLIB *//* see _set_ */#ifdef MNG_INCLUDE_JNG#ifdef MNG_INCLUDE_IJG6BMNG_EXT mngjpeg_dctmethod MNG_DECL mng_get_jpeg_dctmethod (mng_handle hHandle);#endifMNG_EXT mng_int32 MNG_DECL mng_get_jpeg_quality (mng_handle hHandle);MNG_EXT mng_int32 MNG_DECL mng_get_jpeg_smoothing (mng_handle hHandle);MNG_EXT mng_bool MNG_DECL mng_get_jpeg_progressive(mng_handle hHandle);MNG_EXT mng_bool MNG_DECL mng_get_jpeg_optimized (mng_handle hHandle);MNG_EXT mng_uint32 MNG_DECL mng_get_jpeg_maxjdat (mng_handle hHandle);#endif /* MNG_INCLUDE_JNG *//* see _set_ */#if defined(MNG_SUPPORT_READ)MNG_EXT mng_bool MNG_DECL mng_get_suspensionmode (mng_handle hHandle);#endif/* see _set_ */#if defined(MNG_SUPPORT_DISPLAY)MNG_EXT mng_speedtype MNG_DECL mng_get_speed (mng_handle hHandle);#endif/* Image-level *//* this can be used inside the processtext callback to determine the level of text of the image being processed; the value 1 is returned for top-level texts, and the value 2 for a text inside an embedded image inside a MNG */MNG_EXT mng_uint32 MNG_DECL mng_get_imagelevel (mng_handle hHandle);/* BACK info *//* can be used to retrieve the color & mandatory values for the last processed BACK chunk of a MNG (will fail for other image-types); if no BACK chunk was processed yet, it will return all zeroes */MNG_EXT mng_retcode MNG_DECL mng_get_lastbackchunk (mng_handle hHandle, mng_uint16* iRed, mng_uint16* iGreen, mng_uint16* iBlue, mng_uint8* iMandatory);/* Display status variables *//* these get filled & updated during display processing *//* starttime is the tickcount at the start of displaying the animation *//* runtime is the actual number of millisecs since the start of the animation *//* currentframe, currentlayer & currentplaytime indicate the current frame/layer/playtime(msecs) in the animation (these keep increasing; even after the animation loops back to the TERM chunk) */#if defined(MNG_SUPPORT_DISPLAY)MNG_EXT mng_uint32 MNG_DECL mng_get_starttime (mng_handle hHandle);MNG_EXT mng_uint32 MNG_DECL mng_get_runtime (mng_handle hHandle);MNG_EXT mng_uint32 MNG_DECL mng_get_currentframe (mng_handle hHandle);MNG_EXT mng_uint32 MNG_DECL mng_get_currentlayer (mng_handle hHandle);MNG_EXT mng_uint32 MNG_DECL mng_get_currentplaytime (mng_handle hHandle);#endif/* Status variables *//* these indicate the internal state of the library *//* most indicate exactly what you would expect: status_error returns MNG_TRUE if the last function call returned an errorcode status_reading returns MNG_TRUE if the library is (still) reading an image status_suspendbreak returns MNG_TRUE if the library has suspended for "I/O" status_creating returns MNG_TRUE if the library is in the middle of creating an image status_writing returns MNG_TRUE if the library is in the middle of writing an image status_displaying returns MNG_TRUE if the library is displaying an image status_running returns MNG_TRUE if display processing is active (eg. not frozen or reset) status_timerbreak returns MNG_TRUE if the library has suspended for a "timer-break" *//* eg. mng_readdisplay() will turn the reading, displaying and running status on; when EOF is reached the reading status will be turned off */ MNG_EXT mng_bool MNG_DECL mng_status_error (mng_handle hHandle);#ifdef MNG_SUPPORT_READMNG_EXT mng_bool MNG_DECL mng_status_reading (mng_handle hHandle);MNG_EXT mng_bool MNG_DECL mng_status_suspendbreak (mng_handle hHandle);#endif#ifdef MNG_SUPPORT_WRITEMNG_EXT mng_bool MNG_DECL mng_status_creating (mng_handle hHandle);MNG_EXT mng_bool MNG_DECL mng_status_writing (mng_handle hHandle);#endif#ifdef MNG_SUPPORT_DISPLAYMNG_EXT mng_bool MNG_DECL mng_status_displaying (mng_handle hHandle);MNG_EXT mng_bool MNG_DECL mng_status_running (mng_handle hHandle);MNG_EXT mng_bool MNG_DECL mng_status_timerbreak (mng_handle hHandle);#endif/* ************************************************************************** *//* * * *//* * Chun
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -