PHPackages                             nikashitsa/png-coder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. nikashitsa/png-coder

ActiveLibrary[Image &amp; Media](/categories/media)

nikashitsa/png-coder
====================

Encodes file to PNG image and decodes from it.

v1.0.0(10y ago)361GPL-2.0+PHPPHP &gt;=5.4.0

Since Dec 7Pushed 9y ago1 watchersCompare

[ Source](https://github.com/nikashitsa/pngCoder)[ Packagist](https://packagist.org/packages/nikashitsa/png-coder)[ RSS](/packages/nikashitsa-png-coder/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

PngCoder (encoder/decoder)
==========================

[](#pngcoder-encoderdecoder)

[![Build Status](https://camo.githubusercontent.com/a1feffa70cfcab1dfd8e40d43790414e9fec333de068970ceaed031913d73feb/68747470733a2f2f7472617669732d63692e6f72672f6e696b617368697473612f706e67436f6465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/nikashitsa/pngCoder)

PngCoder is a single PHP class which can encode any file to PNG image and then decode it to original file.

```
$coder = new PngCoder();
// encode music file to image
$coder->encode('./data/music.mp3', './tmp/music.png');
// decode it
$coder->decode('./tmp/music.png', './tmp/music.mp3');
```

Sometimes encoded files looks mysterious, but in common case it's just a noise:

[![Noise Image](https://github.com/nikashitsa/pngCoder/raw/master/data/crime_encoded.png?raw=true)](https://github.com/nikashitsa/pngCoder/blob/master/data/crime_encoded.png?raw=true)

I don't know where this can be used 😟. Feel free to add your suggestions [here](https://github.com/nikashitsa/pngCoder/issues) 😉

Requirements
------------

[](#requirements)

- PHP 5.4 and later (supports PHP 7)
- php-gd

Installing PngCoder
-------------------

[](#installing-pngcoder)

The recommended way to install PngCoder is through [Composer](http://getcomposer.org).

```
# Install Composer
curl -sS https://getcomposer.org/installer | php
```

Next, run the Composer command to install the PngCoder:

```
composer.phar require nikashitsa/png-coder
```

After installing, you need to require Composer's autoloader:

```
require 'vendor/autoload.php';
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3857d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1029908?v=4)[Nikita Verkhovin](/maintainers/nikashitsa)[@nikashitsa](https://github.com/nikashitsa)

---

Top Contributors

[![nikashitsa](https://avatars.githubusercontent.com/u/1029908?v=4)](https://github.com/nikashitsa "nikashitsa (5 commits)")

---

Tags

pngencoderdecoder

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nikashitsa-png-coder/health.svg)

```
[![Health](https://phpackages.com/badges/nikashitsa-png-coder/health.svg)](https://phpackages.com/packages/nikashitsa-png-coder)
```

###  Alternatives

[picqer/php-barcode-generator

An easy to use, non-bloated, barcode generator in PHP. Creates SVG, PNG, JPG and HTML images from the most used 1D barcode standards.

1.8k27.4M110](/packages/picqer-php-barcode-generator)[rosell-dk/webp-convert

Convert JPEG &amp; PNG to WebP with PHP

6058.7M59](/packages/rosell-dk-webp-convert)[yzalis/identicon

Generate unique identicon avatars from any string

6091.1M23](/packages/yzalis-identicon)[jkphl/iconizr

A PHP command line tool for converting SVG images to a set of CSS icons (SVG &amp; PNG, single icons and / or CSS sprites) with support for image optimization and Sass output

4869.0k](/packages/jkphl-iconizr)[melihovv/base64-image-decoder

A base64 image decoder

46141.1k](/packages/melihovv-base64-image-decoder)[gregwar/tex2png

LaTeX formula to PNG

7444.2k](/packages/gregwar-tex2png)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
