summaryrefslogtreecommitdiff
path: root/ext/gd/tests/bug53640.phpt
blob: 7e8217c27fc69223423b2ef73b8a0953c86f1bbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--TEST--
Bug #53640 (XBM images require width to be multiple of 8)
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.3', '<')) {
    die("skip test requires GD 2.2.3 or higher");
}
?>
--FILE--
<?php
$im = imagecreate(9, 9);
imagecolorallocate($im, 0, 0, 0); // background
$white = imagecolorallocate($im, 255, 255, 255);
imagefilledrectangle($im, 2, 2, 6, 6, $white);
imagexbm($im, NULL);
?>
--EXPECT--
#define image_width 9
#define image_height 9
static unsigned char image_bits[] = {
  0xFF, 0x01, 0xFF, 0x01, 0x83, 0x01, 0x83, 0x01, 0x83, 0x01, 0x83, 0x01, 
  0x83, 0x01, 0xFF, 0x01, 0xFF, 0x01};