--- id: pyoxipng version: "9.1.1" license: unclear license_treatment: permissive maintenance: aging --- # pyoxipng — Python wrapper for multithreaded .png image file optimizer oxipng License: permissive · Maintenance: aging · Downloads: 84.8K/mo ## What it is and what it does pyoxipng is a Python wrapper around a multithreaded PNG optimizer written in Rust. It provides three main ways to optimize PNG images: compress files on disk, process PNG data already in memory, or create optimized PNGs from raw image data. The package supports multiple color types (grayscale, RGB, indexed, RGBA) and bit depths, plus advanced options like compression level, interlacing, alpha optimization, and bit depth reduction. The wrapper has no Python runtime dependencies, relying entirely on precompiled Rust binaries. It's designed for developers who need to reduce PNG file sizes programmatically—either in batch processing pipelines, image serving infrastructure, or tools that generate PNGs. The underlying engine handles the heavy lifting with multithreading, so the Python layer is thin and fast. Use it for: - Batch-optimize PNG images in a web asset pipeline before deployment to reduce bandwidth and load times. - Compress PNG screenshots or generated graphics in automated testing or documentation workflows. - Reduce file sizes of PNGs created from raw pixel data before storage or transmission. - Optimize PNG images in a content management system or image processing service. - Create optimized PNG output from indexed color or grayscale data with custom color profiles or transparency. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. pyoxipng reduces PNG file sizes through compression, offering file-based and in-memory optimization plus the ability to create PNGs from raw image data. Yes, if you need to optimize PNG files in Python and want a fast, dependency-free solution. The prebuilt wheels make installation straightforward on common platforms. The aging maintenance status (358 days since last release) is a minor concern but not a blocker—the package is stable and has no known vulnerabilities. Install if PNG optimization is a core need; skip if you only occasionally compress images. ## Install pip install pyoxipng uv add pyoxipng poetry add pyoxipng ## Installing pyoxipng Before you install: Medium install friction due to compiled wheels; prebuilt binaries are available for Python 3.10 and 3.11 across macOS, Linux, Windows, and musl environments. Repository shows aging maintenance (358 days since last release) but remains active with no archived status. License in practice: Licensed under MIT (permissive), allowing use in commercial and proprietary projects with minimal restrictions. Quickstart: pip install pyoxipng import pyoxipng # Optimize a PNG file on disk pyoxipng.optimize("/path/to/image.png") # Or optimize and save to a new location pyoxipng.optimize("/path/to/image.png", "/path/to/optimized.png") Requires Python >=3.8; prebuilt wheels available for Python 3.10 and 3.11 on common platforms. Verify before relying: - Actual file size reduction achieved on typical PNG images (varies by image type and optimization level) - Performance characteristics compared to other PNG optimizers or the native CLI tool - Whether the package is actively maintained beyond the 358-day release cycle - Support for Python versions other than 3.10 and 3.11 (fact sheet shows wheels only for these versions) ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: medium - Maintenance: aging - Downloads: 84.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags png file compression, image optimization python, png size reduction, lossless image compression, png optimizer wrapper, rust image optimization, batch png optimization, image-optimization, png-compression, rust-binding [View on SkillFed](https://skillfed.io/packages/pyoxipng) · [View on PyPI](https://pypi.org/project/pyoxipng/)