зеркало из https://github.com/mozilla/gecko-dev.git
Bug 66989 - update libmng, flush animation frames, quiet warnings.
r=pavlov, sr=brendan
This commit is contained in:
Родитель
939a2cb281
Коммит
e9cef94eb4
|
@ -1,26 +1,74 @@
|
|||
-----------------------------------------------------------
|
||||
|
||||
0.9.4 (xxxx nnth 2000)
|
||||
0.9.5 (... ..th 2001)
|
||||
----------------------
|
||||
|
||||
in short:
|
||||
|
||||
intermediate for now
|
||||
intermediate
|
||||
|
||||
-------------------
|
||||
|
||||
bugfixes:
|
||||
B129681 - fixed compiler warnings SGI/Irix (thanks Dimitri)
|
||||
|
||||
core:
|
||||
- fixed compiler-warnings Mozilla (thanks Tim)
|
||||
- fixed timing-problem with switching framing_modes
|
||||
- fixed some small compiler warnings (thanks Nikki)
|
||||
|
||||
samples:
|
||||
|
||||
contrib:
|
||||
|
||||
doc:
|
||||
|
||||
makefiles:
|
||||
|
||||
autoconf:
|
||||
|
||||
-----------------------------------------------------------
|
||||
|
||||
0.9.4 (Jan 19th 2001)
|
||||
----------------------
|
||||
|
||||
in short:
|
||||
|
||||
Now that the MNG spec is at 1.0, this should be the last beta. There's a few
|
||||
small changes to make it inline with the spec, and a couple of bug-fixes.
|
||||
This is a serious release-candidate for libmng-1.0!!
|
||||
Please... test test test test!!
|
||||
|
||||
-------------------
|
||||
|
||||
bugfixes:
|
||||
B123314 - fixed number of TERM related problems
|
||||
B123322 - fixed unwanted repetition in mng_readdisplay()
|
||||
B123443 - fixed by Ralph
|
||||
B124910 - fixed definition for WIN32_LEAN_AND_MEAN (thanks Chad)
|
||||
B125750 - fixed by Ralph
|
||||
B125756 - fixed mixup of data- & function-pointers (thanks Dimitri)
|
||||
B127517 - changed inclusion of the lcms header file for non-windows platforms
|
||||
|
||||
core:
|
||||
- version numbers
|
||||
- fixed possible loop in display_resume() (Thanks Vova!)
|
||||
- fixed unwanted repetition in mng_readdisplay()
|
||||
- changed inclusion of the lcms header file for non-windows platforms
|
||||
- changed IHDR filter_method check for PNGs
|
||||
- moved restore of object 0 to libmng_display
|
||||
- added restore of object 0 to TERM processing !!!
|
||||
- fixed TERM delay processing
|
||||
- fixed TERM end processing (count = 0)
|
||||
- changed IHDR filter_method check for PNGs
|
||||
- moved restore of object 0 to libmng_display
|
||||
- added restore of object 0 to TERM processing (B123314)
|
||||
- fixed TERM delay processing (B123314)
|
||||
- fixed TERM end processing when count = 0 (B123314)
|
||||
- changed callback convention for MSVC (Thanks Chad)
|
||||
- fixed mixup of data- & function-pointers (thanks Dimitri)
|
||||
- added support for "nEED MNG-1.0"
|
||||
- added errorcode for MAGN methods
|
||||
- added errorchecking for MAGN methods
|
||||
- removed "old" MAGN methods 3 & 4
|
||||
- added "new" MAGN methods 3, 4 & 5
|
||||
- removed test filter-methods 1 & 65
|
||||
- set default level-set for filtertype=64 to all zeroes
|
||||
|
||||
samples:
|
||||
|
||||
|
@ -30,6 +78,7 @@ contrib:
|
|||
- updated Jason Summer's mngplg to version 0.9.2
|
||||
(that's mngplg-0.9.2 based on libmng-0.9.3 !!!)
|
||||
- rearranged contrib directory slightly
|
||||
- added MSVC project to build libmng.dll by Chad Austin
|
||||
|
||||
doc:
|
||||
- added README.dll
|
||||
|
@ -76,8 +125,8 @@ suggestions and testing this little baby. This would get nowhere without YOU!!!
|
|||
-------------------
|
||||
|
||||
bugfixes:
|
||||
- B111300 - fixup for improved portability
|
||||
- B117103 - fixed compilation errors on *nix with lcms (thanks Ralph!)
|
||||
B111300 - fixup for improved portability
|
||||
B117103 - fixed compilation errors on *nix with lcms (thanks Ralph!)
|
||||
|
||||
core:
|
||||
- fixed compiler-warnings from Mozilla
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
libmng v0.9.3
|
||||
-------------
|
||||
libmng 0.9.4
|
||||
------------
|
||||
|
||||
This is the fourth beta-release!
|
||||
This is the fifth (and last?) beta-release!
|
||||
|
||||
Quite a few changes, since there has been several changes in the MNG spec.
|
||||
Also fixes a number of problems that have surfaced during extensive tests.
|
||||
And a number of functions have been added to facilitate in integrating
|
||||
the library in a multitude of applications, as these were the result of
|
||||
requests from several implementors.
|
||||
A few small amendments from the spec, and a couple of minor bug-fixes.
|
||||
|
||||
This is another release candidate. If no significant problems are discovered,
|
||||
libmng 1.0.0 will be just around the corner!
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
/* * * */
|
||||
/* * project : libmng * */
|
||||
/* * file : libmng.h copyright (c) 2000 G.Juyn * */
|
||||
/* * version : 0.9.3 * */
|
||||
/* * version : 0.9.5 * */
|
||||
/* * * */
|
||||
/* * purpose : main application interface * */
|
||||
/* * * */
|
||||
|
@ -205,6 +205,10 @@
|
|||
/* * 0.9.3 - 10/21/2000 - G.Juyn * */
|
||||
/* * - added get function for interlace/progressive display * */
|
||||
/* * * */
|
||||
/* * 0.9.4 - 1/18/2001 - G.Juyn * */
|
||||
/* * - added errorcode for MAGN methods * */
|
||||
/* * - removed test filter-methods 1 & 65 * */
|
||||
/* * * */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#if defined(__BORLANDC__) && defined(MNG_STRICT_ANSI)
|
||||
|
@ -343,12 +347,12 @@ extern "C" {
|
|||
/* * * */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#define MNG_VERSION_TEXT "0.9.4"
|
||||
#define MNG_VERSION_TEXT "0.9.5"
|
||||
#define MNG_VERSION_SO 0 /* eg. libmng.so.0 (while in test/beta) */
|
||||
#define MNG_VERSION_DLL 0 /* eg. libmng.dll (nb. same for version 1) */
|
||||
#define MNG_VERSION_MAJOR 0
|
||||
#define MNG_VERSION_MINOR 9
|
||||
#define MNG_VERSION_RELEASE 4
|
||||
#define MNG_VERSION_RELEASE 5
|
||||
|
||||
MNG_EXT mng_pchar MNG_DECL mng_version_text (void);
|
||||
MNG_EXT mng_uint8 MNG_DECL mng_version_so (void);
|
||||
|
@ -367,10 +371,10 @@ MNG_EXT mng_uint8 MNG_DECL mng_version_release (void);
|
|||
#define MNG_PNG_VERSION_MAJ 1
|
||||
#define MNG_PNG_VERSION_MIN 2
|
||||
|
||||
#define MNG_MNG_VERSION "0.98a"
|
||||
#define MNG_MNG_VERSION_MAJ 0
|
||||
#define MNG_MNG_VERSION_MIN 98
|
||||
#define MNG_MNG_DRAFT 81
|
||||
#define MNG_MNG_VERSION "1.0"
|
||||
#define MNG_MNG_VERSION_MAJ 1
|
||||
#define MNG_MNG_VERSION_MIN 0
|
||||
#define MNG_MNG_DRAFT 99
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* * * */
|
||||
|
@ -2026,6 +2030,7 @@ MNG_EXT mng_retcode MNG_DECL mng_updatemngsimplicity (mng_handle hHandle,
|
|||
#define MNG_UNKNOWNCRITICAL (mng_retcode)1061 /* unknown critical chunk found*/
|
||||
#define MNG_UNSUPPORTEDNEED (mng_retcode)1062 /* nEED requirement unsupported*/
|
||||
#define MNG_INVALIDDELTA (mng_retcode)1063 /* Delta operation illegal */
|
||||
#define MNG_INVALIDMETHOD (mng_retcode)1064 /* invalid MAGN method */
|
||||
|
||||
#define MNG_INVALIDCNVSTYLE (mng_retcode)2049 /* can't make anything of this */
|
||||
#define MNG_WRONGCHUNK (mng_retcode)2050 /* accessing the wrong chunk */
|
||||
|
@ -2184,10 +2189,10 @@ MNG_EXT mng_retcode MNG_DECL mng_updatemngsimplicity (mng_handle hHandle,
|
|||
BASI, JHDR */
|
||||
|
||||
#define MNG_FILTER_ADAPTIVE 0 /* IHDR, BASI, JHDR */
|
||||
#define MNG_FILTER_NO_ADAPTIVE 1
|
||||
/* #define MNG_FILTER_NO_ADAPTIVE 1 */
|
||||
#define MNG_FILTER_NO_DIFFERING 0
|
||||
#define MNG_FILTER_DIFFERING 0x40
|
||||
#define MNG_FILTER_MASK (MNG_FILTER_NO_ADAPTIVE | MNG_FILTER_DIFFERING)
|
||||
/* #define MNG_FILTER_MASK (MNG_FILTER_NO_ADAPTIVE | MNG_FILTER_DIFFERING) */
|
||||
|
||||
#define MNG_INTERLACE_NONE 0 /* IHDR, BASI, JHDR */
|
||||
#define MNG_INTERLACE_ADAM7 1
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/* * * */
|
||||
/* * project : libmng * */
|
||||
/* * file : libmng_chunk_io.c copyright (c) 2000 G.Juyn * */
|
||||
/* * version : 0.9.3 * */
|
||||
/* * version : 0.9.5 * */
|
||||
/* * * */
|
||||
/* * purpose : Chunk I/O routines (implementation) * */
|
||||
/* * * */
|
||||
|
@ -135,6 +135,12 @@
|
|||
/* * * */
|
||||
/* * 0.9.4 - 11/20/2000 - G.Juyn * */
|
||||
/* * - changed IHDR filter_method check for PNGs * */
|
||||
/* * 0.9.4 - 1/18/2001 - G.Juyn * */
|
||||
/* * - added errorchecking for MAGN methods * */
|
||||
/* * - removed test filter-methods 1 & 65 * */
|
||||
/* * * */
|
||||
/* * 0.9.5 - 1/25/2001 - G.Juyn * */
|
||||
/* * - fixed some small compiler warnings (thanks Nikki) * */
|
||||
/* * * */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -600,7 +606,7 @@ READ_CHUNK (read_ihdr)
|
|||
if ((pData->eSigtype == mng_it_png) && (pData->iFilter))
|
||||
MNG_ERROR (pData, MNG_INVALIDFILTER)
|
||||
else
|
||||
if (pData->iFilter & (~MNG_FILTER_MASK))
|
||||
if (pData->iFilter & (~MNG_FILTER_DIFFERING))
|
||||
MNG_ERROR (pData, MNG_INVALIDFILTER)
|
||||
|
||||
if ((pData->iInterlace != MNG_INTERLACE_NONE ) &&
|
||||
|
@ -3450,7 +3456,7 @@ READ_CHUNK (read_basi)
|
|||
if (pData->iCompression != MNG_COMPRESSION_DEFLATE)
|
||||
MNG_ERROR (pData, MNG_INVALIDCOMPRESS)
|
||||
|
||||
if (pData->iFilter != MNG_FILTER_ADAPTIVE)
|
||||
if (pData->iFilter & (~MNG_FILTER_DIFFERING))
|
||||
MNG_ERROR (pData, MNG_INVALIDFILTER)
|
||||
|
||||
if ((pData->iInterlace != MNG_INTERLACE_NONE ) &&
|
||||
|
@ -4977,6 +4983,14 @@ mng_bool CheckKeyword (mng_datap pData,
|
|||
iDraft = (*(pKeyword+6) - '0') * 10 + (*(pKeyword+7) - '0');
|
||||
bOke = (mng_bool)(iDraft <= MNG_MNG_DRAFT);
|
||||
}
|
||||
/* test MNG 1.0 ? */
|
||||
if ((!bOke) && (pNull - pKeyword == 7) &&
|
||||
(*pKeyword == 'M') && (*(pKeyword+1) == 'N') &&
|
||||
(*(pKeyword+2) == 'G') && (*(pKeyword+3) == '-') &&
|
||||
(*(pKeyword+4) == '1') && (*(pKeyword+5) == '.') &&
|
||||
(*(pKeyword+6) == '0'))
|
||||
bOke = MNG_TRUE;
|
||||
|
||||
}
|
||||
|
||||
return bOke;
|
||||
|
@ -5184,7 +5198,7 @@ READ_CHUNK (read_jhdr)
|
|||
(pData->iJHDRalphabitdepth != 8 ) )
|
||||
MNG_ERROR (pData, MNG_INVALIDBITDEPTH)
|
||||
|
||||
if (pData->iJHDRalphafilter & (~MNG_FILTER_MASK))
|
||||
if (pData->iJHDRalphafilter & (~MNG_FILTER_DIFFERING))
|
||||
MNG_ERROR (pData, MNG_INVALIDFILTER)
|
||||
|
||||
if ((pData->iJHDRalphainterlace != MNG_INTERLACE_NONE ) &&
|
||||
|
@ -6131,6 +6145,9 @@ READ_CHUNK (read_magn)
|
|||
iMethodY = mng_get_uint16 (pRawdata+18);
|
||||
else
|
||||
iMethodY = iMethodX;
|
||||
/* check field validity */
|
||||
if ((iMethodX > 5) || (iMethodY > 5))
|
||||
MNG_ERROR (pData, MNG_INVALIDMETHOD)
|
||||
|
||||
#ifdef MNG_SUPPORT_DISPLAY
|
||||
{
|
||||
|
@ -6406,15 +6423,15 @@ WRITE_CHUNK (write_trns)
|
|||
{
|
||||
case 0: {
|
||||
iRawlen = 1; /* fill the size & output buffer */
|
||||
*pRawdata = pTRNS->iGray;
|
||||
*pRawdata = (mng_uint8)pTRNS->iGray;
|
||||
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
iRawlen = 3; /* fill the size & output buffer */
|
||||
*pRawdata = pTRNS->iRed;
|
||||
*(pRawdata+1) = pTRNS->iGreen;
|
||||
*(pRawdata+2) = pTRNS->iBlue;
|
||||
*pRawdata = (mng_uint8)pTRNS->iRed;
|
||||
*(pRawdata+1) = (mng_uint8)pTRNS->iGreen;
|
||||
*(pRawdata+2) = (mng_uint8)pTRNS->iBlue;
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -6864,15 +6881,15 @@ WRITE_CHUNK (write_bkgd)
|
|||
{
|
||||
case 0: { /* gray */
|
||||
iRawlen = 1; /* fill the size & output buffer */
|
||||
*pRawdata = pBKGD->iGray;
|
||||
*pRawdata = (mng_uint8)pBKGD->iGray;
|
||||
|
||||
break;
|
||||
}
|
||||
case 2: { /* rgb */
|
||||
iRawlen = 3; /* fill the size & output buffer */
|
||||
*pRawdata = pBKGD->iRed;
|
||||
*(pRawdata+1) = pBKGD->iGreen;
|
||||
*(pRawdata+2) = pBKGD->iBlue;
|
||||
*pRawdata = (mng_uint8)pBKGD->iRed;
|
||||
*(pRawdata+1) = (mng_uint8)pBKGD->iGreen;
|
||||
*(pRawdata+2) = (mng_uint8)pBKGD->iBlue;
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/* * * */
|
||||
/* * project : libmng * */
|
||||
/* * file : libmng_chunk_xs.c copyright (c) 2000 G. Juyn * */
|
||||
/* * version : 0.9.3 * */
|
||||
/* * version : 0.9.5 * */
|
||||
/* * * */
|
||||
/* * purpose : chunk access functions (implementation) * */
|
||||
/* * * */
|
||||
|
@ -49,6 +49,9 @@
|
|||
/* * 0.9.3 - 10/20/2000 - G.Juyn * */
|
||||
/* * - fixed putchunk_plte() to set bEmpty parameter * */
|
||||
/* * * */
|
||||
/* * 0.9.5 - 1/25/2001 - G.Juyn * */
|
||||
/* * - fixed some small compiler warnings (thanks Nikki) * */
|
||||
/* * * */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libmng.h"
|
||||
|
@ -4565,10 +4568,10 @@ mng_retcode MNG_DECL mng_putchunk_pplt_entry (mng_handle hHandle,
|
|||
/* address proper entry */
|
||||
pEntry = (mng_pplt_entryp)(((mng_ppltp)pChunk)->aEntries) + iEntry;
|
||||
|
||||
pEntry->iRed = iRed; /* fill the entry */
|
||||
pEntry->iGreen = iGreen;
|
||||
pEntry->iBlue = iBlue;
|
||||
pEntry->iAlpha = iAlpha;
|
||||
pEntry->iRed = (mng_uint8)iRed; /* fill the entry */
|
||||
pEntry->iGreen = (mng_uint8)iGreen;
|
||||
pEntry->iBlue = (mng_uint8)iBlue;
|
||||
pEntry->iAlpha = (mng_uint8)iAlpha;
|
||||
pEntry->bUsed = bUsed;
|
||||
|
||||
#ifdef MNG_SUPPORT_TRACE
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/* * * */
|
||||
/* * project : libmng * */
|
||||
/* * file : libmng_cms.c copyright (c) 2000 G.Juyn * */
|
||||
/* * version : 0.9.3 * */
|
||||
/* * version : 0.9.4 * */
|
||||
/* * * */
|
||||
/* * purpose : color management routines (implementation) * */
|
||||
/* * * */
|
||||
|
@ -42,6 +42,9 @@
|
|||
/* * 0.9.3 - 08/31/2000 - G.Juyn * */
|
||||
/* * - fixed sRGB precedence for gamma_only corection * */
|
||||
/* * * */
|
||||
/* * 0.9.4 - 12/16/2000 - G.Juyn * */
|
||||
/* * - fixed mixup of data- & function-pointers (thanks Dimitri)* */
|
||||
/* * * */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libmng.h"
|
||||
|
@ -169,7 +172,7 @@ mng_retcode init_full_cms (mng_datap pData)
|
|||
if (!hTrans) /* handle error ? */
|
||||
MNG_ERRORL (pData, MNG_LCMS_NOTRANS)
|
||||
/* load color-correction routine */
|
||||
pData->fCorrectrow = (mng_ptr)correct_full_cms;
|
||||
pData->fCorrectrow = (mng_fptr)correct_full_cms;
|
||||
|
||||
return MNG_NOERROR; /* and done */
|
||||
}
|
||||
|
@ -205,7 +208,7 @@ mng_retcode init_full_cms (mng_datap pData)
|
|||
if (!hTrans) /* handle error ? */
|
||||
MNG_ERRORL (pData, MNG_LCMS_NOTRANS)
|
||||
/* load color-correction routine */
|
||||
pData->fCorrectrow = (mng_ptr)correct_full_cms;
|
||||
pData->fCorrectrow = (mng_fptr)correct_full_cms;
|
||||
|
||||
return MNG_NOERROR; /* and done */
|
||||
}
|
||||
|
@ -289,7 +292,7 @@ mng_retcode init_full_cms (mng_datap pData)
|
|||
if (!hTrans) /* handle error ? */
|
||||
MNG_ERRORL (pData, MNG_LCMS_NOTRANS)
|
||||
/* load color-correction routine */
|
||||
pData->fCorrectrow = (mng_ptr)correct_full_cms;
|
||||
pData->fCorrectrow = (mng_fptr)correct_full_cms;
|
||||
|
||||
return MNG_NOERROR; /* and done */
|
||||
}
|
||||
|
@ -345,7 +348,7 @@ mng_retcode init_full_cms_object (mng_datap pData)
|
|||
if (!hTrans) /* handle error ? */
|
||||
MNG_ERRORL (pData, MNG_LCMS_NOTRANS)
|
||||
/* load color-correction routine */
|
||||
pData->fCorrectrow = (mng_ptr)correct_full_cms;
|
||||
pData->fCorrectrow = (mng_fptr)correct_full_cms;
|
||||
|
||||
return MNG_NOERROR; /* and done */
|
||||
}
|
||||
|
@ -374,7 +377,7 @@ mng_retcode init_full_cms_object (mng_datap pData)
|
|||
if (!hTrans) /* handle error ? */
|
||||
MNG_ERRORL (pData, MNG_LCMS_NOTRANS)
|
||||
/* load color-correction routine */
|
||||
pData->fCorrectrow = (mng_ptr)correct_full_cms;
|
||||
pData->fCorrectrow = (mng_fptr)correct_full_cms;
|
||||
|
||||
return MNG_NOERROR; /* and done */
|
||||
}
|
||||
|
@ -441,7 +444,7 @@ mng_retcode init_full_cms_object (mng_datap pData)
|
|||
if (!hTrans) /* handle error ? */
|
||||
MNG_ERRORL (pData, MNG_LCMS_NOTRANS)
|
||||
/* load color-correction routine */
|
||||
pData->fCorrectrow = (mng_ptr)correct_full_cms;
|
||||
pData->fCorrectrow = (mng_fptr)correct_full_cms;
|
||||
|
||||
return MNG_NOERROR; /* and done */
|
||||
}
|
||||
|
@ -520,7 +523,7 @@ mng_retcode init_gamma_only (mng_datap pData)
|
|||
pData->dLastgamma = dGamma; /* keep for next time */
|
||||
}
|
||||
/* load color-correction routine */
|
||||
pData->fCorrectrow = (mng_ptr)correct_gamma_only;
|
||||
pData->fCorrectrow = (mng_fptr)correct_gamma_only;
|
||||
|
||||
#ifdef MNG_SUPPORT_TRACE
|
||||
MNG_TRACE (pData, MNG_FN_INIT_GAMMA_ONLY, MNG_LC_END)
|
||||
|
@ -567,7 +570,7 @@ mng_retcode init_gamma_only_object (mng_datap pData)
|
|||
pData->dLastgamma = dGamma; /* keep for next time */
|
||||
}
|
||||
/* load color-correction routine */
|
||||
pData->fCorrectrow = (mng_ptr)correct_gamma_only;
|
||||
pData->fCorrectrow = (mng_fptr)correct_gamma_only;
|
||||
|
||||
#ifdef MNG_SUPPORT_TRACE
|
||||
MNG_TRACE (pData, MNG_FN_INIT_GAMMA_ONLY_OBJ, MNG_LC_END)
|
||||
|
@ -660,7 +663,7 @@ mng_retcode init_app_cms (mng_datap pData)
|
|||
if (!pData->fProcessiccp ((mng_handle)pData, iProfilesize, pProfile))
|
||||
MNG_ERROR (pData, MNG_APPCMSERROR)
|
||||
/* load color-correction routine */
|
||||
pData->fCorrectrow = (mng_ptr)correct_app_cms;
|
||||
pData->fCorrectrow = (mng_fptr)correct_app_cms;
|
||||
}
|
||||
|
||||
if ( (pData->fProcesssrgb) &&
|
||||
|
@ -676,7 +679,7 @@ mng_retcode init_app_cms (mng_datap pData)
|
|||
if (!pData->fProcesssrgb ((mng_handle)pData, iIntent))
|
||||
MNG_ERROR (pData, MNG_APPCMSERROR)
|
||||
/* load color-correction routine */
|
||||
pData->fCorrectrow = (mng_ptr)correct_app_cms;
|
||||
pData->fCorrectrow = (mng_fptr)correct_app_cms;
|
||||
}
|
||||
|
||||
if ( (pData->fProcesschroma) &&
|
||||
|
@ -716,7 +719,7 @@ mng_retcode init_app_cms (mng_datap pData)
|
|||
iPrimarybluex, iPrimarybluey))
|
||||
MNG_ERROR (pData, MNG_APPCMSERROR)
|
||||
/* load color-correction routine */
|
||||
pData->fCorrectrow = (mng_ptr)correct_app_cms;
|
||||
pData->fCorrectrow = (mng_fptr)correct_app_cms;
|
||||
}
|
||||
|
||||
if ( (pData->fProcessgamma) &&
|
||||
|
@ -732,7 +735,7 @@ mng_retcode init_app_cms (mng_datap pData)
|
|||
if (!pData->fProcessgamma ((mng_handle)pData, iGamma))
|
||||
MNG_ERROR (pData, MNG_APPCMSERROR)
|
||||
/* load color-correction routine */
|
||||
pData->fCorrectrow = (mng_ptr)correct_app_cms;
|
||||
pData->fCorrectrow = (mng_fptr)correct_app_cms;
|
||||
}
|
||||
|
||||
#ifdef MNG_SUPPORT_TRACE
|
||||
|
@ -759,7 +762,7 @@ mng_retcode init_app_cms_object (mng_datap pData)
|
|||
if (!pData->fProcessiccp ((mng_handle)pData, pBuf->iProfilesize, pBuf->pProfile))
|
||||
MNG_ERROR (pData, MNG_APPCMSERROR)
|
||||
/* load color-correction routine */
|
||||
pData->fCorrectrow = (mng_ptr)correct_app_cms;
|
||||
pData->fCorrectrow = (mng_fptr)correct_app_cms;
|
||||
}
|
||||
|
||||
if ((pData->fProcesssrgb) && (pBuf->bHasSRGB))
|
||||
|
@ -767,7 +770,7 @@ mng_retcode init_app_cms_object (mng_datap pData)
|
|||
if (!pData->fProcesssrgb ((mng_handle)pData, pBuf->iRenderingintent))
|
||||
MNG_ERROR (pData, MNG_APPCMSERROR)
|
||||
/* load color-correction routine */
|
||||
pData->fCorrectrow = (mng_ptr)correct_app_cms;
|
||||
pData->fCorrectrow = (mng_fptr)correct_app_cms;
|
||||
}
|
||||
|
||||
if ((pData->fProcesschroma) && (pBuf->bHasCHRM))
|
||||
|
@ -778,7 +781,7 @@ mng_retcode init_app_cms_object (mng_datap pData)
|
|||
pBuf->iPrimarybluex, pBuf->iPrimarybluey))
|
||||
MNG_ERROR (pData, MNG_APPCMSERROR)
|
||||
/* load color-correction routine */
|
||||
pData->fCorrectrow = (mng_ptr)correct_app_cms;
|
||||
pData->fCorrectrow = (mng_fptr)correct_app_cms;
|
||||
}
|
||||
|
||||
if ((pData->fProcessgamma) && (pBuf->bHasGAMA))
|
||||
|
@ -786,7 +789,7 @@ mng_retcode init_app_cms_object (mng_datap pData)
|
|||
if (!pData->fProcessgamma ((mng_handle)pData, pBuf->iGamma))
|
||||
MNG_ERROR (pData, MNG_APPCMSERROR)
|
||||
/* load color-correction routine */
|
||||
pData->fCorrectrow = (mng_ptr)correct_app_cms;
|
||||
pData->fCorrectrow = (mng_fptr)correct_app_cms;
|
||||
}
|
||||
|
||||
#ifdef MNG_SUPPORT_TRACE
|
||||
|
|
|
@ -93,6 +93,8 @@
|
|||
/* * - fixed support for bKGD * */
|
||||
/* * 0.9.3 - 10/19/2000 - G.Juyn * */
|
||||
/* * - implemented delayed delta-processing * */
|
||||
/* * 0.9.4 - 12/16/2000 - G.Juyn * */
|
||||
/* * - fixed mixup of data- & function-pointers (thanks Dimitri)* */
|
||||
/* * * */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -468,27 +470,27 @@ typedef struct mng_data_struct {
|
|||
mng_float dLastgamma; /* last gamma used to compute table */
|
||||
#endif
|
||||
|
||||
mng_ptr fDisplayrow; /* internal callback to display an
|
||||
mng_fptr fDisplayrow; /* internal callback to display an
|
||||
uncompressed/unfiltered/
|
||||
color-corrected row */
|
||||
mng_ptr fRestbkgdrow; /* internal callback for restore-
|
||||
mng_fptr fRestbkgdrow; /* internal callback for restore-
|
||||
background processing of a row */
|
||||
mng_ptr fCorrectrow; /* internal callback to color-correct an
|
||||
mng_fptr fCorrectrow; /* internal callback to color-correct an
|
||||
uncompressed/unfiltered row */
|
||||
mng_ptr fRetrieverow; /* internal callback to retrieve an
|
||||
mng_fptr fRetrieverow; /* internal callback to retrieve an
|
||||
uncompressed/unfiltered row of data */
|
||||
mng_ptr fStorerow; /* internal callback to store an
|
||||
mng_fptr fStorerow; /* internal callback to store an
|
||||
uncompressed/unfiltered row of data */
|
||||
mng_ptr fProcessrow; /* internal callback to process an
|
||||
mng_fptr fProcessrow; /* internal callback to process an
|
||||
uncompressed row of data */
|
||||
mng_ptr fDifferrow; /* internal callback to perform
|
||||
mng_fptr fDifferrow; /* internal callback to perform
|
||||
added filter leveling and
|
||||
differing on an unfiltered row */
|
||||
mng_ptr fScalerow; /* internal callback to scale a
|
||||
mng_fptr fScalerow; /* internal callback to scale a
|
||||
delta-row to the bitdepth of its target */
|
||||
mng_ptr fDeltarow; /* internal callback to execute a
|
||||
mng_fptr fDeltarow; /* internal callback to execute a
|
||||
delta-row onto a target */
|
||||
mng_ptr fInitrowproc; /* internal callback to initialize
|
||||
mng_fptr fInitrowproc; /* internal callback to initialize
|
||||
the row processing */
|
||||
|
||||
mng_uint16 iDEFIobjectid; /* DEFI fields */
|
||||
|
@ -573,10 +575,10 @@ typedef struct mng_data_struct {
|
|||
mng_uint32 iDeltaBlocky;
|
||||
mng_bool bDeltaimmediate;
|
||||
|
||||
mng_ptr fDeltagetrow; /* internal delta-proc callbacks */
|
||||
mng_ptr fDeltaaddrow;
|
||||
mng_ptr fDeltareplacerow;
|
||||
mng_ptr fDeltaputrow;
|
||||
mng_fptr fDeltagetrow; /* internal delta-proc callbacks */
|
||||
mng_fptr fDeltaaddrow;
|
||||
mng_fptr fDeltareplacerow;
|
||||
mng_fptr fDeltaputrow;
|
||||
|
||||
mng_uint16 iMAGNfromid;
|
||||
mng_uint16 iMAGNtoid;
|
||||
|
@ -649,10 +651,10 @@ typedef struct mng_data_struct {
|
|||
mng_bool bJPEGscanstarted2; /* indicates "first scan" started (JDAA) */
|
||||
mng_bool bJPEGprogressive2; /* indicates a progressive image (JDAA) */
|
||||
|
||||
mng_ptr fStorerow2; /* internal callback to store an
|
||||
mng_fptr fStorerow2; /* internal callback to store an
|
||||
uncompressed/unfiltered row of JPEG-data (JDAT) */
|
||||
|
||||
mng_ptr fStorerow3; /* internal callback to store an
|
||||
mng_fptr fStorerow3; /* internal callback to store an
|
||||
uncompressed/unfiltered row of JPEG-data (JDAA) */
|
||||
|
||||
mng_uint32 iJPEGrow; /* row-number for current JPEG row */
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -5,7 +5,7 @@
|
|||
/* * * */
|
||||
/* * project : libmng * */
|
||||
/* * file : libmng_error.c copyright (c) 2000 G.Juyn * */
|
||||
/* * version : 0.9.3 * */
|
||||
/* * version : 0.9.4 * */
|
||||
/* * * */
|
||||
/* * purpose : Error routines (implementation) * */
|
||||
/* * * */
|
||||
|
@ -45,7 +45,10 @@
|
|||
/* * - fixed processing of unknown critical chunks * */
|
||||
/* * - added support for nEED * */
|
||||
/* * 0.9.3 - 10/20/2000 - G.Juyn * */
|
||||
/* * - added errocode for delayed delta-processing * */
|
||||
/* * - added errorcode for delayed delta-processing * */
|
||||
/* * * */
|
||||
/* * 0.9.4 - 1/18/2001 - G.Juyn * */
|
||||
/* * - added errorcode for MAGN methods * */
|
||||
/* * * */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -130,6 +133,7 @@
|
|||
{MNG_UNKNOWNCRITICAL, "Unknown critical chunk encountered"},
|
||||
{MNG_UNSUPPORTEDNEED, "Requested nEED resources are not supported"},
|
||||
{MNG_INVALIDDELTA, "The delta operation is invalid (mismatched color_types?)"},
|
||||
{MNG_INVALIDMETHOD, "Method is invalid"},
|
||||
|
||||
{MNG_INVALIDCNVSTYLE, "Canvas_style is invalid"},
|
||||
{MNG_WRONGCHUNK, "Attempt to access the wrong chunk"},
|
||||
|
|
|
@ -260,11 +260,6 @@ mng_retcode init_rowdiffering (mng_datap pData)
|
|||
MNG_TRACE (pData, MNG_FN_INIT_ROWDIFFERING, MNG_LC_START)
|
||||
#endif
|
||||
|
||||
pData->iLevel0 = 0; /* default levels */
|
||||
pData->iLevel1 = 0;
|
||||
pData->iLevel2 = 0;
|
||||
pData->iLevel3 = 0;
|
||||
|
||||
if (pData->iFilter & 0x40) /* has leveling parameters ? */
|
||||
{
|
||||
switch (pData->iColortype) /* salvage leveling parameters */
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/* * * */
|
||||
/* * project : libmng * */
|
||||
/* * file : libmng_object_prc.c copyright (c) 2000 G.Juyn * */
|
||||
/* * version : 0.9.3 * */
|
||||
/* * version : 0.9.5 * */
|
||||
/* * * */
|
||||
/* * purpose : Object processing routines (implementation) * */
|
||||
/* * * */
|
||||
|
@ -70,6 +70,13 @@
|
|||
/* * 0.9.3 - 10/19/2000 - G.Juyn * */
|
||||
/* * - added storage for pixel-/alpha-sampledepth for delta's * */
|
||||
/* * * */
|
||||
/* * 0.9.4 - 1/18/2001 - G.Juyn * */
|
||||
/* * - removed "old" MAGN methods 3 & 4 * */
|
||||
/* * - added "new" MAGN methods 3, 4 & 5 * */
|
||||
/* * * */
|
||||
/* * 0.9.5 - 1/22/2001 - G.Juyn * */
|
||||
/* * - B129681 - fixed compiler warnings SGI/Irix * */
|
||||
/* * * */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libmng.h"
|
||||
|
@ -730,7 +737,7 @@ mng_retcode renum_imageobject (mng_datap pData,
|
|||
while ((pPrev) && (pPrev->iId > iId))
|
||||
pPrev = (mng_imagep)pPrev->sHeader.pPrev;
|
||||
/* different from current ? */
|
||||
if (pPrev != pSource->sHeader.pPrev)
|
||||
if (pPrev != (mng_imagep)pSource->sHeader.pPrev)
|
||||
{
|
||||
if (pSource->sHeader.pPrev) /* unlink from current position !! */
|
||||
((mng_imagep)pSource->sHeader.pPrev)->sHeader.pNext = pSource->sHeader.pNext;
|
||||
|
@ -1164,16 +1171,18 @@ mng_retcode magnify_imageobject (mng_datap pData,
|
|||
{
|
||||
case 1 : { fMagnifyX = magnify_g8_x1; break; }
|
||||
case 2 : { fMagnifyX = magnify_g8_x2; break; }
|
||||
case 3 : { fMagnifyX = magnify_g8_x1; break; }
|
||||
case 3 : { fMagnifyX = magnify_g8_x3; break; }
|
||||
case 4 : { fMagnifyX = magnify_g8_x2; break; }
|
||||
case 5 : { fMagnifyX = magnify_g8_x3; break; }
|
||||
}
|
||||
|
||||
switch (pImage->iMAGN_MethodY)
|
||||
{
|
||||
case 1 : { fMagnifyY = magnify_g8_y1; break; }
|
||||
case 2 : { fMagnifyY = magnify_g8_y2; break; }
|
||||
case 3 : { fMagnifyY = magnify_g8_y1; break; }
|
||||
case 3 : { fMagnifyY = magnify_g8_y3; break; }
|
||||
case 4 : { fMagnifyY = magnify_g8_y2; break; }
|
||||
case 5 : { fMagnifyY = magnify_g8_y3; break; }
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1194,16 +1203,18 @@ mng_retcode magnify_imageobject (mng_datap pData,
|
|||
{
|
||||
case 1 : { fMagnifyX = magnify_rgb8_x1; break; }
|
||||
case 2 : { fMagnifyX = magnify_rgb8_x2; break; }
|
||||
case 3 : { fMagnifyX = magnify_rgb8_x1; break; }
|
||||
case 3 : { fMagnifyX = magnify_rgb8_x3; break; }
|
||||
case 4 : { fMagnifyX = magnify_rgb8_x2; break; }
|
||||
case 5 : { fMagnifyX = magnify_rgb8_x3; break; }
|
||||
}
|
||||
|
||||
switch (pImage->iMAGN_MethodY)
|
||||
{
|
||||
case 1 : { fMagnifyY = magnify_rgb8_y1; break; }
|
||||
case 2 : { fMagnifyY = magnify_rgb8_y2; break; }
|
||||
case 3 : { fMagnifyY = magnify_rgb8_y1; break; }
|
||||
case 3 : { fMagnifyY = magnify_rgb8_y3; break; }
|
||||
case 4 : { fMagnifyY = magnify_rgb8_y2; break; }
|
||||
case 5 : { fMagnifyY = magnify_rgb8_y3; break; }
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1226,6 +1237,7 @@ mng_retcode magnify_imageobject (mng_datap pData,
|
|||
case 2 : { fMagnifyX = magnify_ga8_x2; break; }
|
||||
case 3 : { fMagnifyX = magnify_ga8_x3; break; }
|
||||
case 4 : { fMagnifyX = magnify_ga8_x4; break; }
|
||||
case 5 : { fMagnifyX = magnify_ga8_x5; break; }
|
||||
}
|
||||
|
||||
switch (pImage->iMAGN_MethodY)
|
||||
|
@ -1234,6 +1246,7 @@ mng_retcode magnify_imageobject (mng_datap pData,
|
|||
case 2 : { fMagnifyY = magnify_ga8_y2; break; }
|
||||
case 3 : { fMagnifyY = magnify_ga8_y3; break; }
|
||||
case 4 : { fMagnifyY = magnify_ga8_y4; break; }
|
||||
case 5 : { fMagnifyY = magnify_ga8_y5; break; }
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1254,8 +1267,9 @@ mng_retcode magnify_imageobject (mng_datap pData,
|
|||
{
|
||||
case 1 : { fMagnifyX = magnify_rgba8_x1; break; }
|
||||
case 2 : { fMagnifyX = magnify_rgba8_x2; break; }
|
||||
case 3 : { fMagnifyX = magnify_rgba8_x2; break; }
|
||||
case 4 : { fMagnifyX = magnify_rgba8_x3; break; }
|
||||
case 3 : { fMagnifyX = magnify_rgba8_x3; break; }
|
||||
case 4 : { fMagnifyX = magnify_rgba8_x4; break; }
|
||||
case 5 : { fMagnifyX = magnify_rgba8_x5; break; }
|
||||
}
|
||||
|
||||
switch (pImage->iMAGN_MethodY)
|
||||
|
@ -1264,6 +1278,7 @@ mng_retcode magnify_imageobject (mng_datap pData,
|
|||
case 2 : { fMagnifyY = magnify_rgba8_y2; break; }
|
||||
case 3 : { fMagnifyY = magnify_rgba8_y3; break; }
|
||||
case 4 : { fMagnifyY = magnify_rgba8_y4; break; }
|
||||
case 5 : { fMagnifyY = magnify_rgba8_y5; break; }
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2343,7 +2358,7 @@ mng_retcode process_ani_endl (mng_datap pData,
|
|||
|
||||
if (!pLOOP->iRunningcount) /* reached zero ? */
|
||||
{ /* was this the outer LOOP ? */
|
||||
if (pLOOP == pData->pFirstaniobj)
|
||||
if (pData->pFirstaniobj == (mng_objectp)pLOOP)
|
||||
pData->bHasLOOP = MNG_FALSE;
|
||||
}
|
||||
else
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -5,7 +5,7 @@
|
|||
/* * * */
|
||||
/* * project : libmng * */
|
||||
/* * file : libmng_pixels.h copyright (c) 2000 G.Juyn * */
|
||||
/* * version : 0.9.3 * */
|
||||
/* * version : 0.9.4 * */
|
||||
/* * * */
|
||||
/* * purpose : Pixel-row management routines (definition) * */
|
||||
/* * * */
|
||||
|
@ -40,6 +40,9 @@
|
|||
/* * 0.9.3 - 10/19/2000 - G.Juyn * */
|
||||
/* * - implemented delayed delta-processing * */
|
||||
/* * * */
|
||||
/* * 0.9.4 - 1/18/2001 - G.Juyn * */
|
||||
/* * - added "new" MAGN methods 3, 4 & 5 * */
|
||||
/* * * */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#if defined(__BORLANDC__) && defined(MNG_STRICT_ANSI)
|
||||
|
@ -342,6 +345,13 @@ mng_retcode magnify_g8_x2 (mng_datap pData,
|
|||
mng_uint32 iWidth,
|
||||
mng_uint8p pSrcline,
|
||||
mng_uint8p pDstline);
|
||||
mng_retcode magnify_g8_x3 (mng_datap pData,
|
||||
mng_uint16 iMX,
|
||||
mng_uint16 iML,
|
||||
mng_uint16 iMR,
|
||||
mng_uint32 iWidth,
|
||||
mng_uint8p pSrcline,
|
||||
mng_uint8p pDstline);
|
||||
mng_retcode magnify_rgb8_x1 (mng_datap pData,
|
||||
mng_uint16 iMX,
|
||||
mng_uint16 iML,
|
||||
|
@ -356,6 +366,13 @@ mng_retcode magnify_rgb8_x2 (mng_datap pData,
|
|||
mng_uint32 iWidth,
|
||||
mng_uint8p pSrcline,
|
||||
mng_uint8p pDstline);
|
||||
mng_retcode magnify_rgb8_x3 (mng_datap pData,
|
||||
mng_uint16 iMX,
|
||||
mng_uint16 iML,
|
||||
mng_uint16 iMR,
|
||||
mng_uint32 iWidth,
|
||||
mng_uint8p pSrcline,
|
||||
mng_uint8p pDstline);
|
||||
mng_retcode magnify_ga8_x1 (mng_datap pData,
|
||||
mng_uint16 iMX,
|
||||
mng_uint16 iML,
|
||||
|
@ -384,6 +401,13 @@ mng_retcode magnify_ga8_x4 (mng_datap pData,
|
|||
mng_uint32 iWidth,
|
||||
mng_uint8p pSrcline,
|
||||
mng_uint8p pDstline);
|
||||
mng_retcode magnify_ga8_x5 (mng_datap pData,
|
||||
mng_uint16 iMX,
|
||||
mng_uint16 iML,
|
||||
mng_uint16 iMR,
|
||||
mng_uint32 iWidth,
|
||||
mng_uint8p pSrcline,
|
||||
mng_uint8p pDstline);
|
||||
mng_retcode magnify_rgba8_x1 (mng_datap pData,
|
||||
mng_uint16 iMX,
|
||||
mng_uint16 iML,
|
||||
|
@ -412,6 +436,13 @@ mng_retcode magnify_rgba8_x4 (mng_datap pData,
|
|||
mng_uint32 iWidth,
|
||||
mng_uint8p pSrcline,
|
||||
mng_uint8p pDstline);
|
||||
mng_retcode magnify_rgba8_x5 (mng_datap pData,
|
||||
mng_uint16 iMX,
|
||||
mng_uint16 iML,
|
||||
mng_uint16 iMR,
|
||||
mng_uint32 iWidth,
|
||||
mng_uint8p pSrcline,
|
||||
mng_uint8p pDstline);
|
||||
|
||||
mng_retcode magnify_g8_y1 (mng_datap pData,
|
||||
mng_int32 iS,
|
||||
|
@ -427,6 +458,13 @@ mng_retcode magnify_g8_y2 (mng_datap pData,
|
|||
mng_uint8p pSrcline1,
|
||||
mng_uint8p pSrcline2,
|
||||
mng_uint8p pDstline);
|
||||
mng_retcode magnify_g8_y3 (mng_datap pData,
|
||||
mng_int32 iS,
|
||||
mng_int32 iM,
|
||||
mng_uint32 iWidth,
|
||||
mng_uint8p pSrcline1,
|
||||
mng_uint8p pSrcline2,
|
||||
mng_uint8p pDstline);
|
||||
mng_retcode magnify_rgb8_y1 (mng_datap pData,
|
||||
mng_int32 iS,
|
||||
mng_int32 iM,
|
||||
|
@ -441,6 +479,13 @@ mng_retcode magnify_rgb8_y2 (mng_datap pData,
|
|||
mng_uint8p pSrcline1,
|
||||
mng_uint8p pSrcline2,
|
||||
mng_uint8p pDstline);
|
||||
mng_retcode magnify_rgb8_y3 (mng_datap pData,
|
||||
mng_int32 iS,
|
||||
mng_int32 iM,
|
||||
mng_uint32 iWidth,
|
||||
mng_uint8p pSrcline1,
|
||||
mng_uint8p pSrcline2,
|
||||
mng_uint8p pDstline);
|
||||
mng_retcode magnify_ga8_y1 (mng_datap pData,
|
||||
mng_int32 iS,
|
||||
mng_int32 iM,
|
||||
|
@ -469,6 +514,13 @@ mng_retcode magnify_ga8_y4 (mng_datap pData,
|
|||
mng_uint8p pSrcline1,
|
||||
mng_uint8p pSrcline2,
|
||||
mng_uint8p pDstline);
|
||||
mng_retcode magnify_ga8_y5 (mng_datap pData,
|
||||
mng_int32 iS,
|
||||
mng_int32 iM,
|
||||
mng_uint32 iWidth,
|
||||
mng_uint8p pSrcline1,
|
||||
mng_uint8p pSrcline2,
|
||||
mng_uint8p pDstline);
|
||||
mng_retcode magnify_rgba8_y1 (mng_datap pData,
|
||||
mng_int32 iS,
|
||||
mng_int32 iM,
|
||||
|
@ -497,6 +549,13 @@ mng_retcode magnify_rgba8_y4 (mng_datap pData,
|
|||
mng_uint8p pSrcline1,
|
||||
mng_uint8p pSrcline2,
|
||||
mng_uint8p pDstline);
|
||||
mng_retcode magnify_rgba8_y5 (mng_datap pData,
|
||||
mng_int32 iS,
|
||||
mng_int32 iM,
|
||||
mng_uint32 iWidth,
|
||||
mng_uint8p pSrcline1,
|
||||
mng_uint8p pSrcline2,
|
||||
mng_uint8p pDstline);
|
||||
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/* * * */
|
||||
/* * project : libmng * */
|
||||
/* * file : libmng_read.c copyright (c) 2000 G.Juyn * */
|
||||
/* * version : 0.9.3 * */
|
||||
/* * version : 0.9.5 * */
|
||||
/* * * */
|
||||
/* * purpose : Read logic (implementation) * */
|
||||
/* * * */
|
||||
|
@ -55,6 +55,9 @@
|
|||
/* * 0.9.3 - 10/16/2000 - G.Juyn * */
|
||||
/* * - added support for JDAA * */
|
||||
/* * * */
|
||||
/* * 0.9.5 - 1/23/2001 - G.Juyn * */
|
||||
/* * - fixed timing-problem with switching framing_modes * */
|
||||
/* * * */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libmng.h"
|
||||
|
@ -666,7 +669,7 @@ mng_retcode read_graphic (mng_datap pData)
|
|||
return iRetcode;
|
||||
}
|
||||
#ifdef MNG_SUPPORT_DISPLAY /* until EOF or a break-request */
|
||||
while ((!pData->bEOF) && (!pData->bSuspended) &&
|
||||
while (((!pData->bEOF) || (pData->pCurraniobj)) && (!pData->bSuspended) &&
|
||||
(!pData->bTimerset) && (!pData->bSectionwait));
|
||||
#else
|
||||
while ((!pData->bEOF) && (!pData->bSuspended));
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/* * * */
|
||||
/* * project : libmng * */
|
||||
/* * file : libmng_trace.c copyright (c) 2000 G.Juyn * */
|
||||
/* * version : 0.9.3 * */
|
||||
/* * version : 0.9.4 * */
|
||||
/* * * */
|
||||
/* * purpose : Trace functions (implementation) * */
|
||||
/* * * */
|
||||
|
@ -84,6 +84,9 @@
|
|||
/* * 0.9.3 - 10/21/2000 - G.Juyn * */
|
||||
/* * - added get function for interlace/progressive display * */
|
||||
/* * * */
|
||||
/* * 0.9.4 - 1/18/2001 - G.Juyn * */
|
||||
/* * - added "new" MAGN methods 3, 4 & 5 * */
|
||||
/* * * */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libmng.h"
|
||||
|
@ -983,6 +986,8 @@
|
|||
{MNG_FN_STORE_JPEG_RGBA8, "store_jpeg_rgba8"},
|
||||
{MNG_FN_STORE_JPEG_GA12, "store_jpeg_ga12"},
|
||||
{MNG_FN_STORE_JPEG_RGBA12, "store_jpeg_rgba12"},
|
||||
{MNG_FN_STORE_JPEG_G8_ALPHA, "store_jpeg_g8_alpha"},
|
||||
{MNG_FN_STORE_JPEG_RGB8_ALPHA, "store_jpeg_rgb8_alpha"},
|
||||
|
||||
{MNG_FN_INIT_JPEG_A1_NI, "init_jpeg_a1_ni"},
|
||||
{MNG_FN_INIT_JPEG_A2_NI, "init_jpeg_a2_ni"},
|
||||
|
@ -1030,6 +1035,10 @@
|
|||
{MNG_FN_MAGNIFY_RGBA8_X2, "magnify_rgba8_x2"},
|
||||
{MNG_FN_MAGNIFY_RGBA8_X3, "magnify_rgba8_x3"},
|
||||
{MNG_FN_MAGNIFY_RGBA8_X4, "magnify_rgba8_x4"},
|
||||
{MNG_FN_MAGNIFY_G8_X3, "magnify_g8_x3"},
|
||||
{MNG_FN_MAGNIFY_RGB8_X3, "magnify_rgb8_x3"},
|
||||
{MNG_FN_MAGNIFY_GA8_X5, "magnify_ga8_x5"},
|
||||
{MNG_FN_MAGNIFY_RGBA8_X5, "magnify_rgba8_x5"},
|
||||
|
||||
{MNG_FN_MAGNIFY_G8_Y1, "magnify_g8_y1"},
|
||||
{MNG_FN_MAGNIFY_G8_Y2, "magnify_g8_y2"},
|
||||
|
@ -1043,6 +1052,10 @@
|
|||
{MNG_FN_MAGNIFY_RGBA8_Y2, "magnify_rgba8_y2"},
|
||||
{MNG_FN_MAGNIFY_RGBA8_Y3, "magnify_rgba8_y3"},
|
||||
{MNG_FN_MAGNIFY_RGBA8_Y4, "magnify_rgba8_y4"},
|
||||
{MNG_FN_MAGNIFY_G8_Y3, "magnify_g8_y3"},
|
||||
{MNG_FN_MAGNIFY_RGB8_Y3, "magnify_rgb8_y3"},
|
||||
{MNG_FN_MAGNIFY_GA8_Y5, "magnify_ga8_y5"},
|
||||
{MNG_FN_MAGNIFY_RGBA8_Y5, "magnify_rgba8_y5"},
|
||||
|
||||
{MNG_FN_DELTA_G1_G1, "delta_g1_g1"},
|
||||
{MNG_FN_DELTA_G2_G2, "delta_g2_g2"},
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/* * * */
|
||||
/* * project : libmng * */
|
||||
/* * file : libmng_trace.h copyright (c) 2000 G.Juyn * */
|
||||
/* * version : 0.9.3 * */
|
||||
/* * version : 0.9.4 * */
|
||||
/* * * */
|
||||
/* * purpose : Trace functions (definition) * */
|
||||
/* * * */
|
||||
|
@ -93,6 +93,9 @@
|
|||
/* * 0.9.3 - 10/21/2000 - G.Juyn * */
|
||||
/* * - added get function for interlace/progressive display * */
|
||||
/* * * */
|
||||
/* * 0.9.4 - 1/18/2001 - G.Juyn * */
|
||||
/* * - added "new" MAGN methods 3, 4 & 5 * */
|
||||
/* * * */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#if defined(__BORLANDC__) && defined(MNG_STRICT_ANSI)
|
||||
|
@ -1061,6 +1064,8 @@ mng_retcode mng_trace (mng_datap pData,
|
|||
#define MNG_FN_STORE_JPEG_RGBA8 3506
|
||||
#define MNG_FN_STORE_JPEG_GA12 3507
|
||||
#define MNG_FN_STORE_JPEG_RGBA12 3508
|
||||
#define MNG_FN_STORE_JPEG_G8_ALPHA 3509
|
||||
#define MNG_FN_STORE_JPEG_RGB8_ALPHA 3510
|
||||
|
||||
#define MNG_FN_INIT_JPEG_A1_NI 3511
|
||||
#define MNG_FN_INIT_JPEG_A2_NI 3512
|
||||
|
@ -1110,6 +1115,10 @@ mng_retcode mng_trace (mng_datap pData,
|
|||
#define MNG_FN_MAGNIFY_RGBA8_X2 3710
|
||||
#define MNG_FN_MAGNIFY_RGBA8_X3 3711
|
||||
#define MNG_FN_MAGNIFY_RGBA8_X4 3712
|
||||
#define MNG_FN_MAGNIFY_G8_X3 3713
|
||||
#define MNG_FN_MAGNIFY_RGB8_X3 3714
|
||||
#define MNG_FN_MAGNIFY_GA8_X5 3715
|
||||
#define MNG_FN_MAGNIFY_RGBA8_X5 3716
|
||||
|
||||
#define MNG_FN_MAGNIFY_G8_Y1 3751
|
||||
#define MNG_FN_MAGNIFY_G8_Y2 3752
|
||||
|
@ -1123,6 +1132,10 @@ mng_retcode mng_trace (mng_datap pData,
|
|||
#define MNG_FN_MAGNIFY_RGBA8_Y2 3760
|
||||
#define MNG_FN_MAGNIFY_RGBA8_Y3 3761
|
||||
#define MNG_FN_MAGNIFY_RGBA8_Y4 3762
|
||||
#define MNG_FN_MAGNIFY_G8_Y3 3763
|
||||
#define MNG_FN_MAGNIFY_RGB8_Y3 3764
|
||||
#define MNG_FN_MAGNIFY_GA8_Y5 3765
|
||||
#define MNG_FN_MAGNIFY_RGBA8_Y5 3766
|
||||
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
@ -86,6 +86,10 @@
|
|||
/* * * */
|
||||
/* * 0.9.4 - 11/20/2000 - R.Giles * */
|
||||
/* * - fixed inclusion of lcms header for non-windows platforms * */
|
||||
/* * 0.9.4 - 12/12/2000 - G.Juyn * */
|
||||
/* * - changed callback convention for MSVC (Thanks Chad) * */
|
||||
/* * 0.9.4 - 12/16/2000 - G.Juyn * */
|
||||
/* * - fixed mixup of data- & function-pointers (thanks Dimitri)* */
|
||||
/* * * */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -114,8 +118,11 @@
|
|||
/* ************************************************************************** */
|
||||
|
||||
#ifdef WIN32 /* only include needed stuff */
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MNG_USE_DLL
|
||||
#ifdef MNG_SKIP_ZLIB
|
||||
#undef MNG_INCLUDE_ZLIB
|
||||
|
@ -249,6 +256,7 @@ typedef size_t mng_size_t; /* size field for memory alloca
|
|||
|
||||
typedef char * mng_pchar; /* string */
|
||||
typedef void * mng_ptr; /* generic pointer */
|
||||
typedef void (*mng_fptr) (void); /* generic function pointer */
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* * * */
|
||||
|
@ -366,24 +374,24 @@ typedef enum mng_speedtypes mng_speedtype;
|
|||
/* ************************************************************************** */
|
||||
|
||||
/* memory management callbacks */
|
||||
typedef mng_ptr MNG_DECL (*mng_memalloc) (mng_size_t iLen);
|
||||
typedef void MNG_DECL (*mng_memfree) (mng_ptr iPtr,
|
||||
typedef mng_ptr (MNG_DECL *mng_memalloc) (mng_size_t iLen);
|
||||
typedef void (MNG_DECL *mng_memfree) (mng_ptr iPtr,
|
||||
mng_size_t iLen);
|
||||
|
||||
/* I/O management callbacks */
|
||||
typedef mng_bool MNG_DECL (*mng_openstream) (mng_handle hHandle);
|
||||
typedef mng_bool MNG_DECL (*mng_closestream) (mng_handle hHandle);
|
||||
typedef mng_bool MNG_DECL (*mng_readdata) (mng_handle hHandle,
|
||||
typedef mng_bool (MNG_DECL *mng_openstream) (mng_handle hHandle);
|
||||
typedef mng_bool (MNG_DECL *mng_closestream) (mng_handle hHandle);
|
||||
typedef mng_bool (MNG_DECL *mng_readdata) (mng_handle hHandle,
|
||||
mng_ptr pBuf,
|
||||
mng_uint32 iBuflen,
|
||||
mng_uint32p pRead);
|
||||
typedef mng_bool MNG_DECL (*mng_writedata) (mng_handle hHandle,
|
||||
typedef mng_bool (MNG_DECL *mng_writedata) (mng_handle hHandle,
|
||||
mng_ptr pBuf,
|
||||
mng_uint32 iBuflen,
|
||||
mng_uint32p pWritten);
|
||||
|
||||
/* error & trace processing callbacks */
|
||||
typedef mng_bool MNG_DECL (*mng_errorproc) (mng_handle hHandle,
|
||||
typedef mng_bool (MNG_DECL *mng_errorproc) (mng_handle hHandle,
|
||||
mng_int32 iErrorcode,
|
||||
mng_int8 iSeverity,
|
||||
mng_chunkid iChunkname,
|
||||
|
@ -391,53 +399,53 @@ typedef mng_bool MNG_DECL (*mng_errorproc) (mng_handle hHandle,
|
|||
mng_int32 iExtra1,
|
||||
mng_int32 iExtra2,
|
||||
mng_pchar zErrortext);
|
||||
typedef mng_bool MNG_DECL (*mng_traceproc) (mng_handle hHandle,
|
||||
typedef mng_bool (MNG_DECL *mng_traceproc) (mng_handle hHandle,
|
||||
mng_int32 iFuncnr,
|
||||
mng_int32 iFuncseq,
|
||||
mng_pchar zFuncname);
|
||||
|
||||
/* read processing callbacks */
|
||||
typedef mng_bool MNG_DECL (*mng_processheader) (mng_handle hHandle,
|
||||
typedef mng_bool (MNG_DECL *mng_processheader) (mng_handle hHandle,
|
||||
mng_uint32 iWidth,
|
||||
mng_uint32 iHeight);
|
||||
typedef mng_bool MNG_DECL (*mng_processtext) (mng_handle hHandle,
|
||||
typedef mng_bool (MNG_DECL *mng_processtext) (mng_handle hHandle,
|
||||
mng_uint8 iType,
|
||||
mng_pchar zKeyword,
|
||||
mng_pchar zText,
|
||||
mng_pchar zLanguage,
|
||||
mng_pchar zTranslation);
|
||||
typedef mng_bool MNG_DECL (*mng_processsave) (mng_handle hHandle);
|
||||
typedef mng_bool MNG_DECL (*mng_processseek) (mng_handle hHandle,
|
||||
typedef mng_bool (MNG_DECL *mng_processsave) (mng_handle hHandle);
|
||||
typedef mng_bool (MNG_DECL *mng_processseek) (mng_handle hHandle,
|
||||
mng_pchar zName);
|
||||
typedef mng_bool MNG_DECL (*mng_processneed) (mng_handle hHandle,
|
||||
typedef mng_bool (MNG_DECL *mng_processneed) (mng_handle hHandle,
|
||||
mng_pchar zKeyword);
|
||||
typedef mng_bool MNG_DECL (*mng_processunknown) (mng_handle hHandle,
|
||||
typedef mng_bool (MNG_DECL *mng_processunknown) (mng_handle hHandle,
|
||||
mng_chunkid iChunkid,
|
||||
mng_uint32 iRawlen,
|
||||
mng_ptr pRawdata);
|
||||
|
||||
/* display processing callbacks */
|
||||
typedef mng_ptr MNG_DECL (*mng_getcanvasline) (mng_handle hHandle,
|
||||
typedef mng_ptr (MNG_DECL *mng_getcanvasline) (mng_handle hHandle,
|
||||
mng_uint32 iLinenr);
|
||||
typedef mng_ptr MNG_DECL (*mng_getbkgdline) (mng_handle hHandle,
|
||||
typedef mng_ptr (MNG_DECL *mng_getbkgdline) (mng_handle hHandle,
|
||||
mng_uint32 iLinenr);
|
||||
typedef mng_ptr MNG_DECL (*mng_getalphaline) (mng_handle hHandle,
|
||||
typedef mng_ptr (MNG_DECL *mng_getalphaline) (mng_handle hHandle,
|
||||
mng_uint32 iLinenr);
|
||||
typedef mng_bool MNG_DECL (*mng_refresh) (mng_handle hHandle,
|
||||
typedef mng_bool (MNG_DECL *mng_refresh) (mng_handle hHandle,
|
||||
mng_uint32 iX,
|
||||
mng_uint32 iY,
|
||||
mng_uint32 iWidth,
|
||||
mng_uint32 iHeight);
|
||||
|
||||
/* timer management callbacks */
|
||||
typedef mng_uint32 MNG_DECL (*mng_gettickcount) (mng_handle hHandle);
|
||||
typedef mng_bool MNG_DECL (*mng_settimer) (mng_handle hHandle,
|
||||
typedef mng_uint32 (MNG_DECL *mng_gettickcount) (mng_handle hHandle);
|
||||
typedef mng_bool (MNG_DECL *mng_settimer) (mng_handle hHandle,
|
||||
mng_uint32 iMsecs);
|
||||
|
||||
/* color management callbacks */
|
||||
typedef mng_bool MNG_DECL (*mng_processgamma) (mng_handle hHandle,
|
||||
typedef mng_bool (MNG_DECL *mng_processgamma) (mng_handle hHandle,
|
||||
mng_uint32 iGamma);
|
||||
typedef mng_bool MNG_DECL (*mng_processchroma) (mng_handle hHandle,
|
||||
typedef mng_bool (MNG_DECL *mng_processchroma) (mng_handle hHandle,
|
||||
mng_uint32 iWhitepointx,
|
||||
mng_uint32 iWhitepointy,
|
||||
mng_uint32 iRedx,
|
||||
|
@ -446,18 +454,18 @@ typedef mng_bool MNG_DECL (*mng_processchroma) (mng_handle hHandle,
|
|||
mng_uint32 iGreeny,
|
||||
mng_uint32 iBluex,
|
||||
mng_uint32 iBluey);
|
||||
typedef mng_bool MNG_DECL (*mng_processsrgb) (mng_handle hHandle,
|
||||
typedef mng_bool (MNG_DECL *mng_processsrgb) (mng_handle hHandle,
|
||||
mng_uint8 iRenderingintent);
|
||||
typedef mng_bool MNG_DECL (*mng_processiccp) (mng_handle hHandle,
|
||||
typedef mng_bool (MNG_DECL *mng_processiccp) (mng_handle hHandle,
|
||||
mng_uint32 iProfilesize,
|
||||
mng_ptr pProfile);
|
||||
typedef mng_bool MNG_DECL (*mng_processarow) (mng_handle hHandle,
|
||||
typedef mng_bool (MNG_DECL *mng_processarow) (mng_handle hHandle,
|
||||
mng_uint32 iRowsamples,
|
||||
mng_bool bIsRGBA16,
|
||||
mng_ptr pRow);
|
||||
|
||||
/* chunk access callback(s) */
|
||||
typedef mng_bool MNG_DECL (*mng_iteratechunk) (mng_handle hHandle,
|
||||
typedef mng_bool (MNG_DECL *mng_iteratechunk) (mng_handle hHandle,
|
||||
mng_handle hChunk,
|
||||
mng_chunkid iChunkid,
|
||||
mng_uint32 iChunkseq);
|
||||
|
|
|
@ -201,15 +201,18 @@ mng_retcode mngzlib_inflaterows (mng_datap pData,
|
|||
if (pData->iRow >= (mng_int32)pData->iDataheight)
|
||||
/* MNG_ERROR (pData, MNG_TOOMUCHIDAT) */ ; /* TODO: check this!!! */
|
||||
else
|
||||
{
|
||||
if (pData->iFilterofs) /* has leveling info ? */
|
||||
{ /* has leveling info ? */
|
||||
/* if (pData->iFilterofs)
|
||||
iRslt = init_rowdiffering (pData);
|
||||
else
|
||||
iRslt = MNG_NOERROR;
|
||||
iRslt = MNG_NOERROR; */
|
||||
/* filter the row if necessary */
|
||||
if ((!iRslt) && (pData->iFilterofs < pData->iPixelofs ) &&
|
||||
(*(pData->pWorkrow + pData->iFilterofs)) )
|
||||
/* if ((!iRslt) && (pData->iFilterofs < pData->iPixelofs ) &&
|
||||
(*(pData->pWorkrow + pData->iFilterofs)) ) */
|
||||
if (*(pData->pWorkrow + pData->iFilterofs))
|
||||
iRslt = filter_a_row (pData);
|
||||
else
|
||||
iRslt = MNG_NOERROR;
|
||||
/* additonal leveling/differing ? */
|
||||
if ((!iRslt) && (pData->fDifferrow))
|
||||
{
|
||||
|
@ -217,7 +220,7 @@ mng_retcode mngzlib_inflaterows (mng_datap pData,
|
|||
|
||||
pSwap = pData->pWorkrow;
|
||||
pData->pWorkrow = pData->pPrevrow;
|
||||
pData->pPrevrow = pSwap; /* so prev points to the processed row! */
|
||||
pData->pPrevrow = pSwap; /* make sure we're processing the right data */
|
||||
}
|
||||
|
||||
if (!iRslt)
|
||||
|
|
|
@ -172,6 +172,11 @@ il_mng_refresh(mng_handle handle,
|
|||
mng_get_refreshpass(handle) /* pass */);
|
||||
}
|
||||
|
||||
if (mng_get_imagetype(handle) == mng_it_mng) {
|
||||
ic->imgdcb->ImgDCBFlushImage();
|
||||
ic->imgdcb->ImgDCBHaveImageFrame();
|
||||
}
|
||||
|
||||
return MNG_TRUE;
|
||||
}
|
||||
|
||||
|
@ -228,6 +233,7 @@ il_mng_free(mng_ptr ptr, mng_size_t size)
|
|||
nsMemory::Free(ptr);
|
||||
}
|
||||
|
||||
#ifdef DEBUG_tor
|
||||
static mng_bool
|
||||
il_mng_trace(mng_handle handle, mng_int32 iFuncnr, mng_int32 iFuncseq,
|
||||
mng_pchar zFuncname)
|
||||
|
@ -244,6 +250,7 @@ il_mng_error(mng_handle hHandle, mng_int32 iErrorcode, mng_int8 iSeverity,
|
|||
dprintf((stderr, "== error == %s\n", zErrortext));
|
||||
return MNG_TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Boilerplate methods... *yawn*
|
||||
//===========================================================
|
||||
|
|
Загрузка…
Ссылка в новой задаче