iaretedd / pixelizer
Pixelizer is a PHP library that allows you to convert any data into a PNG picture and decode it back into the original data.
v1.0
2020-09-17 05:11 UTC
Requires
- ext-exif: *
- ext-gd: *
- phpunit/phpunit: 9.3.7
This package is auto-updated.
Last update: 2025-04-17 15:24:36 UTC
README
Pixelizer is a PHP library that allows you to convert any data into a PNG picture and decode it back into the original data.
Installation
Use the package manager composer to install Pixelizer.
composer require iaretedd/pixelizer composer install
Getting Started
Encode a file into a picture
require 'vendor/autoload.php'; $pixelizer = new Pixelizer\Pixelizer(); $pixelizer->setData(file_get_contents('file_to_encode.exe')); $pixelizer->encode('encoded.png');
Decode a file from a picture
require 'vendor/autoload.php'; $pixelizer = new Pixelizer\Pixelizer(); $pixelizer->loadImage('encoded.png'); $pixelizer->decode('original_file.exe');
Tests
To run unit tests:
./vendor/bin/phpunit
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.