1--TEST-- 2Bug #73159 (imagegd2(): unrecognized formats may result in corrupted files) 3--SKIPIF-- 4<?php 5if (!extension_loaded('gd')) die('skip gd extension not available'); 6?> 7--FILE-- 8<?php 9$im = imagecreatetruecolor(10, 10); 10 11ob_start(); 12imagegd2($im, null, 128, 0); 13$buffer = ob_get_clean(); 14 15$header = unpack('@12/nformat', $buffer); 16printf("format: %d\n", $header['format']); 17?> 18--EXPECT-- 19format: 4 20