mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[devel] Minor editing of the manual.
This commit is contained in:
parent
4164c6f949
commit
a5e5547679
2
ANNOUNCE
2
ANNOUNCE
@ -27,7 +27,7 @@ Other information:
|
|||||||
Changes since the last public release (1.5.4):
|
Changes since the last public release (1.5.4):
|
||||||
|
|
||||||
Version 1.5.5beta01 [July 12, 2011]
|
Version 1.5.5beta01 [July 12, 2011]
|
||||||
Fixed some typos in the manual.
|
Fixed some typos and made other minor changes in the manual.
|
||||||
Updated contrib/pngminus/makefile.std (Samuli Souminen)
|
Updated contrib/pngminus/makefile.std (Samuli Souminen)
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
|
||||||
|
2
CHANGES
2
CHANGES
@ -3510,7 +3510,7 @@ Version 1.5.4 [July 7, 2011]
|
|||||||
No changes.
|
No changes.
|
||||||
|
|
||||||
Version 1.5.5beta01 [July 12, 2011]
|
Version 1.5.5beta01 [July 12, 2011]
|
||||||
Fixed some typos in the manual.
|
Fixed some typos and made other minor changes in the manual.
|
||||||
Updated contrib/pngminus/makefile.std (Samuli Souminen)
|
Updated contrib/pngminus/makefile.std (Samuli Souminen)
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
libpng-manual.txt - A description on how to use and modify libpng
|
libpng-manual.txt - A description on how to use and modify libpng
|
||||||
|
|
||||||
libpng version 1.5.5beta01 - July 10, 2011
|
libpng version 1.5.5beta01 - July 12, 2011
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
<glennrp at users.sourceforge.net>
|
<glennrp at users.sourceforge.net>
|
||||||
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng
|
|||||||
|
|
||||||
Based on:
|
Based on:
|
||||||
|
|
||||||
libpng versions 0.97, January 1998, through 1.5.5beta01 - July 10, 2011
|
libpng versions 0.97, January 1998, through 1.5.5beta01 - July 12, 2011
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
|
|
||||||
@ -116,14 +116,23 @@ Almost all libpng APIs require a pointer to a png_struct as the first argument.
|
|||||||
Many (in particular the png_set and png_get APIs) also require a pointer
|
Many (in particular the png_set and png_get APIs) also require a pointer
|
||||||
to png_info as the second argument. Some application visible macros
|
to png_info as the second argument. Some application visible macros
|
||||||
defined in png.h designed for basic data access (reading and writing
|
defined in png.h designed for basic data access (reading and writing
|
||||||
integers in the PNG format) break this rule, but it's almost always safe
|
integers in the PNG format) don't take a png_info pointer, but it's almost
|
||||||
to assume that a (png_struct*) has to be passed to call an API function.
|
always safe to assume that a (png_struct*) has to be passed to call an API
|
||||||
|
function.
|
||||||
|
|
||||||
|
You can have more than one png_info structure associated with an image,
|
||||||
|
as illustrated in pngtest.c, one for information valid prior to the
|
||||||
|
IDAT chunks and another (called "end_info" below) for things after them.
|
||||||
|
|
||||||
The png.h header file is an invaluable reference for programming with libpng.
|
The png.h header file is an invaluable reference for programming with libpng.
|
||||||
And while I'm on the topic, make sure you include the libpng header file:
|
And while I'm on the topic, make sure you include the libpng header file:
|
||||||
|
|
||||||
#include <png.h>
|
#include <png.h>
|
||||||
|
|
||||||
|
and also (as of libpng-1.5.0) the zlib header file, if you need it:
|
||||||
|
|
||||||
|
#include <zlib.h>
|
||||||
|
|
||||||
Types
|
Types
|
||||||
|
|
||||||
The png.h header file defines a number of integral types used by the
|
The png.h header file defines a number of integral types used by the
|
||||||
@ -165,7 +174,7 @@ portability. From libpng 1.5.0 the feature macros set during the build
|
|||||||
of libpng are recorded in the header file "pnglibconf.h" and this file
|
of libpng are recorded in the header file "pnglibconf.h" and this file
|
||||||
is always included by png.h.
|
is always included by png.h.
|
||||||
|
|
||||||
If you don't need to change the library configuration from the default skip to
|
If you don't need to change the library configuration from the default, skip to
|
||||||
the next section ("Reading").
|
the next section ("Reading").
|
||||||
|
|
||||||
Notice that some of the makefiles in the 'scripts' directory and (in 1.5.0) all
|
Notice that some of the makefiles in the 'scripts' directory and (in 1.5.0) all
|
||||||
@ -238,6 +247,10 @@ source code. Most of these values have performance implications for the library
|
|||||||
but most of them have no visible effect on the API. Some can also be overridden
|
but most of them have no visible effect on the API. Some can also be overridden
|
||||||
from the API.
|
from the API.
|
||||||
|
|
||||||
|
This method of building a customized pnglibconf.h is illustrated in
|
||||||
|
contrib/pngminim/*. See the "$(PNGCONF):" target in the makefile and
|
||||||
|
pngusr.dfa in these directories.
|
||||||
|
|
||||||
C. Configuration using PNG_USR_CONFIG
|
C. Configuration using PNG_USR_CONFIG
|
||||||
|
|
||||||
If -DPNG_USR_CONFIG is added to the CFLAGS when pnglibconf.h is built the file
|
If -DPNG_USR_CONFIG is added to the CFLAGS when pnglibconf.h is built the file
|
||||||
@ -274,6 +287,9 @@ examine the intermediate file pnglibconf.dfn to find the full set of
|
|||||||
dependency information for each setting and option. Simply locate the
|
dependency information for each setting and option. Simply locate the
|
||||||
feature in the file and read the C comments that precede it.
|
feature in the file and read the C comments that precede it.
|
||||||
|
|
||||||
|
This method is also illustrated in the contrib/pngminim/* makefiles and
|
||||||
|
pngusr.h.
|
||||||
|
|
||||||
III. Reading
|
III. Reading
|
||||||
|
|
||||||
We'll now walk you through the possible functions to call when reading
|
We'll now walk you through the possible functions to call when reading
|
||||||
@ -3448,7 +3464,8 @@ However, there are some uncertainties about the status of local variables
|
|||||||
after a longjmp, so the user may want to be careful about doing anything
|
after a longjmp, so the user may want to be careful about doing anything
|
||||||
after setjmp returns non-zero besides returning itself. Consult your
|
after setjmp returns non-zero besides returning itself. Consult your
|
||||||
compiler documentation for more details. For an alternative approach, you
|
compiler documentation for more details. For an alternative approach, you
|
||||||
may wish to use the "cexcept" facility (see http://cexcept.sourceforge.net).
|
may wish to use the "cexcept" facility (see http://cexcept.sourceforge.net),
|
||||||
|
which is illustrated in pngvalid.c and in contrib/visupng.
|
||||||
|
|
||||||
Custom chunks
|
Custom chunks
|
||||||
|
|
||||||
@ -3466,8 +3483,11 @@ and look at how other chunks were designed, so you can do things
|
|||||||
similarly. Second, check out the sections of libpng that read and
|
similarly. Second, check out the sections of libpng that read and
|
||||||
write chunks. Try to find a chunk that is similar to yours and use
|
write chunks. Try to find a chunk that is similar to yours and use
|
||||||
it as a template. More details can be found in the comments inside
|
it as a template. More details can be found in the comments inside
|
||||||
the code. It is best to handle unknown chunks in a generic method,
|
the code. It is best to handle private or unknown chunks in a generic method,
|
||||||
via callback functions, instead of by modifying libpng functions.
|
via callback functions, instead of by modifying libpng functions. This
|
||||||
|
is illustrated in pngtest.c, which uses a callback function to handle a
|
||||||
|
private "vpAg" chunk and the new "sTER" chunk, which are both unknown to
|
||||||
|
libpng.
|
||||||
|
|
||||||
If you wish to write your own transformation for the data, look through
|
If you wish to write your own transformation for the data, look through
|
||||||
the part of the code that does the transformations, and check out some of
|
the part of the code that does the transformations, and check out some of
|
||||||
@ -3663,8 +3683,8 @@ capability, which you'll still have).
|
|||||||
All the reading and writing specific code are in separate files, so the
|
All the reading and writing specific code are in separate files, so the
|
||||||
linker should only grab the files it needs. However, if you want to
|
linker should only grab the files it needs. However, if you want to
|
||||||
make sure, or if you are building a stand alone library, all the
|
make sure, or if you are building a stand alone library, all the
|
||||||
reading files start with pngr and all the writing files start with
|
reading files start with "pngr" and all the writing files start with "pngw".
|
||||||
pngw. The files that don't match either (like png.c, pngtrans.c, etc.)
|
The files that don't match either (like png.c, pngtrans.c, etc.)
|
||||||
are used for both reading and writing, and always need to be included.
|
are used for both reading and writing, and always need to be included.
|
||||||
The progressive reader is in pngpread.c
|
The progressive reader is in pngpread.c
|
||||||
|
|
||||||
@ -4042,7 +4062,6 @@ absolutely necessary) interlace an image.
|
|||||||
|
|
||||||
libpng 1.5.0 adds an API png_longjmp(png_ptr, value). This API calls
|
libpng 1.5.0 adds an API png_longjmp(png_ptr, value). This API calls
|
||||||
the application-provided png_longjmp_ptr on the internal, but application
|
the application-provided png_longjmp_ptr on the internal, but application
|
||||||
initialized, jmpbuf. It is provided as a convenience to avoid the need
|
|
||||||
initialized, longjmp buffer. It is provided as a convenience to avoid
|
initialized, longjmp buffer. It is provided as a convenience to avoid
|
||||||
the need to use the png_jmpbuf macro, which had the unnecessary side
|
the need to use the png_jmpbuf macro, which had the unnecessary side
|
||||||
effect of resetting the internal png_longjmp_ptr value.
|
effect of resetting the internal png_longjmp_ptr value.
|
||||||
@ -4121,9 +4140,9 @@ increase the limits.
|
|||||||
B. Changes to the build and configuration of libpng
|
B. Changes to the build and configuration of libpng
|
||||||
|
|
||||||
Details of internal changes to the library code can be found in the CHANGES
|
Details of internal changes to the library code can be found in the CHANGES
|
||||||
file. These will be of no concern to the vast majority of library users or
|
file and in the GIT repository logs. These will be of no concern to the vast
|
||||||
builders, however the few who configure libpng to a non-default feature
|
majority of library users or builders, however the few who configure libpng
|
||||||
set may need to change how this is done.
|
to a non-default feature set may need to change how this is done.
|
||||||
|
|
||||||
There should be no need for library builders to alter build scripts if
|
There should be no need for library builders to alter build scripts if
|
||||||
these use the distributed build support - configure or the makefiles -
|
these use the distributed build support - configure or the makefiles -
|
||||||
@ -4132,14 +4151,14 @@ to build pnglibconf.h where the corresponding makefile does not do so.
|
|||||||
|
|
||||||
Building libpng with a non-default configuration has changed completely.
|
Building libpng with a non-default configuration has changed completely.
|
||||||
The old method using pngusr.h should still work correctly even though the
|
The old method using pngusr.h should still work correctly even though the
|
||||||
way pngusr.h is used in the build has been changed, however library
|
way pngusr.h is used in the build has been changed; however, library
|
||||||
builders will probably want to examine the changes to take advantage of
|
builders will probably want to examine the changes to take advantage of
|
||||||
new capabilities and to simplify their build system.
|
new capabilities and to simplify their build system.
|
||||||
|
|
||||||
B.1 Specific changes to library configuration capabilities
|
B.1 Specific changes to library configuration capabilities
|
||||||
|
|
||||||
The library now supports a complete fixed point implementation and can
|
The library now supports a complete fixed point implementation and can
|
||||||
thus be used on systems which have no floating point support or very
|
thus be used on systems that have no floating point support or very
|
||||||
limited or slow support. Previously gamma correction, an essential part
|
limited or slow support. Previously gamma correction, an essential part
|
||||||
of complete PNG support, required reasonably fast floating point.
|
of complete PNG support, required reasonably fast floating point.
|
||||||
|
|
||||||
@ -4155,14 +4174,14 @@ pnglibconf.h
|
|||||||
As part of this the mechanism used to choose procedure call standards on
|
As part of this the mechanism used to choose procedure call standards on
|
||||||
those systems that allow a choice has been changed. At present this only
|
those systems that allow a choice has been changed. At present this only
|
||||||
affects certain Microsoft (DOS, Windows) and IBM (OS/2) operating systems
|
affects certain Microsoft (DOS, Windows) and IBM (OS/2) operating systems
|
||||||
running on Intel processors. As before PNGAPI is defined where required
|
running on Intel processors. As before, PNGAPI is defined where required
|
||||||
to control the exported API functions; however, two new macros, PNGCBAPI
|
to control the exported API functions; however, two new macros, PNGCBAPI
|
||||||
and PNGCAPI, are used instead for callback functions (PNGCBAPI) and
|
and PNGCAPI, are used instead for callback functions (PNGCBAPI) and
|
||||||
(PNGCAPI) for functions that must match a C library prototype (currently
|
(PNGCAPI) for functions that must match a C library prototype (currently
|
||||||
only png_longjmp_ptr, which must match the C longjmp function.) The new
|
only png_longjmp_ptr, which must match the C longjmp function.) The new
|
||||||
approach is documented in pngconf.h
|
approach is documented in pngconf.h
|
||||||
|
|
||||||
Despite these changes libpng 1.5.0 only supports the native C function
|
Despite these changes, libpng 1.5.0 only supports the native C function
|
||||||
calling standard on those platforms tested so far (__cdecl on Microsoft
|
calling standard on those platforms tested so far (__cdecl on Microsoft
|
||||||
Windows). This is because the support requirements for alternative
|
Windows). This is because the support requirements for alternative
|
||||||
calling conventions seem to no longer exist. Developers who find it
|
calling conventions seem to no longer exist. Developers who find it
|
||||||
@ -4196,7 +4215,9 @@ if the feature is supported or:
|
|||||||
|
|
||||||
if it is not. Library code consistently checks for the 'SUPPORTED' macro.
|
if it is not. Library code consistently checks for the 'SUPPORTED' macro.
|
||||||
It does not, and should not, check for the 'NO' macro which will not
|
It does not, and should not, check for the 'NO' macro which will not
|
||||||
normally be defined even if the feature is not supported.
|
normally be defined even if the feature is not supported. The 'NO' macros
|
||||||
|
are only used internally for setting the corresponding 'SUPPORTED' macros
|
||||||
|
or not.
|
||||||
|
|
||||||
Compatibility with the old names is provided as follows:
|
Compatibility with the old names is provided as follows:
|
||||||
|
|
||||||
@ -4253,10 +4274,10 @@ application built without PNG_USER_CONFIG defined would see the
|
|||||||
unmodified, default, libpng API and thus would probably fail to link.
|
unmodified, default, libpng API and thus would probably fail to link.
|
||||||
|
|
||||||
These mechanisms still work in the configure build and in any makefile
|
These mechanisms still work in the configure build and in any makefile
|
||||||
build that builds pnglibconf.h although the feature selection macros
|
build that builds pnglibconf.h, although the feature selection macros
|
||||||
have changed somewhat as described above. In 1.5.0, however, pngusr.h is
|
have changed somewhat as described above. In 1.5.0, however, pngusr.h is
|
||||||
processed only once, when the exported header file pnglibconf.h is built.
|
processed only once, when the exported header file pnglibconf.h is built.
|
||||||
pngconf.h no longer includes pngusr.h, therefore it is ignored after the
|
pngconf.h no longer includes pngusr.h, therefore pngusr.h is ignored after the
|
||||||
build of pnglibconf.h and it is never included in an application build.
|
build of pnglibconf.h and it is never included in an application build.
|
||||||
|
|
||||||
The rarely used alternative of adding a list of feature macros to the
|
The rarely used alternative of adding a list of feature macros to the
|
||||||
@ -4270,7 +4291,7 @@ scripts/pnglibconf.dfa. This requires the program awk. Brian Kernighan
|
|||||||
and all known later implementations (often called by subtly different
|
and all known later implementations (often called by subtly different
|
||||||
names - nawk and gawk for example) are adequate to build pnglibconf.h.
|
names - nawk and gawk for example) are adequate to build pnglibconf.h.
|
||||||
The Sun Microsystems (now Oracle) program 'awk' is an earlier version
|
The Sun Microsystems (now Oracle) program 'awk' is an earlier version
|
||||||
and does not work, this may also apply to other systems that have a
|
and does not work; this may also apply to other systems that have a
|
||||||
functioning awk called 'nawk'.
|
functioning awk called 'nawk'.
|
||||||
|
|
||||||
Configuration options are now documented in scripts/pnglibconf.dfa. This
|
Configuration options are now documented in scripts/pnglibconf.dfa. This
|
||||||
@ -4312,8 +4333,8 @@ the libpng bug tracker at
|
|||||||
|
|
||||||
We also accept patches built from the tar or zip distributions, and
|
We also accept patches built from the tar or zip distributions, and
|
||||||
simple verbal discriptions of bug fixes, reported either to the
|
simple verbal discriptions of bug fixes, reported either to the
|
||||||
SourceForge bug tracker or to the png-mng-implement at lists.sf.net
|
SourceForge bug tracker, to the png-mng-implement at lists.sf.net
|
||||||
mailing list.
|
mailing list, or directly to glennrp.
|
||||||
|
|
||||||
XIII. Coding style
|
XIII. Coding style
|
||||||
|
|
||||||
@ -4426,7 +4447,7 @@ Other rules can be inferred by inspecting the libpng source.
|
|||||||
|
|
||||||
XIV. Y2K Compliance in libpng
|
XIV. Y2K Compliance in libpng
|
||||||
|
|
||||||
July 10, 2011
|
July 12, 2011
|
||||||
|
|
||||||
Since the PNG Development group is an ad-hoc body, we can't make
|
Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
an official declaration.
|
an official declaration.
|
||||||
|
79
libpng.3
79
libpng.3
@ -1,4 +1,4 @@
|
|||||||
.TH LIBPNG 3 "July 10, 2011"
|
.TH LIBPNG 3 "July 12, 2011"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.5beta01
|
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.5beta01
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -955,7 +955,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng.
|
|||||||
.SH LIBPNG.TXT
|
.SH LIBPNG.TXT
|
||||||
libpng-manual.txt - A description on how to use and modify libpng
|
libpng-manual.txt - A description on how to use and modify libpng
|
||||||
|
|
||||||
libpng version 1.5.5beta01 - July 10, 2011
|
libpng version 1.5.5beta01 - July 12, 2011
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
<glennrp at users.sourceforge.net>
|
<glennrp at users.sourceforge.net>
|
||||||
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
@ -966,7 +966,7 @@ libpng-manual.txt - A description on how to use and modify libpng
|
|||||||
|
|
||||||
Based on:
|
Based on:
|
||||||
|
|
||||||
libpng versions 0.97, January 1998, through 1.5.5beta01 - July 10, 2011
|
libpng versions 0.97, January 1998, through 1.5.5beta01 - July 12, 2011
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
|
|
||||||
@ -1071,14 +1071,23 @@ Almost all libpng APIs require a pointer to a png_struct as the first argument.
|
|||||||
Many (in particular the png_set and png_get APIs) also require a pointer
|
Many (in particular the png_set and png_get APIs) also require a pointer
|
||||||
to png_info as the second argument. Some application visible macros
|
to png_info as the second argument. Some application visible macros
|
||||||
defined in png.h designed for basic data access (reading and writing
|
defined in png.h designed for basic data access (reading and writing
|
||||||
integers in the PNG format) break this rule, but it's almost always safe
|
integers in the PNG format) don't take a png_info pointer, but it's almost
|
||||||
to assume that a (png_struct*) has to be passed to call an API function.
|
always safe to assume that a (png_struct*) has to be passed to call an API
|
||||||
|
function.
|
||||||
|
|
||||||
|
You can have more than one png_info structure associated with an image,
|
||||||
|
as illustrated in pngtest.c, one for information valid prior to the
|
||||||
|
IDAT chunks and another (called "end_info" below) for things after them.
|
||||||
|
|
||||||
The png.h header file is an invaluable reference for programming with libpng.
|
The png.h header file is an invaluable reference for programming with libpng.
|
||||||
And while I'm on the topic, make sure you include the libpng header file:
|
And while I'm on the topic, make sure you include the libpng header file:
|
||||||
|
|
||||||
#include <png.h>
|
#include <png.h>
|
||||||
|
|
||||||
|
and also (as of libpng-1.5.0) the zlib header file, if you need it:
|
||||||
|
|
||||||
|
#include <zlib.h>
|
||||||
|
|
||||||
.SS Types
|
.SS Types
|
||||||
|
|
||||||
The png.h header file defines a number of integral types used by the
|
The png.h header file defines a number of integral types used by the
|
||||||
@ -1120,7 +1129,7 @@ portability. From libpng 1.5.0 the feature macros set during the build
|
|||||||
of libpng are recorded in the header file "pnglibconf.h" and this file
|
of libpng are recorded in the header file "pnglibconf.h" and this file
|
||||||
is always included by png.h.
|
is always included by png.h.
|
||||||
|
|
||||||
If you don't need to change the library configuration from the default skip to
|
If you don't need to change the library configuration from the default, skip to
|
||||||
the next section ("Reading").
|
the next section ("Reading").
|
||||||
|
|
||||||
Notice that some of the makefiles in the 'scripts' directory and (in 1.5.0) all
|
Notice that some of the makefiles in the 'scripts' directory and (in 1.5.0) all
|
||||||
@ -1193,6 +1202,10 @@ source code. Most of these values have performance implications for the library
|
|||||||
but most of them have no visible effect on the API. Some can also be overridden
|
but most of them have no visible effect on the API. Some can also be overridden
|
||||||
from the API.
|
from the API.
|
||||||
|
|
||||||
|
This method of building a customized pnglibconf.h is illustrated in
|
||||||
|
contrib/pngminim/*. See the "$(PNGCONF):" target in the makefile and
|
||||||
|
pngusr.dfa in these directories.
|
||||||
|
|
||||||
C. Configuration using PNG_USR_CONFIG
|
C. Configuration using PNG_USR_CONFIG
|
||||||
|
|
||||||
If -DPNG_USR_CONFIG is added to the CFLAGS when pnglibconf.h is built the file
|
If -DPNG_USR_CONFIG is added to the CFLAGS when pnglibconf.h is built the file
|
||||||
@ -1229,6 +1242,9 @@ examine the intermediate file pnglibconf.dfn to find the full set of
|
|||||||
dependency information for each setting and option. Simply locate the
|
dependency information for each setting and option. Simply locate the
|
||||||
feature in the file and read the C comments that precede it.
|
feature in the file and read the C comments that precede it.
|
||||||
|
|
||||||
|
This method is also illustrated in the contrib/pngminim/* makefiles and
|
||||||
|
pngusr.h.
|
||||||
|
|
||||||
.SH III. Reading
|
.SH III. Reading
|
||||||
|
|
||||||
We'll now walk you through the possible functions to call when reading
|
We'll now walk you through the possible functions to call when reading
|
||||||
@ -4403,7 +4419,8 @@ However, there are some uncertainties about the status of local variables
|
|||||||
after a longjmp, so the user may want to be careful about doing anything
|
after a longjmp, so the user may want to be careful about doing anything
|
||||||
after setjmp returns non-zero besides returning itself. Consult your
|
after setjmp returns non-zero besides returning itself. Consult your
|
||||||
compiler documentation for more details. For an alternative approach, you
|
compiler documentation for more details. For an alternative approach, you
|
||||||
may wish to use the "cexcept" facility (see http://cexcept.sourceforge.net).
|
may wish to use the "cexcept" facility (see http://cexcept.sourceforge.net),
|
||||||
|
which is illustrated in pngvalid.c and in contrib/visupng.
|
||||||
|
|
||||||
.SS Custom chunks
|
.SS Custom chunks
|
||||||
|
|
||||||
@ -4421,8 +4438,11 @@ and look at how other chunks were designed, so you can do things
|
|||||||
similarly. Second, check out the sections of libpng that read and
|
similarly. Second, check out the sections of libpng that read and
|
||||||
write chunks. Try to find a chunk that is similar to yours and use
|
write chunks. Try to find a chunk that is similar to yours and use
|
||||||
it as a template. More details can be found in the comments inside
|
it as a template. More details can be found in the comments inside
|
||||||
the code. It is best to handle unknown chunks in a generic method,
|
the code. It is best to handle private or unknown chunks in a generic method,
|
||||||
via callback functions, instead of by modifying libpng functions.
|
via callback functions, instead of by modifying libpng functions. This
|
||||||
|
is illustrated in pngtest.c, which uses a callback function to handle a
|
||||||
|
private "vpAg" chunk and the new "sTER" chunk, which are both unknown to
|
||||||
|
libpng.
|
||||||
|
|
||||||
If you wish to write your own transformation for the data, look through
|
If you wish to write your own transformation for the data, look through
|
||||||
the part of the code that does the transformations, and check out some of
|
the part of the code that does the transformations, and check out some of
|
||||||
@ -4618,8 +4638,8 @@ capability, which you'll still have).
|
|||||||
All the reading and writing specific code are in separate files, so the
|
All the reading and writing specific code are in separate files, so the
|
||||||
linker should only grab the files it needs. However, if you want to
|
linker should only grab the files it needs. However, if you want to
|
||||||
make sure, or if you are building a stand alone library, all the
|
make sure, or if you are building a stand alone library, all the
|
||||||
reading files start with pngr and all the writing files start with
|
reading files start with "pngr" and all the writing files start with "pngw".
|
||||||
pngw. The files that don't match either (like png.c, pngtrans.c, etc.)
|
The files that don't match either (like png.c, pngtrans.c, etc.)
|
||||||
are used for both reading and writing, and always need to be included.
|
are used for both reading and writing, and always need to be included.
|
||||||
The progressive reader is in pngpread.c
|
The progressive reader is in pngpread.c
|
||||||
|
|
||||||
@ -4997,7 +5017,6 @@ absolutely necessary) interlace an image.
|
|||||||
|
|
||||||
libpng 1.5.0 adds an API png_longjmp(png_ptr, value). This API calls
|
libpng 1.5.0 adds an API png_longjmp(png_ptr, value). This API calls
|
||||||
the application-provided png_longjmp_ptr on the internal, but application
|
the application-provided png_longjmp_ptr on the internal, but application
|
||||||
initialized, jmpbuf. It is provided as a convenience to avoid the need
|
|
||||||
initialized, longjmp buffer. It is provided as a convenience to avoid
|
initialized, longjmp buffer. It is provided as a convenience to avoid
|
||||||
the need to use the png_jmpbuf macro, which had the unnecessary side
|
the need to use the png_jmpbuf macro, which had the unnecessary side
|
||||||
effect of resetting the internal png_longjmp_ptr value.
|
effect of resetting the internal png_longjmp_ptr value.
|
||||||
@ -5076,9 +5095,9 @@ increase the limits.
|
|||||||
B. Changes to the build and configuration of libpng
|
B. Changes to the build and configuration of libpng
|
||||||
|
|
||||||
Details of internal changes to the library code can be found in the CHANGES
|
Details of internal changes to the library code can be found in the CHANGES
|
||||||
file. These will be of no concern to the vast majority of library users or
|
file and in the GIT repository logs. These will be of no concern to the vast
|
||||||
builders, however the few who configure libpng to a non-default feature
|
majority of library users or builders, however the few who configure libpng
|
||||||
set may need to change how this is done.
|
to a non-default feature set may need to change how this is done.
|
||||||
|
|
||||||
There should be no need for library builders to alter build scripts if
|
There should be no need for library builders to alter build scripts if
|
||||||
these use the distributed build support - configure or the makefiles -
|
these use the distributed build support - configure or the makefiles -
|
||||||
@ -5087,14 +5106,14 @@ to build pnglibconf.h where the corresponding makefile does not do so.
|
|||||||
|
|
||||||
Building libpng with a non-default configuration has changed completely.
|
Building libpng with a non-default configuration has changed completely.
|
||||||
The old method using pngusr.h should still work correctly even though the
|
The old method using pngusr.h should still work correctly even though the
|
||||||
way pngusr.h is used in the build has been changed, however library
|
way pngusr.h is used in the build has been changed; however, library
|
||||||
builders will probably want to examine the changes to take advantage of
|
builders will probably want to examine the changes to take advantage of
|
||||||
new capabilities and to simplify their build system.
|
new capabilities and to simplify their build system.
|
||||||
|
|
||||||
B.1 Specific changes to library configuration capabilities
|
B.1 Specific changes to library configuration capabilities
|
||||||
|
|
||||||
The library now supports a complete fixed point implementation and can
|
The library now supports a complete fixed point implementation and can
|
||||||
thus be used on systems which have no floating point support or very
|
thus be used on systems that have no floating point support or very
|
||||||
limited or slow support. Previously gamma correction, an essential part
|
limited or slow support. Previously gamma correction, an essential part
|
||||||
of complete PNG support, required reasonably fast floating point.
|
of complete PNG support, required reasonably fast floating point.
|
||||||
|
|
||||||
@ -5110,14 +5129,14 @@ pnglibconf.h
|
|||||||
As part of this the mechanism used to choose procedure call standards on
|
As part of this the mechanism used to choose procedure call standards on
|
||||||
those systems that allow a choice has been changed. At present this only
|
those systems that allow a choice has been changed. At present this only
|
||||||
affects certain Microsoft (DOS, Windows) and IBM (OS/2) operating systems
|
affects certain Microsoft (DOS, Windows) and IBM (OS/2) operating systems
|
||||||
running on Intel processors. As before PNGAPI is defined where required
|
running on Intel processors. As before, PNGAPI is defined where required
|
||||||
to control the exported API functions; however, two new macros, PNGCBAPI
|
to control the exported API functions; however, two new macros, PNGCBAPI
|
||||||
and PNGCAPI, are used instead for callback functions (PNGCBAPI) and
|
and PNGCAPI, are used instead for callback functions (PNGCBAPI) and
|
||||||
(PNGCAPI) for functions that must match a C library prototype (currently
|
(PNGCAPI) for functions that must match a C library prototype (currently
|
||||||
only png_longjmp_ptr, which must match the C longjmp function.) The new
|
only png_longjmp_ptr, which must match the C longjmp function.) The new
|
||||||
approach is documented in pngconf.h
|
approach is documented in pngconf.h
|
||||||
|
|
||||||
Despite these changes libpng 1.5.0 only supports the native C function
|
Despite these changes, libpng 1.5.0 only supports the native C function
|
||||||
calling standard on those platforms tested so far (__cdecl on Microsoft
|
calling standard on those platforms tested so far (__cdecl on Microsoft
|
||||||
Windows). This is because the support requirements for alternative
|
Windows). This is because the support requirements for alternative
|
||||||
calling conventions seem to no longer exist. Developers who find it
|
calling conventions seem to no longer exist. Developers who find it
|
||||||
@ -5151,7 +5170,9 @@ if the feature is supported or:
|
|||||||
|
|
||||||
if it is not. Library code consistently checks for the 'SUPPORTED' macro.
|
if it is not. Library code consistently checks for the 'SUPPORTED' macro.
|
||||||
It does not, and should not, check for the 'NO' macro which will not
|
It does not, and should not, check for the 'NO' macro which will not
|
||||||
normally be defined even if the feature is not supported.
|
normally be defined even if the feature is not supported. The 'NO' macros
|
||||||
|
are only used internally for setting the corresponding 'SUPPORTED' macros
|
||||||
|
or not.
|
||||||
|
|
||||||
Compatibility with the old names is provided as follows:
|
Compatibility with the old names is provided as follows:
|
||||||
|
|
||||||
@ -5208,10 +5229,10 @@ application built without PNG_USER_CONFIG defined would see the
|
|||||||
unmodified, default, libpng API and thus would probably fail to link.
|
unmodified, default, libpng API and thus would probably fail to link.
|
||||||
|
|
||||||
These mechanisms still work in the configure build and in any makefile
|
These mechanisms still work in the configure build and in any makefile
|
||||||
build that builds pnglibconf.h although the feature selection macros
|
build that builds pnglibconf.h, although the feature selection macros
|
||||||
have changed somewhat as described above. In 1.5.0, however, pngusr.h is
|
have changed somewhat as described above. In 1.5.0, however, pngusr.h is
|
||||||
processed only once, when the exported header file pnglibconf.h is built.
|
processed only once, when the exported header file pnglibconf.h is built.
|
||||||
pngconf.h no longer includes pngusr.h, therefore it is ignored after the
|
pngconf.h no longer includes pngusr.h, therefore pngusr.h is ignored after the
|
||||||
build of pnglibconf.h and it is never included in an application build.
|
build of pnglibconf.h and it is never included in an application build.
|
||||||
|
|
||||||
The rarely used alternative of adding a list of feature macros to the
|
The rarely used alternative of adding a list of feature macros to the
|
||||||
@ -5225,7 +5246,7 @@ scripts/pnglibconf.dfa. This requires the program awk. Brian Kernighan
|
|||||||
and all known later implementations (often called by subtly different
|
and all known later implementations (often called by subtly different
|
||||||
names - nawk and gawk for example) are adequate to build pnglibconf.h.
|
names - nawk and gawk for example) are adequate to build pnglibconf.h.
|
||||||
The Sun Microsystems (now Oracle) program 'awk' is an earlier version
|
The Sun Microsystems (now Oracle) program 'awk' is an earlier version
|
||||||
and does not work, this may also apply to other systems that have a
|
and does not work; this may also apply to other systems that have a
|
||||||
functioning awk called 'nawk'.
|
functioning awk called 'nawk'.
|
||||||
|
|
||||||
Configuration options are now documented in scripts/pnglibconf.dfa. This
|
Configuration options are now documented in scripts/pnglibconf.dfa. This
|
||||||
@ -5267,8 +5288,8 @@ the libpng bug tracker at
|
|||||||
|
|
||||||
We also accept patches built from the tar or zip distributions, and
|
We also accept patches built from the tar or zip distributions, and
|
||||||
simple verbal discriptions of bug fixes, reported either to the
|
simple verbal discriptions of bug fixes, reported either to the
|
||||||
SourceForge bug tracker or to the png-mng-implement at lists.sf.net
|
SourceForge bug tracker, to the png-mng-implement at lists.sf.net
|
||||||
mailing list.
|
mailing list, or directly to glennrp.
|
||||||
|
|
||||||
.SH XIII. Coding style
|
.SH XIII. Coding style
|
||||||
|
|
||||||
@ -5381,7 +5402,7 @@ Other rules can be inferred by inspecting the libpng source.
|
|||||||
|
|
||||||
.SH XIV. Y2K Compliance in libpng
|
.SH XIV. Y2K Compliance in libpng
|
||||||
|
|
||||||
July 10, 2011
|
July 12, 2011
|
||||||
|
|
||||||
Since the PNG Development group is an ad-hoc body, we can't make
|
Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
an official declaration.
|
an official declaration.
|
||||||
@ -5639,7 +5660,7 @@ possible without all of you.
|
|||||||
|
|
||||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||||
|
|
||||||
Libpng version 1.5.5beta01 - July 10, 2011:
|
Libpng version 1.5.5beta01 - July 12, 2011:
|
||||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
||||||
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
|
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
|
||||||
|
|
||||||
@ -5662,7 +5683,7 @@ this sentence.
|
|||||||
|
|
||||||
This code is released under the libpng license.
|
This code is released under the libpng license.
|
||||||
|
|
||||||
libpng versions 1.2.6, August 15, 2004, through 1.5.5beta01, July 10, 2011, are
|
libpng versions 1.2.6, August 15, 2004, through 1.5.5beta01, July 12, 2011, are
|
||||||
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
|
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
|
||||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
with the following individual added to the list of Contributing Authors
|
with the following individual added to the list of Contributing Authors
|
||||||
@ -5761,7 +5782,7 @@ certification mark of the Open Source Initiative.
|
|||||||
|
|
||||||
Glenn Randers-Pehrson
|
Glenn Randers-Pehrson
|
||||||
glennrp at users.sourceforge.net
|
glennrp at users.sourceforge.net
|
||||||
July 10, 2011
|
July 12, 2011
|
||||||
|
|
||||||
.\" end of man page
|
.\" end of man page
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user