Generated by GPT-5-mini| libpng | |
|---|---|
| Name | libpng |
| Author | Glenn Randers-Pehrson |
| Developer | libpng Development Group |
| Released | 1995 |
| Latest release | (see project releases) |
| Operating system | Cross-platform |
| Genre | Image library |
| License | libpng license (BSD-like) |
libpng libpng is a widely used open-source C library for handling Portable Network Graphics images. It provides routines for reading, writing, and manipulating PNG files and interoperates with graphics software, operating systems, and image toolchains. libpng underpins many projects across desktop, server, and embedded environments and is integrated into image editors, web browsers, and multimedia frameworks.
libpng traces its origins to the creation of the PNG format in 1996 by a consortium that included contributors from the World Wide Web Consortium, Netscape Communications Corporation, and the PNG Development Group. Early maintainers adapted code following the deprecation of the proprietary Graphics Interchange Format implementations, and the library evolved through contributions from individuals such as Glenn Randers-Pehrson and organizations like the Free Software Foundation and the Apache Software Foundation. Over successive releases libpng addressed portability for platforms including Microsoft Windows, Macintosh, and various Linux distributions, and coordinated with standards bodies and implementers involved in Mozilla Foundation and KDE graphics stacks. Security advisories and coordinated vulnerability disclosures have involved entities such as US-CERT and the Open Source Initiative community.
libpng exposes a C API that supports image I/O, chunk processing, color management, and progressive display. The API interoperates with color management systems like LittleCMS and can be used alongside graphics libraries such as libjpeg, zlib, Cairo (graphics) and OpenGL wrappers. The library offers callbacks and structures for custom I/O, memory allocation, and user-defined chunk handlers, and integrates with build systems maintained by projects like GNU Automake and CMake. Bindings and wrappers exist for runtimes and frameworks including Python (programming language), Ruby (programming language), Node.js, Qt (software), and GTK.
libpng implements the core PNG specification including support for color types, bit depths, interlacing, transparency, and ancillary chunks. It supports standard features from the PNG specification approved by the IETF and handles ancillary chunks such as tEXt, iTXt, zTXt, sRGB, gAMA, cHRM, and bKGD, enabling interoperability with image editors like Adobe Photoshop and GIMP. Extensions and related formats supported or processed by ecosystems around the library include APNG (animated PNG) via companion libraries, and metadata integrations with container formats used by Matroska and MPEG. Third-party patches and forks have added support for proprietary chunks used by vendors such as Apple Inc. and Microsoft Corporation.
libpng delegates compression and decompression to zlib and implements efficient pixel manipulation paths for common color types to optimize throughput on x86, ARM, and Power architectures. Implementations and optimizations have been benchmarked against image pipelines used by Google's Chrome, Mozilla Firefox, and server-side renderers in NGINX and Apache HTTP Server. Performance tuning includes options for row-buffering, progressive decoding, SIMD-aware memory paths used in projects like FFmpeg, and platform-specific I/O optimizations leveraged by Android and iOS ports. Build-time configuration interacts with toolchains from GCC, Clang, and Microsoft Visual C++, and continuous integration systems such as Travis CI and GitHub Actions assist in cross-platform regression testing.
libpng is distributed under a permissive license that resembles the BSD license and is compatible with many free and proprietary projects. Licensing decisions were historically coordinated with organizations including the Free Software Foundation and the Open Source Initiative to ensure compatibility with GPL-licensed software and commercial distributions maintained by vendors like Red Hat and Canonical (company). Legal discussions around patent encumbrances involved companies with image codec portfolios, and the project has emphasized patent-free implementations following precedents set by cases in the United States Court of Appeals for the Federal Circuit and policy positions from institutions such as the European Commission on software interoperability.
Development of the library is managed by the libpng Development Group and hosted across collaborative platforms used by projects like SourceForge, GitHub, and traditional mailing lists modeled after communities such as Debian and Fedora Project. Adoption spans major software including ImageMagick, GIMP, Inkscape, Blender (software), VLC media player, and desktop environments like GNOME and KDE Plasma. Commercial vendors embed the library in toolchains for Adobe Systems products, web browsers from Apple Inc. and Microsoft Corporation, and content delivery platforms used by companies such as Netflix and Amazon (company). Ongoing contributions come from independent developers, academic researchers, and corporations engaged in standards and multimedia interoperability.
Category:Free graphics software