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