BMP libraries for PHP
- GD (
ext-gd) has read and write BMP support since PHP 7.2:imagecreatefrombmpandimagebmp. It’s bundled with PHP and available on almost every host. - Imagick binds ImageMagick: it reads every common BMP variant and can write BMP3 files for old software or 16-bit subtypes.
- Intervention Image is a Composer package with a fluent API that uses GD or Imagick underneath.
getimagesize() reads the width and height of a BMP without any extension.
- GD GD (ext-gd) is the image extension bundled with PHP. How to read and write BMP files with imagecreatefrombmp and imagebmp, write RLE-compressed BMP.
- Imagick Imagick is the PHP extension for ImageMagick. How to read and write BMP files, write BMP3 for old software and 16-bit RGB565 BMP.
- Intervention Image Intervention Image is a PHP image library with a fluent API over GD or Imagick. How to read and write BMP files, resize them and convert BMP to PNG or JPEG.