summaryrefslogtreecommitdiff
path: root/libpng.txt
diff options
context:
space:
mode:
Diffstat (limited to 'libpng.txt')
-rw-r--r--libpng.txt33
1 files changed, 18 insertions, 15 deletions
diff --git a/libpng.txt b/libpng.txt
index 099e55cbc..afa8f3808 100644
--- a/libpng.txt
+++ b/libpng.txt
@@ -1,6 +1,6 @@
libpng.txt - A description on how to use and modify libpng
- libpng version 1.2.2rc1 - April 7, 2002
+ libpng version 1.2.2 - April 15, 2002
Updated and distributed by Glenn Randers-Pehrson
<randeg@alum.rpi.edu>
Copyright (c) 1998-2002 Glenn Randers-Pehrson
@@ -2485,6 +2485,10 @@ compression level by calling:
Another useful one is to reduce the memory level used by the library.
The memory level defaults to 8, but it can be lowered if you are
short on memory (running DOS, for example, where you only have 640K).
+Note that the memory level does have an effect on compression; among
+other things, lower levels will result in sections of incompressible
+data being emitted in smaller stored blocks, with a correspondingly
+larger relative overhead of up to 15% in the worst case.
png_set_compression_mem_level(png_ptr, level);
@@ -2519,19 +2523,18 @@ to turn filtering on and off, respectively.
Individual filter types are PNG_FILTER_NONE, PNG_FILTER_SUB,
PNG_FILTER_UP, PNG_FILTER_AVG, PNG_FILTER_PAETH, which can be bitwise
ORed together with '|' to specify one or more filters to use.
-These filters are described in more detail in the PNG specification. If
-you intend to change the filter type during the course of writing
+These filters are described in more detail in the PNG specification.
+If you intend to change the filter type during the course of writing
the image, you should start with flags set for all of the filters
you intend to use so that libpng can initialize its internal
-structures appropriately for all of the filter types.
+structures appropriately for all of the filter types. (Note that this
+means the first row must always be adaptively filtered, because libpng
+currently does not allocate the filter buffers until png_write_row()
+is called for the first time.)
filters = PNG_FILTER_NONE | PNG_FILTER_SUB
PNG_FILTER_UP | PNG_FILTER_AVE |
PNG_FILTER_PAETH | PNG_ALL_FILTERS;
- or
- filters = one of PNG_FILTER_VALUE_NONE,
- PNG_FILTER_VALUE_SUB, PNG_FILTER_VALUE_UP,
- PNG_FILTER_VALUE_AVE, PNG_FILTER_VALUE_PAETH
png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE,
filters);
@@ -2543,16 +2546,16 @@ structures appropriately for all of the filter types.
in png_set_IHDR().
It is also possible to influence how libpng chooses from among the
-available filters. This is done in two ways - by telling it how
-important it is to keep the same filter for successive rows, and
-by telling it the relative computational costs of the filters.
+available filters. This is done in one or both of two ways - by
+telling it how important it is to keep the same filter for successive
+rows, and by telling it the relative computational costs of the filters.
double weights[3] = {1.5, 1.3, 1.1},
costs[PNG_FILTER_VALUE_LAST] =
{1.0, 1.3, 1.3, 1.5, 1.7};
- png_set_filter_selection(png_ptr,
- PNG_FILTER_SELECTION_WEIGHTED, 3,
+ png_set_filter_heuristics(png_ptr,
+ PNG_FILTER_HEURISTIC_WEIGHTED, 3,
weights, costs);
The weights are multiplying factors that indicate to libpng that the
@@ -2848,13 +2851,13 @@ application:
IX. Y2K Compliance in libpng
-April 7, 2002
+April 15, 2002
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.2.2rc1 are Y2K compliant. It is my belief that earlier
+upward through 1.2.2 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer that