📄 libmng.h
字号:
/* ************************************************************************** *//* * * *//* * COPYRIGHT NOTICE: * *//* * * *//* * Copyright (c) 2000-2002 Gerard Juyn (gerard@libmng.com) * *//* * [You may insert additional notices after this sentence if you modify * *//* * this source] * *//* * * *//* * For the purposes of this copyright and license, "Contributing Authors" * *//* * is defined as the following set of individuals: * *//* * * *//* * Gerard Juyn (gerard@libmng.com) * *//* * * *//* * The MNG Library is supplied "AS IS". The Contributing Authors * *//* * disclaim all warranties, expressed or implied, including, without * *//* * limitation, the warranties of merchantability and of fitness for any * *//* * purpose. The Contributing Authors assume no liability for direct, * *//* * indirect, incidental, special, exemplary, or consequential damages, * *//* * which may result from the use of the MNG Library, even if advised of * *//* * the possibility of such damage. * *//* * * *//* * Permission is hereby granted to use, copy, modify, and distribute this * *//* * source code, or portions hereof, for any purpose, without fee, subject * *//* * to the following restrictions: * *//* * * *//* * 1. The origin of this source code must not be misrepresented; * *//* * you must not claim that you wrote the original software. * *//* * * *//* * 2. Altered versions must be plainly marked as such and must not be * *//* * misrepresented as being the original source. * *//* * * *//* * 3. This Copyright notice may not be removed or altered from any source * *//* * or altered source distribution. * *//* * * *//* * The Contributing Authors specifically permit, without fee, and * *//* * encourage the use of this source code as a component to supporting * *//* * the MNG and JNG file format in commercial products. If you use this * *//* * source code in a product, acknowledgment would be highly appreciated. * *//* * * *//* ************************************************************************** *//* * * *//* * Parts of this software have been adapted from the libpng package. * *//* * Although this library supports all features from the PNG specification * *//* * (as MNG descends from it) it does not require the libpng package. * *//* * It does require the zlib library and optionally the IJG jpeg library, * *//* * and/or the "little-cms" library by Marti Maria (depending on the * *//* * inclusion of support for JNG and Full-Color-Management respectively. * *//* * * *//* * This library's function is primarily to read and display MNG * *//* * animations. It is not meant as a full-featured image-editing * *//* * component! It does however offer creation and editing functionality * *//* * at the chunk level. * *//* * (future modifications may include some more support for creation * *//* * and or editing) * *//* * * *//* ************************************************************************** *//* ************************************************************************** *//* * * *//* * Version numbering * *//* * * *//* * X.Y.Z : X = release (0 = initial build) * *//* * Y = major version (uneven = test; even = production) * *//* * Z = minor version (bugfixes; 2 is older than 10) * *//* * * *//* * production versions only appear when a test-version is extensively * *//* * tested and found stable or for intermediate bug-fixes (recognized by * *//* * a change in the Z number) * *//* * * *//* * x.1.x = test version * *//* * x.2.x = production version * *//* * x.3.x = test version * *//* * x.4.x = production version * *//* * etc. * *//* * * *//* ************************************************************************** *//* * * *//* * Identifier naming conventions throughout this library * *//* * * *//* * iXxxx = an integer * *//* * dXxxx = a float * *//* * pXxxx = a pointer * *//* * bXxxx = a boolean * *//* * eXxxx = an enumeration * *//* * hXxxx = a handle * *//* * zXxxx = a zero-terminated string (pchar) * *//* * fXxxx = a pointer to a function (callback) * *//* * aXxxx = an array * *//* * sXxxx = a structure * *//* * * *//* * Macros & defines are in all uppercase. * *//* * Functions & typedefs in all lowercase. * *//* * Exported stuff is prefixed with MNG_ or mng_ respectively. * *//* * * *//* * (I may have missed a couple; don't hesitate to let me know!) * *//* * * *//* ************************************************************************** *//* ************************************************************************** *//* * * *//* * project : libmng * *//* * file : libmng.h copyright (c) 2000-2002 G.Juyn * *//* * version : 1.0.4 * *//* * * *//* * purpose : main application interface * *//* * * *//* * author : G.Juyn * *//* * web : http://www.3-t.com * *//* * email : mailto:info@3-t.com * *//* * * *//* * comment : The main application interface. An application should not * *//* * need access to any of the other modules! * *//* * * *//* * changes : 0.5.1 - 05/06/2000 - G.Juyn * *//* * - changed chunk iteration function * *//* * 0.5.1 - 05/08/2000 - G.Juyn * *//* * - added chunk access functions * *//* * - added version control constants & functions * *//* * - changed strict-ANSI stuff * *//* * 0.5.1 - 05/11/2000 - G.Juyn * *//* * - added set_outputprofile2 & set_srgbprofile2 * *//* * - added empty-chunk put-routines * *//* * 0.5.1 - 05/12/2000 - G.Juyn * *//* * - added version_dll & VERSION_DLL (for consistency) * *//* * - added version control explanatory text & samples * *//* * 0.5.1 - 05/15/2000 - G.Juyn * *//* * - added getimgdata & putimgdata functions * *//* * * *//* * 0.5.2 - 05/16/2000 - G.Juyn * *//* * - changed the version parameters (obviously) * *//* * 0.5.2 - 05/18/2000 - G.Juyn * *//* * - complimented constants for chunk-property values * *//* * 0.5.2 - 05/23/2000 - G.Juyn * *//* * - fixed MNG_UINT_pHYg value * *//* * 0.5.2 - 05/24/2000 - G.Juyn * *//* * - added support for get/set default zlib/IJG parms * *//* * 0.5.2 - 06/02/2000 - G.Juyn * *//* * - added MNG_BIGENDIAN_SUPPORT (contributed by Tim Rowley) * *//* * - separated configuration-options into "mng_conf.h" * *//* * - added RGB8_A8 canvasstyle * *//* * - added getalphaline callback for RGB8_A8 canvasstyle * *//* * 0.5.2 - 06/06/2000 - G.Juyn * *//* * - moved errorcodes from "mng_error.h" * *//* * - added mng_read_resume function to support * *//* * read-suspension * *//* * * *//* * 0.5.3 - 06/16/2000 - G.Juyn * *//* * - changed the version parameters (obviously) * *//* * 0.5.3 - 06/21/2000 - G.Juyn * *//* * - added get/set for speedtype to facilitate testing * *//* * - added get for imagelevel during processtext callback * *//* * 0.5.3 - 06/24/2000 - G.Juyn * *//* * - fixed inclusion of IJG read/write code * *//* * 0.5.3 - 06/26/2000 - G.Juyn * *//* * - changed userdata variable to mng_ptr * *//* * * *//* * 0.9.0 - 06/30/2000 - G.Juyn * *//* * - changed refresh parameters to 'x,y,width,height' * *//* * * *//* * 0.9.1 - 07/06/2000 - G.Juyn * *//* * - added MNG_NEEDTIMERWAIT errorcode * *//* * - changed comments to indicate modified behavior for * *//* * timer & suspension breaks * *//* * 0.9.1 - 07/08/2000 - G.Juyn * *//* * - added get routines for internal display variables * *//* * - added get/set routines for suspensionmode variable * *//* * 0.9.1 - 07/15/2000 - G.Juyn * *//* * - added callbacks for SAVE/SEEK processing * *//* * - added get/set routines for sectionbreak variable * *//* * - added NEEDSECTIONWAIT errorcode * *//* * 0.9.1 - 07/19/2000 - G.Juyn * *//* * - added function to set frame-/layer-count & playtime * *//* * - added errorcode for updatemngheader if not a MNG * *//* * * *//* * 0.9.2 - 07/31/2000 - G.Juyn * *//* * - fixed problem with trace-functions improperly wrapped * *//* * - added status_xxxx functions * *//* * 0.9.2 - 08/05/2000 - G.Juyn * *//* * - changed file-prefixes * *//* * - added function to set simplicity field * *//* * * *//* * 0.9.3 - 08/09/2000 - G.Juyn * *//* * - added check for simplicity-bits in MHDR * *//* * 0.9.3 - 08/12/2000 - G.Juyn * *//* * - added workaround for faulty PhotoShop iCCP chunk * *//* * 0.9.3 - 08/26/2000 - G.Juyn * *//* * - added MAGN chunk * *//* * 0.9.3 - 09/07/2000 - G.Juyn * *//* * - added support for new filter_types * *//* * 0.9.3 - 10/10/2000 - G.Juyn * *//* * - added support for alpha-depth prediction * *//* * 0.9.3 - 10/11/2000 - G.Juyn * *//* * - fixed processing of unknown critical chunks * *//* * - removed test-MaGN * *//* * - added PNG/MNG spec version indicators * *//* * - added support for nEED * *//* * 0.9.3 - 10/16/2000 - G.Juyn * *//* * - added functions to retrieve PNG/JNG specific header-info * *//* * - added JDAA chunk * *//* * 0.9.3 - 10/17/2000 - G.Juyn * *//* * - added callback to process non-critical unknown chunks * *//* * 0.9.3 - 10/20/2000 - G.Juyn * *//* * - added errocode for delayed delta-processing * *//* * - added get/set for bKGD preference setting * *//* * 0.9.3 - 10/21/2000 - G.Juyn * *//* * - added get function for interlace/progressive display * *//* * * *//* * 0.9.4 - 01/18/2001 - G.Juyn * *//* * - added errorcode for MAGN methods * *//* * - removed test filter-methods 1 & 65 * *//* * * *//* * 1.0.0 - 02/05/2001 - G.Juyn * *//* * - version numbers (obviously) * *//* * * *//* * 1.0.1 - 02/08/2001 - G.Juyn * *//* * - added MEND processing callback * *//* * 1.0.1 - 04/21/2001 - G.Juyn (code by G.Kelly) * *//* * - added BGRA8 canvas with premultiplied alpha * *//* * 1.0.1 - 05/02/2001 - G.Juyn * *//* * - added "default" sRGB generation (Thanks Marti!) * *//* * * *//* * 1.0.2 - 06/23/2001 - G.Juyn * */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -