1--TEST-- 2Bug #73159 (imagegd2(): unrecognized formats may result in corrupted files) 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 = imagecreatetruecolor(10, 10); 14 15ob_start(); 16imagegd2($im, null, 128, 0); 17$buffer = ob_get_clean(); 18 19$header = unpack('@12/nformat', $buffer); 20printf("format: %d\n", $header['format']); 21?> 22--EXPECT-- 23format: 4 24