1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 09:12:14 +01:00
Files
archived-php-src/ext/gd/tests/bug73155.phpt
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00

27 lines
663 B
PHP

--TEST--
Bug #73155 (imagegd2() writes wrong chunk sizes on boundaries)
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
?>
--FILE--
<?php
$im = imagecreate(64, 64);
imagecolorallocate($im, 0, 0, 0);
ob_start();
imagegd2($im, null, 64, IMG_GD2_RAW);
$buffer = ob_get_clean();
$header = unpack('@10/nchunk_size/nformat/nx_count/ny_count', $buffer);
printf("chunk size: %d\n", $header['chunk_size']);
printf("x chunk count: %d\n", $header['x_count']);
printf("y chunk count: %d\n", $header['y_count']);
printf("file size: %d\n", strlen($buffer));
?>
--EXPECT--
chunk size: 64
x chunk count: 1
y chunk count: 1
file size: 5145