Skip to content

urbanplum/php-bmp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bmp

Latest Version on Packagist Software License Total Downloads

Adds BMP image support for PHP's GD functionality.

Install

Via Composer

$ composer require urbanplum/bmp

Usage

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

Credits

License

The MIT License (MIT). Please see License File for more information.

About

BMP support for PHP

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages