bmp2image converts BMP to images (JPG, JPEG, PNG, GIF and etc) format.
If you're using Composer to manage dependencies, you can add Requests with it.
composer require itgalaxy/bmp2image
or
{
"require": {
"itgalaxy/bmp2image": ">=1.0.0"
}
}
To install the source code:
git clone git://github.com/itgalaxy/bmp2image.git
And include it in your scripts:
require_once '/path/to/bmp2image/Bmp2Image.php';
Alternatively, you can fetch a tarball or zipball:
curl -L https://github.com/itgalaxy/bmp2image/tarball/master | tar xzv
or
wget https://github.com/itgalaxy/bmp2image/tarball/master -O - | tar xzv
<?php
// This file is generated by Composer
require_once 'vendor/autoload.php';
$jpg = \Itgalaxy\Bmp2Image::make('path/to/image.bmp');
imagejpeg($jpg, 'path/to/save/image.jpg');
imagedestroy($jpg);
Don't hesitate to create a pull request. Every contribution is appreciated.