xref: /PHP-8.4/ext/gd/tests/bug73157.phpt (revision 0aaad46c)
1--TEST--
2Bug #73157 (imagegd2() ignores 3rd param if 4 are given)
3--EXTENSIONS--
4gd
5--SKIPIF--
6<?php
7    if (!GD_BUNDLED && version_compare(GD_VERSION, '2.3.3', '>=')) {
8        die("skip test requires GD 2.3.2 or older");
9    }
10?>
11--FILE--
12<?php
13$im = imagecreate(8, 8);
14imagecolorallocate($im, 0, 0, 0);
15
16ob_start();
17imagegd2($im, null, 256, IMG_GD2_RAW);
18$buffer = ob_get_clean();
19
20$header = unpack('@10/nchunk_size', $buffer);
21printf("chunk size: %d\n", $header['chunk_size']);
22?>
23--EXPECT--
24chunk size: 256
25