diff --git a/README.md b/README.md new file mode 100644 index 0000000..de8cc28 --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +# php-pixel + +> Yo Dawg, I herd you like pixels, so I put a pixel in your pixel so you can +> pixel while you pixel. + +Why does this exist? Because I got sick of looking up how to generate a single +transparent pixel in PHP. + +## Installation + +``` +composer require "joshtronic/php-pixel:dev-master" +``` + +## Usage + +### GIF + +``` +joshtronic\Pixel::gif(); +``` + +### PNG + +``` +joshtronic\Pixel::png(); +``` + diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..05ba9f2 --- /dev/null +++ b/composer.json @@ -0,0 +1,23 @@ +{ + "name": "joshtronic/php-pixel", + "description": "Generate a 1x1 transparent pixel", + "version": "1.0.0", + "type": "utility", + "keywords": ["image", "pixel", "transparent", "gif", "png", "beacon", "tracking"], + "homepage": "https://github.com/joshtronic/php-pixel", + "license": "MIT", + "authors": [{ + "name": "Josh Sherman", + "email": "hello@joshtronic.com", + "homepage": "http://joshtronic.com" + }], + "require-dev": { + "php": ">=4.0.0" + }, + "require-dev": { + "satooshi/php-coveralls": "dev-master" + }, + "autoload": { + "psr-4": {"joshtronic\\": "src/"} + } +} diff --git a/src/Pixel.php b/src/Pixel.php new file mode 100644 index 0000000..77bb520 --- /dev/null +++ b/src/Pixel.php @@ -0,0 +1,18 @@ +