dev-master
9999999-devPixel graphics library for PHP.
MIT
The Requires
- ext-imagick *
- php >=5.3.0
piximgen thekonz
Pixel graphics library for PHP.
Pixel graphics library for PHP., (*1)
Add this to your composer.json:, (*2)
{ "require": { "thekonz/piximgen": "1.0.*@dev" } }
Then run composer install
or composer update
., (*3)
Wanna try it out? Take a look at the example app., (*4)
require_once 'vendor/autoload.php';
$image = new \thekonz\PixImGen();
$image->setSettings([ 'seed' => 'GitHub rocks!' ]);
header('content-type: image/png');
echo $image->getImage();
, (*5)
If you play around with the settings (especially the saturation settings), you can get some pretty cool images., (*6)
Setting | Explanation | Default value |
---|---|---|
seed | Starting value for the random generator. Just like in Minecraft. | System time (time() ) |
blocksize | The width of each block (pixel). | 15 |
width | The amount of blocks on the X-axis of the image. | 10 |
height | The amount of blocks on the Y-axis of the image. | 10 |
minredsaturation | The minimum saturation of the color red. | 0 |
maxredsaturation | The maximum saturation of the color red. | 255 |
mingreensaturation | The minimum saturation of the color green. | 0 |
maxgreensaturation | The maximum saturation of the color green. | 255 |
minbluesaturation | The minimum saturation of the color blue. | 0 |
maxbluesaturation | The maximum saturation of the color blue. | 255 |
Since the method getImage() returns an Imagick object, you can use all of the Imagick methods., (*7)
Pixel graphics library for PHP.
MIT
piximgen thekonz