Glenn Randers-Pehrson | a357b99 | 1998-02-08 20:56:40 -0600 | [diff] [blame^] | 1 | [NOTE: this is still beta version 0.99d; the text below has already |
Glenn Randers-Pehrson | 2687fcc | 1998-01-07 20:54:20 -0600 | [diff] [blame] | 2 | been updated in anticipation of the imminent 1.0 release.] |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 3 | |
Glenn Randers-Pehrson | 2687fcc | 1998-01-07 20:54:20 -0600 | [diff] [blame] | 4 | |
| 5 | README for libpng 1.0 |
| 6 | |
| 7 | This is the first official release of libpng. Don't let the fact that |
Glenn Randers-Pehrson | b6ce43d | 1998-01-01 07:13:13 -0600 | [diff] [blame] | 8 | it's the first release fool you. The libpng library has been in |
Glenn Randers-Pehrson | c4a2ae6 | 1998-01-16 22:06:18 -0600 | [diff] [blame] | 9 | extensive use and testing for about two and a half years. However, it's |
Glenn Randers-Pehrson | b6ce43d | 1998-01-01 07:13:13 -0600 | [diff] [blame] | 10 | finally gotten to the stage where there haven't been significant |
| 11 | changes to the API in some time, and people have a bad feeling about |
| 12 | libraries with versions < 1.0. |
| 13 | |
Andreas Dilger | 47a0c42 | 1997-05-16 02:46:07 -0500 | [diff] [blame] | 14 | **** |
| 15 | Note that some of the changes to the png_info structure render this |
| 16 | version of the library binary incompatible with libpng-0.89 or |
| 17 | earlier versions if you are using a shared library. The type of the |
| 18 | "filler" parameter for png_set_filler() has changed from png_byte to |
Glenn Randers-Pehrson | 2687fcc | 1998-01-07 20:54:20 -0600 | [diff] [blame] | 19 | png_uint_32, which will affect shared-library applications that use |
Andreas Dilger | 47a0c42 | 1997-05-16 02:46:07 -0500 | [diff] [blame] | 20 | this function. |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 21 | |
Andreas Dilger | 47a0c42 | 1997-05-16 02:46:07 -0500 | [diff] [blame] | 22 | To avoid problems with changes to the internals of png_info_struct, |
| 23 | new APIs have been made available in 0.95 to avoid direct application |
| 24 | access to info_ptr. These functions are the png_set_<chunk> and |
| 25 | png_get_<chunk> functions. These functions should be used when |
| 26 | accessing/storing the info_struct data, rather than manipulating it |
| 27 | directly, to avoid such problems in the future. |
Glenn Randers-Pehrson | b6ce43d | 1998-01-01 07:13:13 -0600 | [diff] [blame] | 28 | |
| 29 | It is important to note that the APIs do not make current programs |
Glenn Randers-Pehrson | 2687fcc | 1998-01-07 20:54:20 -0600 | [diff] [blame] | 30 | that access the info struct directly incompatible with the new |
Glenn Randers-Pehrson | b6ce43d | 1998-01-01 07:13:13 -0600 | [diff] [blame] | 31 | library. However, it is strongly suggested that new programs use |
| 32 | the new APIs (as shown in example.c), and older programs be converted |
| 33 | to the new format, to facilitate upgrades in the future. |
Andreas Dilger | 47a0c42 | 1997-05-16 02:46:07 -0500 | [diff] [blame] | 34 | **** |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 35 | |
Andreas Dilger | 47a0c42 | 1997-05-16 02:46:07 -0500 | [diff] [blame] | 36 | Additions since 0.90 include the ability to compile libpng as a |
| 37 | Windows DLL, and new APIs for accessing data in the info struct. |
| 38 | Experimental functions include the ability to set weighting and cost |
| 39 | factors for row filter selection, direct reads of integers from buffers |
| 40 | on big-endian processors that support misaligned data access, faster |
| 41 | methods of doing alpha composition, and more accurate 16->8 bit color |
| 42 | conversion. |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 43 | |
Andreas Dilger | 47a0c42 | 1997-05-16 02:46:07 -0500 | [diff] [blame] | 44 | The additions since 0.89 include the ability to read from a PNG stream |
| 45 | which has had some (or all) of the signature bytes read by the calling |
| 46 | application. This also allows the reading of embedded PNG streams that |
| 47 | do not have the PNG file signature. As well, it is now possible to set |
| 48 | the library action on the detection of chunk CRC errors. It is possible |
| 49 | to set different actions based on whether the CRC error occurred in a |
| 50 | critical or an ancillary chunk. |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 51 | |
| 52 | The changes made to the library, and bugs fixed are based on discussions |
| 53 | on the PNG implementation mailing list <png-implement@dworking.wustl.edu> |
| 54 | and not on material submitted to Guy. |
| 55 | |
| 56 | For a detailed description on using libpng, read libpng.txt. For |
Andreas Dilger | 47a0c42 | 1997-05-16 02:46:07 -0500 | [diff] [blame] | 57 | examples of libpng in a program, see example.c and pngtest.c. For usage |
| 58 | information and restrictions (what little they are) on libpng, see |
| 59 | png.h. For a description on using zlib (the compression library used by |
| 60 | libpng) and zlib's restrictions, see zlib.h |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 61 | |
Andreas Dilger | 47a0c42 | 1997-05-16 02:46:07 -0500 | [diff] [blame] | 62 | I have included a general makefile, as well as several machine and |
| 63 | compiler specific ones, but you may have to modify one for your own needs. |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 64 | |
| 65 | You should use zlib 1.0.4 or later to run this, but it MAY work with |
| 66 | versions as old as zlib 0.95. Even so, there are bugs in older zlib |
| 67 | versions which can cause the output of invalid compression streams for |
| 68 | some images. You will definitely need zlib 1.0.4 or later if you are |
| 69 | taking advantage of the MS-DOS "far" structure allocation for the small |
| 70 | and medium memory models. You should also note that zlib is a |
| 71 | compression library that is useful for more things than just PNG files. |
| 72 | You can use zlib as a drop-in replacement for fread() and fwrite() if |
| 73 | you are so inclined. |
| 74 | |
| 75 | zlib should be available at the same place that libpng is. |
| 76 | If not, it should be at ftp.uu.net in /graphics/png |
| 77 | Eventually, it will be at ftp.uu.net in /pub/archiving/zip/zlib |
| 78 | |
| 79 | You may also want a copy of the PNG specification. It is available |
Glenn Randers-Pehrson | c4a2ae6 | 1998-01-16 22:06:18 -0600 | [diff] [blame] | 80 | as an RFC and a W3C Recommendation. Failing |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 81 | these resources you can try ftp.uu.net in the /graphics/png directory. |
| 82 | |
| 83 | This code is currently being archived at ftp.uu.net in the |
| 84 | /graphics/png directory, and on CompuServe, Lib 20 (PNG SUPPORT) |
| 85 | at GO GRAPHSUP. If you can't find it in any of those places, |
| 86 | e-mail me, and I'll help you find it. |
| 87 | |
| 88 | If you have any code changes, requests, problems, etc., please e-mail |
| 89 | them to me. Also, I'd appreciate any make files or project files, |
| 90 | and any modifications you needed to make to get libpng to compile, |
| 91 | along with a #define variable to tell what compiler/system you are on. |
| 92 | If you needed to add transformations to libpng, or wish libpng would |
| 93 | provide the image in a different way, drop me a note (and code, if |
| 94 | possible), so I can consider supporting the transformation. |
| 95 | Finally, if you get any warning messages when compiling libpng |
| 96 | (note: not zlib), and they are easy to fix, I'd appreciate the |
| 97 | fix. Please mention "libpng" somewhere in the subject line. Thanks. |
| 98 | |
| 99 | This release was created and will be supported by myself (of course |
Glenn Randers-Pehrson | c4a2ae6 | 1998-01-16 22:06:18 -0600 | [diff] [blame] | 100 | based in a large way on Guy's and Andreas' earlier work), and the PNG group. |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 101 | |
Glenn Randers-Pehrson | 46f61e2 | 1998-01-30 21:45:12 -0600 | [diff] [blame] | 102 | randeg@alumni.rpi.edu |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 103 | png-implement@dworkin.wustl.edu |
| 104 | |
Glenn Randers-Pehrson | c4a2ae6 | 1998-01-16 22:06:18 -0600 | [diff] [blame] | 105 | You can't reach Guy, the original libpng author, at the addresses |
Glenn Randers-Pehrson | 46f61e2 | 1998-01-30 21:45:12 -0600 | [diff] [blame] | 106 | given in previous versions of this document. He and Andreas will read mail |
Glenn Randers-Pehrson | c4a2ae6 | 1998-01-16 22:06:18 -0600 | [diff] [blame] | 107 | addressed to the png-implement list, however. |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 108 | |
| 109 | Please do not send general questions about PNG. Send them to |
Glenn Randers-Pehrson | c4a2ae6 | 1998-01-16 22:06:18 -0600 | [diff] [blame] | 110 | the address in the specification (png-group@w3.org). At the same |
| 111 | time, please do not send libpng questions to that address, send them to me |
| 112 | or to png-implement@dworkin.wustl.edu. I'll |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 113 | get them in the end anyway. If you have a question about something |
| 114 | in the PNG specification that is related to using libpng, send it |
| 115 | to me. Send me any questions that start with "I was using libpng, |
| 116 | and ...". If in doubt, send questions to me. I'll bounce them |
| 117 | to others, if necessary. |
| 118 | |
| 119 | Please do not send suggestions on how to change PNG. We have |
| 120 | been discussing PNG for a couple years now, and it is official and |
| 121 | finished. If you have suggestions for libpng, however, I'll |
| 122 | gladly listen. Even if your suggestion is not used for version |
| 123 | 1.0, it may be used later. |
| 124 | |
| 125 | Files in this distribution: |
| 126 | |
Andreas Dilger | 47a0c42 | 1997-05-16 02:46:07 -0500 | [diff] [blame] | 127 | CHANGES => Description of changes between libpng versions |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 128 | README => This file |
| 129 | TODO => Things not implemented in the current library |
| 130 | ansi2knr.c => Converts files to K&R style function declarations |
| 131 | build.bat => MS-DOS batch file for Borland compiler |
| 132 | descrip.mms => VMS project file |
| 133 | example.c => Example code for using libpng functions |
| 134 | libpng.txt => Description of libpng and its functions |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 135 | makefile.aco => ACORN makefile |
| 136 | makefile.ama => Amiga makefile |
| 137 | makefile.atr => Atari makefile |
| 138 | makefile.bor => Borland makefile |
Glenn Randers-Pehrson | c4a2ae6 | 1998-01-16 22:06:18 -0600 | [diff] [blame] | 139 | makefile.dec => DEC makefile |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 140 | makefile.dj2 => DJGPP 2 makefile |
| 141 | makefile.elf => Unix ELF makefile |
| 142 | makefile.knr => Makefile which calls ansi2knr to convert files |
| 143 | makefile.mip => MIPS makefile |
| 144 | makefile.msc => Microsoft C makefile |
Glenn Randers-Pehrson | c4a2ae6 | 1998-01-16 22:06:18 -0600 | [diff] [blame] | 145 | makefile.sgi => Silicon Graphics Irix makefile |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 146 | makefile.std => Standard Unix makefile |
Glenn Randers-Pehrson | c4a2ae6 | 1998-01-16 22:06:18 -0600 | [diff] [blame] | 147 | makefile.sun => SUN makefile |
| 148 | makefile.tc3 => Turbo C 3.0 makefile |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 149 | makevms.com => VMS make program |
| 150 | png.c => Basic interface functions common to library |
| 151 | png.h => Library function and interface declarations |
| 152 | pngconf.h => System specific library configuration |
| 153 | pngerror.c => Error/warning message I/O functions |
| 154 | pngmem.c => Memory handling functions |
| 155 | pngpread.c => Progressive reading functions |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 156 | pngread.c => Read data/helper high-level functions |
| 157 | pngrio.c => Lowest-level data read I/O functions |
| 158 | pngrtran.c => Read data transformation functions |
| 159 | pngrutil.c => Read data utility functions |
Andreas Dilger | 47a0c42 | 1997-05-16 02:46:07 -0500 | [diff] [blame] | 160 | pngset.c => Functions for storing data into the info_struct |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 161 | pngtest.c => Library test program |
| 162 | pngtest.png => Library test sample image |
| 163 | pngtrans.c => Common data transformation functions |
| 164 | pngwio.c => Lowest-level write I/O functions |
| 165 | pngwrite.c => High-level write functions |
| 166 | pngwtran.c => Write data transformations |
| 167 | pngwutil.c => Write utility functions |
| 168 | |
| 169 | Good luck, and happy coding. |
| 170 | |
Glenn Randers-Pehrson | c4a2ae6 | 1998-01-16 22:06:18 -0600 | [diff] [blame] | 171 | -Glenn Randers-Pehrson |
| 172 | Internet: randeg@alumni.rpi.edu |
| 173 | Web: http://www.rpi.edu/~randeg/index.html |
| 174 | |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 175 | -Andreas Eric Dilger |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 176 | Internet: adilger@enel.ucalgary.ca |
Andreas Dilger | 47a0c42 | 1997-05-16 02:46:07 -0500 | [diff] [blame] | 177 | Web: http://www-mddsp.enel.ucalgary.ca/People/adilger/ |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 178 | |
| 179 | -Guy Eric Schalnat |
Glenn Randers-Pehrson | c4a2ae6 | 1998-01-16 22:06:18 -0600 | [diff] [blame] | 180 | (formerly of Group 42, Inc) |
Andreas Dilger | 47a0c42 | 1997-05-16 02:46:07 -0500 | [diff] [blame] | 181 | Web: http://www.group42.com/ |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 182 | |