mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Imported from libpng-1.0.1a.tar
This commit is contained in:
34
libpng.3
34
libpng.3
@@ -1,4 +1,4 @@
|
||||
.TH LIBPNG 3 "March 15, 1998"
|
||||
.TH LIBPNG 3 "April 21, 1998"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library
|
||||
.SH SYNOPSIS
|
||||
@@ -396,7 +396,7 @@ Following is a copy of the libpng.txt file that accompanies libpng.
|
||||
.SH LIBPNG.TXT
|
||||
libpng.txt - A description on how to use and modify libpng
|
||||
|
||||
libpng version 1.0.1 March 15, 1998
|
||||
libpng version 1.0.1a April 21, 1998
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<randeg@alumni.rpi.edu>
|
||||
Copyright (c) 1998, Glenn Randers-Pehrson
|
||||
@@ -872,11 +872,14 @@ unless the library has been told to transform it into another format.
|
||||
For example, 4 bit/pixel paletted or grayscale data will be returned
|
||||
2 pixels/byte with the leftmost pixel in the high-order bits of the
|
||||
byte, unless png_set_packing() is called. 8-bit RGB data will be stored
|
||||
in RGBRGBRGB format unless png_set_filler() is called to insert filler
|
||||
in RGB RGB RGB format unless png_set_filler() is called to insert filler
|
||||
bytes, either before or after each RGB triplet. 16-bit RGB data will
|
||||
be returned RRGGBBRRGGBB, with the most significant byte of the color
|
||||
be returned RRGGBB RRGGBB, with the most significant byte of the color
|
||||
value first, unless png_set_strip_16() is called to transform it to
|
||||
regular RGBRGB triplets.
|
||||
regular RGB RGB triplets, or png_set_filler() is called to insert
|
||||
filler bytes, either before or after each RRGGBB triplet. Similarly,
|
||||
8-bit or 16-bit grayscale data can be modified with png_set_filler()
|
||||
or png_set_strip_16().
|
||||
|
||||
The following code transforms grayscale images of less than 8 to 8 bits,
|
||||
changes paletted images to RGB, and adds a full alpha channel if there is
|
||||
@@ -952,7 +955,7 @@ into 4 bytes for windowing systems that need them in this format:
|
||||
PNG_COLOR_TYPE_RGB) png_set_filler(png_ptr,
|
||||
filler, PNG_FILLER_BEFORE);
|
||||
|
||||
where "filler" is the number to fill with, and the location is
|
||||
where "filler" is the 8 or 16-bit number to fill with, and the location is
|
||||
either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether
|
||||
you want the filler before the RGB or after. This transformation
|
||||
does not affect images that already have full alpha channels.
|
||||
@@ -1412,6 +1415,8 @@ png_infop info_ptr;
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
.SH IV. Writing
|
||||
|
||||
Much of this is very similar to reading. However, everything of
|
||||
@@ -1504,9 +1509,9 @@ not calling this function at all, as it has been tuned to deliver a good
|
||||
speed/compression ratio. The second parameter to png_set_filter() is
|
||||
the filter method, for which the only valid value is '0' (as of the
|
||||
October 1996 PNG specification, version 1.0). The third parameter is a
|
||||
flag that indicates
|
||||
which filter type(s) are to be tested for each scanline. See the
|
||||
Compression Library for details on the specific filter types.
|
||||
flag that indicates which filter type(s) are to be tested for each
|
||||
scanline. See the Compression Library for details on the specific filter
|
||||
types.
|
||||
|
||||
|
||||
/* turn on or off filtering, and/or choose
|
||||
@@ -1780,8 +1785,9 @@ checks to see if it has data that it can do something with, you should
|
||||
make sure to only enable a transformation if it will be valid for the
|
||||
data. For example, don't swap red and blue on grayscale data.
|
||||
|
||||
PNG files store RGB pixels packed into 3 bytes. This code tells
|
||||
the library to expect input data with 4 bytes per pixel
|
||||
PNG files store RGB pixels packed into 3 or 6 bytes. This code tells
|
||||
the library to expand the input data to 4 or 8 bytes per pixel
|
||||
(or expand 1 or 2-byte grayscale data to 2 or 4 bytes per pixel).
|
||||
|
||||
png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE);
|
||||
|
||||
@@ -1899,11 +1905,11 @@ times, or any of that other stuff necessary with png_write_rows().
|
||||
|
||||
where row_pointers is:
|
||||
|
||||
png_bytef *row_pointers[height];
|
||||
png_byte *row_pointers[height];
|
||||
|
||||
You can point to void or char or whatever you use for pixels.
|
||||
|
||||
If you can't want to write the whole image at once, you can
|
||||
If you don't want to write the whole image at once, you can
|
||||
use png_write_rows() instead. If the file is not interlaced,
|
||||
this is simple:
|
||||
|
||||
@@ -2366,7 +2372,7 @@ possible without all of you.
|
||||
|
||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||
|
||||
Libpng version 1.0.1 March 15, 1998:
|
||||
Libpng version 1.0.1a April 21, 1998:
|
||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
||||
Currently maintained by Glenn Randers-Pehrson (randeg@alumni.rpi.edu).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user