xref: /PHP-7.4/ext/gd/tests/imagebmp_basic.phpt (revision 500b496f)
1--TEST--
2imagebmp() - basic functionality
3--SKIPIF--
4<?php
5if (!extension_loaded('gd')) die('skip ext/gd required');
6if (!(imagetypes() & IMG_BMP)) die('skip BMP support required');
7?>
8--FILE--
9<?php
10// create an image
11$im = imagecreate(100, 100);
12imagecolorallocate($im, 0, 0, 0);
13$white = imagecolorallocate($im, 255, 255, 255);
14imageline($im, 10,10, 89,89, $white);
15
16// write the md5 hash of its BMP representation
17ob_start();
18imagebmp($im);
19echo md5(ob_get_clean());
20?>
21--EXPECT--
22d49124076771822b09fa72e168c0de56
23