📄 libmng.h
字号:
MNG_EXT mng_processunknown MNG_DECL mng_getcb_processunknown (mng_handle hHandle);MNG_EXT mng_processterm MNG_DECL mng_getcb_processterm (mng_handle hHandle);#endif/* see _setcb_ */#ifdef MNG_SUPPORT_DISPLAYMNG_EXT mng_getcanvasline MNG_DECL mng_getcb_getcanvasline (mng_handle hHandle);MNG_EXT mng_getbkgdline MNG_DECL mng_getcb_getbkgdline (mng_handle hHandle);MNG_EXT mng_getalphaline MNG_DECL mng_getcb_getalphaline (mng_handle hHandle);MNG_EXT mng_refresh MNG_DECL mng_getcb_refresh (mng_handle hHandle);/* see _setcb_ */MNG_EXT mng_gettickcount MNG_DECL mng_getcb_gettickcount (mng_handle hHandle);MNG_EXT mng_settimer MNG_DECL mng_getcb_settimer (mng_handle hHandle);/* see _setcb_ */#ifdef MNG_APP_CMSMNG_EXT mng_processgamma MNG_DECL mng_getcb_processgamma (mng_handle hHandle);MNG_EXT mng_processchroma MNG_DECL mng_getcb_processchroma (mng_handle hHandle);MNG_EXT mng_processsrgb MNG_DECL mng_getcb_processsrgb (mng_handle hHandle);MNG_EXT mng_processiccp MNG_DECL mng_getcb_processiccp (mng_handle hHandle);MNG_EXT mng_processarow MNG_DECL mng_getcb_processarow (mng_handle hHandle);#endif /* MNG_APP_CMS */#endif /* MNG_SUPPORT_DISPLAY *//* ************************************************************************** *//* * * *//* * Property set functions * *//* * * *//* ************************************************************************** *//* Application data pointer *//* provided for application use; not used by the library */MNG_EXT mng_retcode MNG_DECL mng_set_userdata (mng_handle hHandle, mng_ptr pUserdata);/* The style of the drawing- & background-canvas *//* only used for displaying images *//* both are initially set to 24-bit RGB (eg. 8-bit per channel) */MNG_EXT mng_retcode MNG_DECL mng_set_canvasstyle (mng_handle hHandle, mng_uint32 iStyle);MNG_EXT mng_retcode MNG_DECL mng_set_bkgdstyle (mng_handle hHandle, mng_uint32 iStyle);/* The default background color *//* only used if the getbkgdline callback is not defined *//* for initially painting the canvas and restoring (part of) the background */MNG_EXT mng_retcode MNG_DECL mng_set_bgcolor (mng_handle hHandle, mng_uint16 iRed, mng_uint16 iGreen, mng_uint16 iBlue);/* Indicates preferred use of the bKGD chunk for PNG images */MNG_EXT mng_retcode MNG_DECL mng_set_usebkgd (mng_handle hHandle, mng_bool bUseBKGD);/* Indicates storage of read chunks *//* only useful if you #define mng_store_chunks *//* can be used to dynamically change storage management */MNG_EXT mng_retcode MNG_DECL mng_set_storechunks (mng_handle hHandle, mng_bool bStorechunks);/* Indicates breaks requested when processing SAVE/SEEK *//* set this to let the app handle section breaks; the library will return MNG_NEEDSECTIONWAIT return-codes for each SEEK chunk */MNG_EXT mng_retcode MNG_DECL mng_set_sectionbreaks (mng_handle hHandle, mng_bool bSectionbreaks);/* Indicates storage of playback info (ON by default!) *//* can be used to turn off caching of playback info; this is useful to specifically optimize MNG-video playback; note that if caching is turned off LOOP chunks will be flagged as errors! TERM chunks will be ignored and only passed to the processterm() callback if it is defined by the app; also, this feature can only be used with mng_readdisplay(); mng_read(), mng_display_reset() and mng_display_goxxxx() will return an error; once this option is turned off it can't be turned on for the same stream!!! */MNG_EXT mng_retcode MNG_DECL mng_set_cacheplayback (mng_handle hHandle, mng_bool bCacheplayback);/* Indicates automatic progressive refreshes for large images (ON by default!) *//* turn this off if you do not want intermittent painting while a large image is being read. useful if the input-stream comes from a fast medium, such as a local harddisk */MNG_EXT mng_retcode MNG_DECL mng_set_doprogressive (mng_handle hHandle, mng_bool bDoProgressive);/* Color-management necessaries *//* ************************************************************************* !!!!!!!! THIS BIT IS IMPORTANT !!!!!!!!! ************************************************************************* If you have defined MNG_FULL_CMS (and are using lcms), you will have to think hard about the following routines. lcms requires 2 profiles to work off the differences in the input-image and the output-device. The ICC profile for the input-image will be embedded within it to reflect its color-characteristics, but the output profile depends on the output-device, which is something only *YOU* know about. sRGB (standard RGB) is common for x86 compatible environments (eg. Windows, Linux and some others) If you are compiling for a sRGB compliant system you probably won't have to do anything special. (unless you want to ofcourse) If you are compiling for a non-sRGB compliant system (eg. SGI, Mac, Next, others...) you *MUST* define a proper ICC profile for the generic output-device associated with that platform. In either event, you may also want to offer an option to your users to set the profile manually, or, if you know how, set it from a system-defined default. TO RECAP: for sRGB systems (Windows, Linux) no action required! for non-sRGB systems (SGI, Mac, Next) ACTION REQUIRED! Please visit http://www.srgb.com, http://www.color.org and http://www.littlecms.com for more info. ************************************************************************* !!!!!!!! THIS BIT IS IMPORTANT !!!!!!!!! **************************************************************************//* mng_set_srgb tells libmng if it's running on a sRGB compliant system or not the default is already set to MNG_TRUE *//* mng_set_outputprofile, mng_set_outputprofile2, mng_set_outputsrgb are used to set the default profile describing the output-device by default it is already initialized with an sRGB profile *//* mng_set_srgbprofile, mng_set_srgbprofile2, mng_set_srgbimplicit are used to set the default profile describing a standard sRGB device this is used when the input-image is tagged only as being sRGB, but the output-device is defined as not being sRGB compliant by default it is already initialized with a standard sRGB profile */#if defined(MNG_SUPPORT_DISPLAY)MNG_EXT mng_retcode MNG_DECL mng_set_srgb (mng_handle hHandle, mng_bool bIssRGB);MNG_EXT mng_retcode MNG_DECL mng_set_outputprofile (mng_handle hHandle, mng_pchar zFilename);MNG_EXT mng_retcode MNG_DECL mng_set_outputprofile2 (mng_handle hHandle, mng_uint32 iProfilesize, mng_ptr pProfile);MNG_EXT mng_retcode MNG_DECL mng_set_outputsrgb (mng_handle hHandle);MNG_EXT mng_retcode MNG_DECL mng_set_srgbprofile (mng_handle hHandle, mng_pchar zFilename);MNG_EXT mng_retcode MNG_DECL mng_set_srgbprofile2 (mng_handle hHandle, mng_uint32 iProfilesize, mng_ptr pProfile);MNG_EXT mng_retcode MNG_DECL mng_set_srgbimplicit (mng_handle hHandle);#endif/* Gamma settings *//* only used if you #define MNG_FULL_CMS or #define MNG_GAMMA_ONLY *//* ... blabla (explain gamma processing a little; eg. formula & stuff) ... */MNG_EXT mng_retcode MNG_DECL mng_set_viewgamma (mng_handle hHandle, mng_float dGamma);MNG_EXT mng_retcode MNG_DECL mng_set_displaygamma (mng_handle hHandle, mng_float dGamma);MNG_EXT mng_retcode MNG_DECL mng_set_dfltimggamma (mng_handle hHandle, mng_float dGamma);MNG_EXT mng_retcode MNG_DECL mng_set_viewgammaint (mng_handle hHandle, mng_uint32 iGamma);MNG_EXT mng_retcode MNG_DECL mng_set_displaygammaint (mng_handle hHandle, mng_uint32 iGamma);MNG_EXT mng_retcode MNG_DECL mng_set_dfltimggammaint (mng_handle hHandle, mng_uint32 iGamma);/* Ultimate clipping size *//* used to limit extreme graphics from overloading the system *//* if a graphic exceeds these limits a warning is issued, which can be ignored by the app (using the errorproc callback). in that case the library will use these settings to clip the input graphic, and the app's canvas must account for this */MNG_EXT mng_retcode MNG_DECL mng_set_maxcanvaswidth (mng_handle hHandle, mng_uint32 iMaxwidth);MNG_EXT mng_retcode MNG_DECL mng_set_maxcanvasheight (mng_handle hHandle, mng_uint32 iMaxheight);MNG_EXT mng_retcode MNG_DECL mng_set_maxcanvassize (mng_handle hHandle, mng_uint32 iMaxwidth, mng_uint32 iMaxheight);/* ZLIB default compression parameters *//* these are used when writing out chunks *//* they are also used when compressing PNG image-data or JNG alpha-data; in this case you can set them just before calling mng_putimgdata_ihdr *//* set to your liking; usually the defaults will suffice though! *//* check the documentation for ZLIB for details on these parameters */#ifdef MNG_INCLUDE_ZLIBMNG_EXT mng_retcode MNG_DECL mng_set_zlib_level (mng_handle hHandle, mng_int32 iZlevel);MNG_EXT mng_retcode MNG_DECL mng_set_zlib_method (mng_handle hHandle, mng_int32 iZmethod);MNG_EXT mng_retcode MNG_DECL mng_set_zlib_windowbits (mng_handle hHandle, mng_int32 iZwindowbits);MNG_EXT mng_retcode MNG_DECL mng_set_zlib_memlevel (mng_handle hHandle, mng_int32 iZmemlevel);MNG_EXT mng_retcode MNG_DECL mng_set_zlib_strategy (mng_handle hHandle, mng_int32 iZstrategy);MNG_EXT mng_retcode MNG_DECL mng_set_zlib_maxidat (mng_handle hHandle, mng_uint32 iMaxIDAT);#endif /* MNG_INCLUDE_ZLIB *//* JNG default compression parameters (based on IJG code) *//* these are used when compressing JNG image-data; so you can set them just before calling mng_putimgdata_jhdr *//* set to your liking; usually the defaults will suffice though! *//* check the documentation for IJGSRC6B for details on these parameters */#ifdef MNG_INCLUDE_JNG#ifdef MNG_INCLUDE_IJG6BMNG_EXT mng_retcode MNG_DECL mng_set_jpeg_dctmethod (mng_handle hHandle, mngjpeg_dctmethod eJPEGdctmethod);#endifMNG_EXT mng_retcode MNG_DECL mng_set_jpeg_quality (mng_handle hHandle, mng_int32 iJPEGquality);MNG_EXT mng_retcode MNG_DECL mng_set_jpeg_smoothing (mng_handle hHandle, mng_int32 iJPEGsmoothing);MNG_EXT mng_retcode MNG_DECL mng_set_jpeg_progressive(mng_handle hHandle, mng_bool bJPEGprogressive);MNG_EXT mng_retcode MNG_DECL mng_set_jpeg_optimized (mng_handle hHandle, mng_bool bJPEGoptimized);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -