?? libmng.h
字號:
/* 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);
/* Indicates existence and required checking of the CRC in input streams,
and generation in output streams */
/* !!!! Use this ONLY if you know what you are doing !!!! */
/* The value is a combination of the following flags:
0x0000001 = CRC is present in the input stream
0x0000002 = CRC must be generated in the output stream
0x0000010 = CRC should be checked for ancillary chunks
0x0000020 = a faulty CRC for ancillary chunks generates a warning only
0x0000040 = a faulty CRC for ancillary chunks generates an error
0x0000100 = CRC should be checked for critical chunks
0x0000200 = a faulty CRC for critical chunks generates a warning only
0x0000400 = a faulty CRC for critical chunks generates an error
The default is 0x00000533 = CRC present in input streams; should be checked;
warning for ancillary chunks; error for critical
chunks; generate CRC for output streams
Note that some combinations are meaningless; eg. if the CRC is not present
it won't do any good to turn the checking flags on; if a checking flag
is off, it doesn't do any good to ask for generation of warnings or errors.
Also libmng will generate either an error or a warning, not both,
so if you specify both the default will be to generate an error!
The only useful combinations for input are 331, 551, 351, 531, 0, 301, 501
and optionally 031 and 051, but only checking ancillary chunks and not
critical chunks is generally not a very good idea!!!
If you've also writing these values should be combined with 0x02 if
CRC's are required in the output stream
*/
MNG_EXT mng_retcode MNG_DECL mng_set_crcmode (mng_handle hHandle,
mng_uint32 iCrcmode);
/* Color-management necessaries */
/*
*************************************************************************
!!!!!!!! THIS NEXT 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 of course)
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.
*************************************************************************
!!!!!!!! THE BIT ABOVE 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
#if defined(MNG_FULL_CMS) || defined(MNG_GAMMA_ONLY) || defined(MNG_APP_CMS)
/* Gamma settings */
/* ... 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,
#endif
mng_uint32 iGamma);
#ifndef MNG_SKIP_MAXCANVAS
/* 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);
#endif
/* 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_ZLIB
MNG_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 docu
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -