mirror of
https://github.com/php/php-src.git
synced 2025-08-17 14:38:49 +02:00

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.
19 lines
481 B
PHP
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===
|