1*593dc095SDavid du ColombierREADME for libpng version 1.2.8 - December 3, 2004 (shared library 12.0) 2*593dc095SDavid du ColombierSee the note about version numbers near the top of png.h 37dd7cddfSDavid du Colombier 4*593dc095SDavid du ColombierSee INSTALL for instructions on how to install libpng. 57dd7cddfSDavid du Colombier 6*593dc095SDavid du ColombierLibpng comes in several distribution formats. Get libpng-*.tar.gz 7*593dc095SDavid du Colombieror libpng-*.tar.bz2 if you want UNIX-style line endings in the text 8*593dc095SDavid du Colombierfiles, or lpng*.zip if you want DOS-style line endings. 97dd7cddfSDavid du Colombier 10*593dc095SDavid du ColombierVersion 0.89 was the first official release of libpng. Don't let the 11*593dc095SDavid du Colombierfact that it's the first release fool you. The libpng library has been in 12*593dc095SDavid du Colombierextensive use and testing since mid-1995. By late 1997 it had 13*593dc095SDavid du Colombierfinally gotten to the stage where there hadn't been significant 147dd7cddfSDavid du Colombierchanges to the API in some time, and people have a bad feeling about 15*593dc095SDavid du Colombierlibraries with versions < 1.0. Version 1.0.0 was released in 16*593dc095SDavid du ColombierMarch 1998. 177dd7cddfSDavid du Colombier 187dd7cddfSDavid du Colombier**** 197dd7cddfSDavid du ColombierNote that some of the changes to the png_info structure render this 207dd7cddfSDavid du Colombierversion of the library binary incompatible with libpng-0.89 or 217dd7cddfSDavid du Colombierearlier versions if you are using a shared library. The type of the 227dd7cddfSDavid du Colombier"filler" parameter for png_set_filler() has changed from png_byte to 237dd7cddfSDavid du Colombierpng_uint_32, which will affect shared-library applications that use 247dd7cddfSDavid du Colombierthis function. 257dd7cddfSDavid du Colombier 267dd7cddfSDavid du ColombierTo avoid problems with changes to the internals of png_info_struct, 277dd7cddfSDavid du Colombiernew APIs have been made available in 0.95 to avoid direct application 287dd7cddfSDavid du Colombieraccess to info_ptr. These functions are the png_set_<chunk> and 297dd7cddfSDavid du Colombierpng_get_<chunk> functions. These functions should be used when 307dd7cddfSDavid du Colombieraccessing/storing the info_struct data, rather than manipulating it 317dd7cddfSDavid du Colombierdirectly, to avoid such problems in the future. 327dd7cddfSDavid du Colombier 337dd7cddfSDavid du ColombierIt is important to note that the APIs do not make current programs 347dd7cddfSDavid du Colombierthat access the info struct directly incompatible with the new 357dd7cddfSDavid du Colombierlibrary. However, it is strongly suggested that new programs use 36*593dc095SDavid du Colombierthe new APIs (as shown in example.c and pngtest.c), and older programs 37*593dc095SDavid du Colombierbe converted to the new format, to facilitate upgrades in the future. 387dd7cddfSDavid du Colombier**** 397dd7cddfSDavid du Colombier 407dd7cddfSDavid du ColombierAdditions since 0.90 include the ability to compile libpng as a 417dd7cddfSDavid du ColombierWindows DLL, and new APIs for accessing data in the info struct. 427dd7cddfSDavid du ColombierExperimental functions include the ability to set weighting and cost 437dd7cddfSDavid du Colombierfactors for row filter selection, direct reads of integers from buffers 447dd7cddfSDavid du Colombieron big-endian processors that support misaligned data access, faster 457dd7cddfSDavid du Colombiermethods of doing alpha composition, and more accurate 16->8 bit color 467dd7cddfSDavid du Colombierconversion. 477dd7cddfSDavid du Colombier 487dd7cddfSDavid du ColombierThe additions since 0.89 include the ability to read from a PNG stream 497dd7cddfSDavid du Colombierwhich has had some (or all) of the signature bytes read by the calling 507dd7cddfSDavid du Colombierapplication. This also allows the reading of embedded PNG streams that 517dd7cddfSDavid du Colombierdo not have the PNG file signature. As well, it is now possible to set 527dd7cddfSDavid du Colombierthe library action on the detection of chunk CRC errors. It is possible 537dd7cddfSDavid du Colombierto set different actions based on whether the CRC error occurred in a 547dd7cddfSDavid du Colombiercritical or an ancillary chunk. 557dd7cddfSDavid du Colombier 567dd7cddfSDavid du ColombierThe changes made to the library, and bugs fixed are based on discussions 57*593dc095SDavid du Colombieron the PNG-implement mailing list 58*593dc095SDavid du Colombierand not on material submitted privately to Guy, Andreas, or Glenn. They will 59*593dc095SDavid du Colombierforward any good suggestions to the list. 607dd7cddfSDavid du Colombier 617dd7cddfSDavid du ColombierFor a detailed description on using libpng, read libpng.txt. For 627dd7cddfSDavid du Colombierexamples of libpng in a program, see example.c and pngtest.c. For usage 637dd7cddfSDavid du Colombierinformation and restrictions (what little they are) on libpng, see 647dd7cddfSDavid du Colombierpng.h. For a description on using zlib (the compression library used by 657dd7cddfSDavid du Colombierlibpng) and zlib's restrictions, see zlib.h 667dd7cddfSDavid du Colombier 677dd7cddfSDavid du ColombierI have included a general makefile, as well as several machine and 687dd7cddfSDavid du Colombiercompiler specific ones, but you may have to modify one for your own needs. 697dd7cddfSDavid du Colombier 707dd7cddfSDavid du ColombierYou should use zlib 1.0.4 or later to run this, but it MAY work with 717dd7cddfSDavid du Colombierversions as old as zlib 0.95. Even so, there are bugs in older zlib 727dd7cddfSDavid du Colombierversions which can cause the output of invalid compression streams for 737dd7cddfSDavid du Colombiersome images. You will definitely need zlib 1.0.4 or later if you are 747dd7cddfSDavid du Colombiertaking advantage of the MS-DOS "far" structure allocation for the small 757dd7cddfSDavid du Colombierand medium memory models. You should also note that zlib is a 767dd7cddfSDavid du Colombiercompression library that is useful for more things than just PNG files. 777dd7cddfSDavid du ColombierYou can use zlib as a drop-in replacement for fread() and fwrite() if 787dd7cddfSDavid du Colombieryou are so inclined. 797dd7cddfSDavid du Colombier 80*593dc095SDavid du Colombierzlib should be available at the same place that libpng is, or at. 81*593dc095SDavid du Colombierftp://ftp.info-zip.org/pub/infozip/zlib 827dd7cddfSDavid du Colombier 837dd7cddfSDavid du ColombierYou may also want a copy of the PNG specification. It is available 84*593dc095SDavid du Colombieras an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find 85*593dc095SDavid du Colombierthese at http://www.libpng.org/pub/png/documents/ 867dd7cddfSDavid du Colombier 87*593dc095SDavid du ColombierThis code is currently being archived at libpng.sf.net in the 88*593dc095SDavid du Colombier[DOWNLOAD] area, and on CompuServe, Lib 20 (PNG SUPPORT) 897dd7cddfSDavid du Colombierat GO GRAPHSUP. If you can't find it in any of those places, 907dd7cddfSDavid du Colombiere-mail me, and I'll help you find it. 917dd7cddfSDavid du Colombier 927dd7cddfSDavid du ColombierIf you have any code changes, requests, problems, etc., please e-mail 937dd7cddfSDavid du Colombierthem to me. Also, I'd appreciate any make files or project files, 947dd7cddfSDavid du Colombierand any modifications you needed to make to get libpng to compile, 957dd7cddfSDavid du Colombieralong with a #define variable to tell what compiler/system you are on. 967dd7cddfSDavid du ColombierIf you needed to add transformations to libpng, or wish libpng would 977dd7cddfSDavid du Colombierprovide the image in a different way, drop me a note (and code, if 987dd7cddfSDavid du Colombierpossible), so I can consider supporting the transformation. 997dd7cddfSDavid du ColombierFinally, if you get any warning messages when compiling libpng 1007dd7cddfSDavid du Colombier(note: not zlib), and they are easy to fix, I'd appreciate the 1017dd7cddfSDavid du Colombierfix. Please mention "libpng" somewhere in the subject line. Thanks. 1027dd7cddfSDavid du Colombier 1037dd7cddfSDavid du ColombierThis release was created and will be supported by myself (of course 1047dd7cddfSDavid du Colombierbased in a large way on Guy's and Andreas' earlier work), and the PNG group. 1057dd7cddfSDavid du Colombier 106*593dc095SDavid du Colombierglennrp at users.sourceforge.net 107*593dc095SDavid du Colombierpng-implement at ccrc.wustl.edu (subscription required; write to 108*593dc095SDavid du Colombiermajordomo at ccrc.wustl.edu with "subscribe png-implement" in the message). 1097dd7cddfSDavid du Colombier 1107dd7cddfSDavid du ColombierYou can't reach Guy, the original libpng author, at the addresses 1117dd7cddfSDavid du Colombiergiven in previous versions of this document. He and Andreas will read mail 1127dd7cddfSDavid du Colombieraddressed to the png-implement list, however. 1137dd7cddfSDavid du Colombier 1147dd7cddfSDavid du ColombierPlease do not send general questions about PNG. Send them to 115*593dc095SDavid du Colombierthe (png-list at ccrc.wustl.edu, subscription required, write to 116*593dc095SDavid du Colombiermajordomo at ccrc.wustl.edu with "subscribe png-list" in your message). 117*593dc095SDavid du ColombierOn the other hand, 118*593dc095SDavid du Colombierplease do not send libpng questions to that address, send them to me 119*593dc095SDavid du Colombieror to the png-implement list. I'll 1207dd7cddfSDavid du Colombierget them in the end anyway. If you have a question about something 1217dd7cddfSDavid du Colombierin the PNG specification that is related to using libpng, send it 1227dd7cddfSDavid du Colombierto me. Send me any questions that start with "I was using libpng, 1237dd7cddfSDavid du Colombierand ...". If in doubt, send questions to me. I'll bounce them 1247dd7cddfSDavid du Colombierto others, if necessary. 1257dd7cddfSDavid du Colombier 1267dd7cddfSDavid du ColombierPlease do not send suggestions on how to change PNG. We have 127*593dc095SDavid du Colombierbeen discussing PNG for nine years now, and it is official and 1287dd7cddfSDavid du Colombierfinished. If you have suggestions for libpng, however, I'll 129*593dc095SDavid du Colombiergladly listen. Even if your suggestion is not used immediately, 130*593dc095SDavid du Colombierit may be used later. 1317dd7cddfSDavid du Colombier 1327dd7cddfSDavid du ColombierFiles in this distribution: 1337dd7cddfSDavid du Colombier 134*593dc095SDavid du Colombier ANNOUNCE => Announcement of this version, with recent changes 1357dd7cddfSDavid du Colombier CHANGES => Description of changes between libpng versions 136*593dc095SDavid du Colombier KNOWNBUG => List of known bugs and deficiencies 137*593dc095SDavid du Colombier LICENSE => License to use and redistribute libpng 1387dd7cddfSDavid du Colombier README => This file 1397dd7cddfSDavid du Colombier TODO => Things not implemented in the current library 140*593dc095SDavid du Colombier Y2KINFO => Statement of Y2K compliance 1417dd7cddfSDavid du Colombier example.c => Example code for using libpng functions 142*593dc095SDavid du Colombier libpng.3 => manual page for libpng (includes libpng.txt) 1437dd7cddfSDavid du Colombier libpng.txt => Description of libpng and its functions 144*593dc095SDavid du Colombier libpngpf.3 => manual page for libpng's private functions 145*593dc095SDavid du Colombier png.5 => manual page for the PNG format 1467dd7cddfSDavid du Colombier png.c => Basic interface functions common to library 1477dd7cddfSDavid du Colombier png.h => Library function and interface declarations 1487dd7cddfSDavid du Colombier pngconf.h => System specific library configuration 149*593dc095SDavid du Colombier pngasmrd.h => Header file for assembler-coded functions 1507dd7cddfSDavid du Colombier pngerror.c => Error/warning message I/O functions 151*593dc095SDavid du Colombier pngget.c => Functions for retrieving info from struct 1527dd7cddfSDavid du Colombier pngmem.c => Memory handling functions 153*593dc095SDavid du Colombier pngbar.png => PNG logo, 88x31 154*593dc095SDavid du Colombier pngnow.png => PNG logo, 98x31 1557dd7cddfSDavid du Colombier pngpread.c => Progressive reading functions 1567dd7cddfSDavid du Colombier pngread.c => Read data/helper high-level functions 1577dd7cddfSDavid du Colombier pngrio.c => Lowest-level data read I/O functions 1587dd7cddfSDavid du Colombier pngrtran.c => Read data transformation functions 1597dd7cddfSDavid du Colombier pngrutil.c => Read data utility functions 1607dd7cddfSDavid du Colombier pngset.c => Functions for storing data into the info_struct 1617dd7cddfSDavid du Colombier pngtest.c => Library test program 1627dd7cddfSDavid du Colombier pngtest.png => Library test sample image 1637dd7cddfSDavid du Colombier pngtrans.c => Common data transformation functions 1647dd7cddfSDavid du Colombier pngwio.c => Lowest-level write I/O functions 1657dd7cddfSDavid du Colombier pngwrite.c => High-level write functions 1667dd7cddfSDavid du Colombier pngwtran.c => Write data transformations 1677dd7cddfSDavid du Colombier pngwutil.c => Write utility functions 168*593dc095SDavid du Colombier contrib => Contributions 169*593dc095SDavid du Colombier gregbook => source code for PNG reading and writing, from 170*593dc095SDavid du Colombier Greg Roelofs' "PNG: The Definitive Guide", 171*593dc095SDavid du Colombier O'Reilly, 1999 172*593dc095SDavid du Colombier msvctest => Builds and runs pngtest using a MSVC workspace 173*593dc095SDavid du Colombier pngminus => Simple pnm2png and png2pnm programs 174*593dc095SDavid du Colombier pngsuite => Test images 175*593dc095SDavid du Colombier visupng => Contains a MSVC workspace for VisualPng 176*593dc095SDavid du Colombier projects => Contains project files and workspaces for building DLL 177*593dc095SDavid du Colombier beos => Contains a Beos workspace for building libpng 178*593dc095SDavid du Colombier c5builder => Contains a Borland workspace for building libpng 179*593dc095SDavid du Colombier and zlib 180*593dc095SDavid du Colombier visualc6 => Contains a Microsoft Visual C++ (MSVC) workspace 181*593dc095SDavid du Colombier for building libpng and zlib 182*593dc095SDavid du Colombier netware.txt => Contains instructions for downloading a set of 183*593dc095SDavid du Colombier project files for building libpng and zlib on 184*593dc095SDavid du Colombier Netware. 185*593dc095SDavid du Colombier wince.txt => Contains instructions for downloading a Microsoft 186*593dc095SDavid du Colombier Visual C++ (Windows CD Toolkit) workspace for 187*593dc095SDavid du Colombier building libpng and zlib on WindowsCE 188*593dc095SDavid du Colombier scripts => Directory containing scripts for building libpng: 189*593dc095SDavid du Colombier descrip.mms => VMS makefile for MMS or MMK 190*593dc095SDavid du Colombier makefile.std => Generic UNIX makefile (cc, creates static libpng.a) 191*593dc095SDavid du Colombier makefile.elf => Linux/ELF makefile symbol versioning, 192*593dc095SDavid du Colombier gcc, creates libpng12.so.0.1.2.8) 193*593dc095SDavid du Colombier makefile.linux => Linux/ELF makefile 194*593dc095SDavid du Colombier (gcc, creates libpng12.so.0.1.2.8) 195*593dc095SDavid du Colombier makefile.gcmmx => Linux/ELF makefile 196*593dc095SDavid du Colombier (gcc, creates libpng12.so.0.1.2.8, 197*593dc095SDavid du Colombier uses assembler code tuned for Intel MMX platform) 198*593dc095SDavid du Colombier makefile.gcc => Generic makefile (gcc, creates static libpng.a) 199*593dc095SDavid du Colombier makefile.knr => Archaic UNIX Makefile that converts files with 200*593dc095SDavid du Colombier ansi2knr (Requires ansi2knr.c from 201*593dc095SDavid du Colombier ftp://ftp.cs.wisc.edu/ghost) 202*593dc095SDavid du Colombier makefile.aix => AIX makefile 203*593dc095SDavid du Colombier makefile.cygwin => Cygwin/gcc makefile 204*593dc095SDavid du Colombier makefile.darwin => Darwin makefile 205*593dc095SDavid du Colombier makefile.dec => DEC Alpha UNIX makefile 206*593dc095SDavid du Colombier makefile.freebsd => FreeBSD makefile 207*593dc095SDavid du Colombier makefile.hpgcc => HPUX makefile using gcc 208*593dc095SDavid du Colombier makefile.hpux => HPUX (10.20 and 11.00) makefile 209*593dc095SDavid du Colombier makefile.hp64 => HPUX (10.20 and 11.00) makefile, 64 bit 210*593dc095SDavid du Colombier makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static) 211*593dc095SDavid du Colombier makefile.intel => Intel C/C++ version 4.0 and later 212*593dc095SDavid du Colombier libpng.icc => Project file, IBM VisualAge/C++ 4.0 or later 213*593dc095SDavid du Colombier makefile.netbsd => NetBSD/cc makefile, PNGGCCRD, makes libpng.so. 214*593dc095SDavid du Colombier makefile.ne12bsd => NetBSD/cc makefile, PNGGCCRD, makes libpng12.so 215*593dc095SDavid du Colombier makefile.openbsd => OpenBSD makefile 216*593dc095SDavid du Colombier makefile.sgi => Silicon Graphics IRIX (cc, creates static lib) 217*593dc095SDavid du Colombier makefile.sggcc => Silicon Graphics 218*593dc095SDavid du Colombier (gcc, creates libpng12.so.0.1.2.8) 219*593dc095SDavid du Colombier makefile.sunos => Sun makefile 220*593dc095SDavid du Colombier makefile.solaris => Solaris 2.X makefile 221*593dc095SDavid du Colombier (gcc, creates libpng12.so.0.1.2.8) 222*593dc095SDavid du Colombier makefile.so9 => Solaris 9 makefile 223*593dc095SDavid du Colombier (gcc, creates libpng12.so.0.1.2.8) 224*593dc095SDavid du Colombier makefile.32sunu => Sun Ultra 32-bit makefile 225*593dc095SDavid du Colombier makefile.64sunu => Sun Ultra 64-bit makefile 226*593dc095SDavid du Colombier makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc 227*593dc095SDavid du Colombier makefile.mips => MIPS makefile 228*593dc095SDavid du Colombier makefile.acorn => Acorn makefile 229*593dc095SDavid du Colombier makefile.amiga => Amiga makefile 230*593dc095SDavid du Colombier smakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC 231*593dc095SDavid du Colombier compiler (Requires SCOPTIONS, copied from 232*593dc095SDavid du Colombier scripts/SCOPTIONS.ppc) 233*593dc095SDavid du Colombier makefile.atari => Atari makefile 234*593dc095SDavid du Colombier makefile.beos => BEOS makefile for X86 235*593dc095SDavid du Colombier makefile.bor => Borland makefile (uses bcc) 236*593dc095SDavid du Colombier makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode) 237*593dc095SDavid du Colombier makefile.tc3 => Turbo C 3.0 makefile 238*593dc095SDavid du Colombier makefile.dj2 => DJGPP 2 makefile 239*593dc095SDavid du Colombier makefile.msc => Microsoft C makefile 240*593dc095SDavid du Colombier makefile.vcawin32=> makefile for Microsoft Visual C++ 5.0 and 241*593dc095SDavid du Colombier later (uses assembler code tuned for Intel MMX 242*593dc095SDavid du Colombier platform) 243*593dc095SDavid du Colombier makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and 244*593dc095SDavid du Colombier later (does not use assembler code) 245*593dc095SDavid du Colombier makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def) 246*593dc095SDavid du Colombier pngos2.def => OS/2 module definition file used by makefile.os2 247*593dc095SDavid du Colombier makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model 248*593dc095SDavid du Colombier makevms.com => VMS build script 249*593dc095SDavid du Colombier SCOPTIONS.ppc => Used with smakefile.ppc 2507dd7cddfSDavid du Colombier 2517dd7cddfSDavid du ColombierGood luck, and happy coding. 2527dd7cddfSDavid du Colombier 253*593dc095SDavid du Colombier-Glenn Randers-Pehrson (current maintainer) 254*593dc095SDavid du Colombier Internet: glennrp at users.sourceforge.net 2557dd7cddfSDavid du Colombier 256*593dc095SDavid du Colombier-Andreas Eric Dilger (former maintainer, 1996-1997) 257*593dc095SDavid du Colombier Internet: adilger at enel.ucalgary.ca 2587dd7cddfSDavid du Colombier Web: http://www-mddsp.enel.ucalgary.ca/People/adilger/ 2597dd7cddfSDavid du Colombier 260*593dc095SDavid du Colombier-Guy Eric Schalnat (original author and former maintainer, 1995-1996) 2617dd7cddfSDavid du Colombier (formerly of Group 42, Inc) 262*593dc095SDavid du Colombier Internet: gschal at infinet.com 263