PHP code example of nikashitsa / png-coder

1. Go to this page and download the library: Download nikashitsa/png-coder library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nikashitsa / png-coder example snippets


$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');


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