php-src/ext/gd/tests/imagecreatefrombmp_basic.phpt
Christoph M. Becker 500b496f8e Implement #69606: Support BMPs (added in GD 2.1.0)
We add PHP bindings for libgd's features to read and write BMP files, which
are available as of libgd 2.1.0.

As PHP's bundled libgd doesn't yet include the respective features of the
external libgd, we add these.
2017-01-04 14:55:02 +01:00

19 lines
481 B
PHP

--TEST--
imagecreatefrombmp() - basic functionality
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip ext/gd required');
if (!(imagetypes() & IMG_BMP)) die('skip BMP support required');
?>
--FILE--
<?php
// create an image from a BMP file
$im = imagecreatefrombmp(__DIR__ . '/imagecreatefrombmp_basic.bmp');
include_once __DIR__ . '/func.inc';
test_image_equals_file(__DIR__ . '/imagecreatefrombmp_basic.png', $im);
?>
===DONE===
--EXPECT--
The images are equal.
===DONE===