urbanplum / bmp
BMP image support for PHP's GD
Installs: 42 889
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: >=5.5.0
This package is auto-updated.
Last update: 2024-12-12 04:16:08 UTC
README
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
- mgutt
- Fabien Menager
- John Smith
- All Contributors
License
The MIT License (MIT). Please see License File for more information.