Adds BMP image support for PHP's GD functionality.
Via Composer
$ composer require urbanplum/bmp
require sprintf('%s/../vendor/autoload.php', __DIR__);
$bmp = new Urbanplum\Bmp\Bmp();
// creating a GD resource from a file
$resource = $bmp->createFromFile('/path/to/file.bmp');
// creating a GD resource from a string (e.g. from DB, S3, etc.)
$resource = $bmp->createFromString($bitmapString);
// output image to a browser
header('Content-Type: image/jpeg');
imagejpeg($resource);
// clean up
imagedestroy($resource);
- mgutt
- Fabien Menager
- John Smith
- All Contributors
The MIT License (MIT). Please see License File for more information.