# Install libpng with Homebrew, apk, dnf, MacPorts, Nix, pacman, zypper

Library for manipulating PNG images. Version 1.6.58 via Homebrew; verified 2026-07-05.

## Install

```sh
sudo av install brew:libpng
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install libpng
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libpng
```

  Evidence: MacPorts ports tree: graphics/libpng/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add libpng
```

  Evidence: Alpine Linux edge package indexes: libpng from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install libpng
```

  Evidence: Fedora Rawhide package metadata: libpng from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#libpng
```

  Evidence: nixpkgs package indexes: pkgs/by-name/li/libpng/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S libpng
```

  Evidence: Arch Linux sync databases: libpng from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install libpng12-0
```

  Evidence: openSUSE Tumbleweed package metadata: libpng12-0 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:libpng
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/libpng>
- **Version:** 1.6.58
- **Source summary:** Library for manipulating PNG images
- **Homepage:** <https://www.libpng.org/pub/png/libpng.html>
- **Repository:** <https://github.com/pnggroup/libpng>
- **Upstream docs:** <https://www.libpng.org/pub/png/libpng-manual.txt>
- **License:** libpng-2.0
- **Source archive:** <https://downloads.sourceforge.net/project/libpng/libpng16/1.6.58/libpng-1.6.58.tar.xz>
- **Last updated:** 2026-07-05T00:14:30+09:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- libpng-config (cli)
- libpng16-config (cli)
- png-fix-itxt (cli)
- pngfix (cli)
- libpng-config (alias)
- libpng16-config (alias)
- png-fix-itxt (alias)
- pngfix (alias)

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.6.58
- Package-manager updated: 2026-07-05
- Local data: ok
- Upstream repository: https://www.libpng.org/pub/png/libpng.html
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

libpng is the official Portable Network Graphics reference library. It is the C library most closely associated with reading, writing, testing, and demonstrating PNG behavior across free and proprietary software.

### Project history

libpng began in 1995 during the early PNG effort, when the image format was designed as a patent-unencumbered replacement path for GIF-era workflows. The upstream README credits Guy Eric Schalnat as the original author and former maintainer, followed by Andreas Dilger, Glenn Randers-Pehrson, and Cosmin Truta.

The README's historical notes say libpng was in extensive use and testing from mid-1995, that 0.89 was the first official release in 1996, and that 1.0.0 was released in March 1998 after API churn had settled. Later history focused on keeping the public API stable while hiding internal structures and moving callers toward accessor functions.

### Adoption history

libpng's adoption follows PNG itself: once PNG became a web and graphics interchange staple, the reference library became a common dependency for image viewers, browsers, toolkits, converters, and build systems.

The upstream home page emphasizes that libpng supports almost all PNG features, is extensible, and has been tested for more than 30 years. That longevity is why distributions treat it as base image infrastructure rather than an optional graphics experiment.

### How it is used

Developers use libpng to read, inspect, transform, and write PNG streams from C and C-compatible languages. The package also ships small tools such as `pngfix` and config helpers used by builds.

The manual, example.c, pngtest.c, and bundled test images make libpng both a production library and a reference implementation that other encoders and decoders can compare against.

### Why package nerds care

libpng is one of the canonical small C libraries that sits underneath a surprising amount of desktop, web, and server software. Its packaging details matter because a security fix or ABI break can affect a large image-processing dependency graph.

It is also a reference-library package in the strict sense: package maintainers are not just shipping any PNG implementation, but the implementation maintained by the PNG development community as the official reference library.

### Timeline

- 1995-03-29: The CHANGES file records libpng version 0.1.
- 1996-06-05: The CHANGES file records version 0.89, described by the README as the first official release.
- 1998-03-08: The CHANGES file records version 1.0.0.
- 2011: The 1.5 line made direct access to png_struct and png_info private, according to the README's historical notes.
- 2018: The README credits Cosmin Truta as maintainer beginning in 2018.

### Related projects

- PNG is the image format that libpng implements and documents alongside the W3C, RFC, and ISO/IEC specifications.
- zlib is libpng's compression dependency for DEFLATE data inside PNG files.
- png-mng-implement is the mailing-list community referenced by upstream for implementation questions.

### Sources

- <https://raw.githubusercontent.com/pnggroup/libpng/libpng16/CHANGES>
- <https://raw.githubusercontent.com/pnggroup/libpng/libpng16/README>
- <https://www.libpng.org/pub/png/libpng.html>
- <https://www.libpng.org/pub/png/pngdocs.html>
- <https://www.libpng.org/pub/png/pnghist.html>


## Security Notes

library-like package without higher-risk signals.

- **Geiger risk:** green / low
- library-like package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** libpng
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Nix - libpng: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libpng/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - libpng - 1.6.58-r1: normalized package name match | Alpine Linux edge package indexes: libpng from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Portable Network Graphics library | http://www.libpng.org
- apk - libpng-dev - 1.6.58-r1: normalized package name match | Alpine Linux edge package indexes: libpng-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Portable Network Graphics library (development files) | http://www.libpng.org
- apk - libpng-doc - 1.6.58-r1: normalized package name match | Alpine Linux edge package indexes: libpng-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Portable Network Graphics library (documentation) | http://www.libpng.org
- apk - libpng-static - 1.6.58-r1: normalized package name match | Alpine Linux edge package indexes: libpng-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Portable Network Graphics library (static library) | http://www.libpng.org
- apk - libpng-utils - 1.6.58-r1: normalized package name match | Alpine Linux edge package indexes: libpng-utils from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Portable Network Graphics library (pngfix utils) | http://www.libpng.org
- dnf - libpng - 1.6.58-1.fc45: normalized package name match | Fedora Rawhide package metadata: libpng from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | A library of functions for manipulating PNG image format files | http://www.libpng.org/pub/png/
- dnf - libpng-devel - 1.6.58-1.fc45: normalized package name match | Fedora Rawhide package metadata: libpng-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development tools for programs to manipulate PNG image format files | http://www.libpng.org/pub/png/
- dnf - libpng-static - 1.6.58-1.fc45: normalized package name match | Fedora Rawhide package metadata: libpng-static from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Static PNG image format file library | http://www.libpng.org/pub/png/
- dnf - libpng-tools - 1.6.58-1.fc45: normalized package name match | Fedora Rawhide package metadata: libpng-tools from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Tools for PNG image format file library | http://www.libpng.org/pub/png/
- pacman - libpng - 1.6.58-1: normalized package name match | Arch Linux sync databases: libpng from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A collection of routines used to create PNG format graphics files | http://www.libpng.org/pub/png/libpng.html
- zypper - libpng12-0 - 1.2.59-5.2: normalized package name match | openSUSE Tumbleweed package metadata: libpng12-0 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Library for the Portable Network Graphics Format (PNG) | http://www.libpng.org/pub/png/libpng.html
- zypper - libpng16-16 - 1.6.57-1.2: normalized package name match | openSUSE Tumbleweed package metadata: libpng16-16 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Library for the Portable Network Graphics Format (PNG) | http://www.libpng.org/pub/png/libpng.html
- MacPorts - libpng: normalized package name match | MacPorts ports tree: graphics/libpng/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Media and graphics packages](https://www.automicvault.com/pkg/media-graphics-tools/) - Matched media, image, audio, video, or graphics metadata.
- [adios2](https://www.automicvault.com/pkg/brew/adios2/) - Popular package that depends on this formula.
- [analog](https://www.automicvault.com/pkg/brew/analog/) - Popular package that depends on this formula.
- [apng2gif](https://www.automicvault.com/pkg/brew/apng2gif/) - Popular package that depends on this formula.
- [apngasm](https://www.automicvault.com/pkg/brew/apngasm/) - Popular package that depends on this formula.
- [argyll-cms](https://www.automicvault.com/pkg/brew/argyll-cms/) - Popular package that depends on this formula.
- [astrometry-net](https://www.automicvault.com/pkg/brew/astrometry-net/) - Popular package that depends on this formula.
- [flif](https://www.automicvault.com/pkg/brew/flif/) - Shares av.db curated category or tags: cli, image-format, media.
- [openexr](https://www.automicvault.com/pkg/brew/openexr/) - Shares av.db curated category or tags: cli, image-format, media.
- [camellia](https://www.automicvault.com/pkg/brew/camellia/) - Shares av.db curated category or tags: c-library, cli, image-processing, media.
- [gd](https://www.automicvault.com/pkg/brew/gd/) - Shares av.db curated category or tags: cli, image-processing, media, png.
- [leptonica](https://www.automicvault.com/pkg/brew/leptonica/) - Shares av.db curated category or tags: c-library, cli, image-processing, media.
- [sng](https://www.automicvault.com/pkg/brew/sng/) - Shares av.db curated category or tags: cli, image-processing, media, png.
- [ansilove](https://www.automicvault.com/pkg/brew/ansilove/) - Shares av.db curated category or tags: cli, media, png.
- [babl](https://www.automicvault.com/pkg/brew/babl/) - Shares av.db curated category or tags: cli, image-processing, media.
- [tiff2png](https://www.automicvault.com/pkg/brew/tiff2png/) - Both packages work with overlapping file formats or content types. Shared terms: cli, image, image-processing, libpng, media.

## Combined YAML source

View the package source record on GitHub. [combined/libpng.yml](https://github.com/automic-vault/db/blob/main/combined/libpng.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
