2017 © Pedro Peláez
 

library png-coder

Encodes file to PNG image and decodes from it.

image

nikashitsa/png-coder

Encodes file to PNG image and decodes from it.

  • Wednesday, May 3, 2017
  • by nikashitsa
  • Repository
  • 1 Watchers
  • 2 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

PngCoder (encoder/decoder)

Build Status, (*1)

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

$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:, (*3)

Noise Image, (*4)

I don't know where this can be used :worried:. Feel free to add your suggestions here :wink:, (*5)

Requirements

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

Installing PngCoder

The recommended way to install PngCoder is through Composer., (*6)

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

Next, run the Composer command to install the PngCoder:, (*7)

composer.phar require nikashitsa/png-coder

After installing, you need to require Composer's autoloader:, (*8)

require 'vendor/autoload.php';

The Versions

03/05 2017

dev-master

9999999-dev

Encodes file to PNG image and decodes from it.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.4.0
  • ext-gd *

 

The Development Requires

encoder decoder png

07/12 2015

v1.0.0

1.0.0.0

Encodes file to PNG image and decodes from it.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.4.0
  • ext-gd *

 

The Development Requires

encoder decoder png