Including LibMNG [The Multiple-image Network Graphics Library] with Solaris Stefan Teleman 29 January 2008 1. Summary and motivation MNG [Multiple-image Network Graphics] [1] is a Graphics File Format specification. [2] In addition to the canonical MNG Format Specification, MNG defines three additional proper subsets thereof: - MNG-LC [Low Complexity] - MNG-VLC [Very Low Complexity] - JNG [JPEG Network Graphics] The Multiple-image Network Graphics Library [MNG] [1] " [ ... ] is a multiple-image member of the PNG [Portable Network Graphics] [3] format family. It can contain animations, slide shows, or complex still frames, comprised of multiple PNG or JNG single-image datastreams. [ ... ] [ ... ] The MNG format [but not MNG-LC or MNG-VLC] provides a mechanism for reusing image data without having to retransmit it. Multiple images can be composed into a 'frame' and a group of images can be used as an animated 'sprite' that moves from one location to another in subsequent frames. 'Palette animations' are also possible. MNG can also store images in a highly compressible 'Delta-PNG' format, defined herein." [2] MNG uses Zlib [4] for compressing and decompressing MNG files. The inclusion of LibMNG in Solaris will provide a unified and efficient programmatic facility for encoding JPEG, GIF and PNG files into a common wrapper graphics file format. Given that MNG supports animations, it is suitable for converting GIF animations, as well as for lossless conversions of JPEG files. This latter facility is complementary to MPEG encoding, although MNG is not intended as a replacement of MPEG's lossy compression facilities used for video storage. MNG is used by numerous open source projects, most notably SDL [5], QT [6] and KDE [7]. MNG is pronounced "Ming". This case seeks Micro/Patch release Binding. 2. Technical issues 2.1. Key objects /usr/lib/libmng.so.1.0.0 /usr/lib/libmng.so.1 -> /usr/lib/libmng.so.1.0.0 /usr/lib/libmng.so -> /usr/lib/libmng.so.1.0.0 /usr/lib/${MACH64}/libmng.so.1.0.0 /usr/lib/${MACH64}/libmng.so.1 -> /usr/lib/${MACH64}/libmng.so.1.0.0 /usr/lib/${MACH64}/libmng.so -> /usr/lib/${MACH64}/libmng.so.1.0.0 /usr/include/mng/libmng.h /usr/include/mng/libmng_conf.h /usr/include/mng/libmng_types.h /usr/share/doc/libmng/html/index.html /usr/share/doc/libmng/html/mng-lc.html /usr/share/doc/libmng/html/mng-vlc.html /usr/share/doc/libmng/html/jng.html /usr/share/doc/libmng/html/mng-1.0-20010209-pdg.html /usr/share/doc/libmng/html/mng-1.0-20010209-pdg-h20.html /usr/share/doc/libmng/html/mng-lc-1.0-20010209-pdg.html /usr/share/doc/libmng/html/mng-lc-1.0-20010209-pdg-h20.html /usr/share/doc/libmng/html/mng-vlc-1.0-20010209-pdg.html /usr/share/doc/libmng/html/mng-vlc-1.0-20010209-pdg-h20.html /usr/share/doc/libmng/html/jng-1.0-20010209-pdg.html /usr/share/doc/libmng/html/jng-1.0-20010209-pdg-h20.html /usr/share/man/man3/libmng.3 /usr/share/man/man5/jng.5 /usr/share/man/man5/mng.5 This case proposes the integration of LibMNG Version 1.0.10. This version of LibMNG [1.0.10] is thread-safe, 64-bit clean and largefile aware. The 64-bit LibMNG libraries will be delivered with this Integration. By default, LibMNG installs its header files under /usr/include. We propose changing this default installation location to a more suitable /usr/include/libmng, for the purpose of avoiding namespace pollution in /usr/include. LibMNG provides documentation in Unix man format, and HTML. The full set of documentation provided by LibMNG will be delivered with this Integration. 2.2. Programmatic facilities Access to LibMNG's API is provided by one header file, libmng.h: #include LibMNG's API makes extensive use of callback functions. This design allows for maximum portability of LibMNG across different platforms and architectures. The minimal set of callback functions which must be implemented are mng_bool mng_openstream(mng_handle hHandle); mng_bool mng_closestream(mng_handle hHandle); mng_bool mng_readdata(mng_handle hHandle, mng_ptr pBuf, mng_uint32 iBuflen, mng_uint32p pRead); It is expected that each callback function returns MNG_TRUE on success, or MNG_FALSE on failure. Although not supported directly [LibMNG does not provide an API for JPEG encoding], LibMNG can optionally use the JPEG Library [8], thereby allowing for inclusion and encoding of JPEG images [frames]. LibMNG can also use the LCMS [Little CMS] Library [9]. LCMS provides a highly efficient Color Management System, which gives LibMNG the ability to provide full color-correction, for images containing the properly encoded color-correction information. The planned inclusion of LCMS [9] with Solaris will be discussed in detail in a separate Fast-Track ARC case. 2.3. Language Bindings LibMNG is written in ANSI C. Bindings exist for several other languages [ Perl, Python, PHP, Tcl ]. None of these bindings are part of the canonical LibMNG release, and are not being considered for inclusion in Solaris at this time. 2.4. Documentation The canonical LibMNG release contains a full documentation set, in UNIX Manual format, and HTML. The full documentation set provided by LibMNG will be included in this Integration. 3. Interfaces 3.1. Interface stability LibMNG's development and release schedule are controlled by a group of developers external to SMI [1]. Although the MNG Specification [2] is 'frozen', and LibMNG attempts to maintain API and ABI compatibility between Major release versions, no explicit compatibility guarantees are provided by LibMNG. 3.2. Imported interfaces LibMNG imports interfaces from the Standard C Library, Standard Math Library and the POSIX Threads Library. In addition, the following library Interfaces are imported by LibMNG: NAME STABILITY NOTES LibPNG Committed LSARC/2003/085 LibJPEG Committed LSARC/2003/085 Z-Lib [ Zlib Compression Library ] Committed PSARC/2006/537 LCMS [ Little Color Management System ] Uncommitted PSARC/2008/071 3.3. Exported interfaces NAME STABILITY NOTES SUNWlibmng Uncommitted Package Name /usr/lib/libmng.so.1.0.0 Uncommitted Shared library /usr/lib/libmng.so.1 Uncommitted Symbolic link /usr/lib/libmng.so Uncommitted Symbolic link /usr/lib/${MACH64}/libmng.so.1.0.0 Uncommitted Shared library /usr/lib/${MACH64}/libmng.so.1 Uncommitted Symbolic link /usr/lib/${MACH64}/libmng.so Uncommitted Symbolic link /usr/include/mng/ Uncommitted Include files /usr/include/mng/libmng.h Uncommitted Header file /usr/include/mng/libmng_conf.h Uncommitted Header file /usr/include/mng/libmng_types.h Uncommitted Header files /usr/share/doc/libmng/html/index.html Uncommitted HTML Doc /usr/share/doc/libmng/html/mng-lc.html Uncommitted HTML Doc /usr/share/doc/libmng/html/mng-vlc.html Uncommitted HTML Doc /usr/share/doc/libmng/html/jng.html Uncommitted HTML Doc /usr/share/doc/libmng/html/mng-1.0-20010209-pdg.html Uncommitted HTML Doc /usr/share/doc/libmng/html/mng-1.0-20010209-pdg-h20.html Uncommitted HTML Doc /usr/share/doc/libmng/html/mng-lc-1.0-20010209-pdg.html Uncommitted HTML Doc /usr/share/doc/libmng/html/mng-lc-1.0-20010209-pdg-h20.html Uncommitted HTML Doc /usr/share/doc/libmng/html/mng-vlc-1.0-20010209-pdg.html Uncommitted HTML Doc /usr/share/doc/libmng/html/mng-vlc-1.0-20010209-pdg-h20.html Uncommitted HTML Doc /usr/share/doc/libmng/html/jng-1.0-20010209-pdg.html Uncommitted HTML Doc /usr/share/doc/libmng/html/jng-1.0-20010209-pdg-h20.html Uncommitted HTML Doc /usr/share/man/man3/libmng.3 Uncommitted Man Page /usr/share/man/man5/jng.5 Uncommitted Man Page /usr/share/man/man5/mng.5 Uncommitted Man Page 6. References [1] http://www.libmng.com/ [2] http://www.libmng.com/pub/mng/spec/mng-1.0-20010209-pdg-h20.html [3] http://www.libpng.org/ [4] http://www.zlib.org/ [5] http://www.libsdl.org/ [6] http://www.trolltech.com/products/qt/ [7] http://www.kde.org/ [8] http://www.ijg.org/ [9] http://www.littlecms.com/