1--TEST-- 2libgd bug 276 (Sometimes pixels are missing when storing images as BMPs) 3--EXTENSIONS-- 4gd 5--FILE-- 6<?php 7require __DIR__ . "/func.inc"; 8 9$orig = imagecreate(10, 10); 10imagecolorallocate($orig, 0, 0, 0); 11$white = imagecolorallocate($orig, 255, 255, 255); 12imageline($orig, 0, 0, 99, 99, $white); 13 14$filename = __DIR__ . "/gd276.bmp"; 15imagebmp($orig, $filename, true); 16$saved = imagecreatefrombmp($filename); 17var_dump($saved !== false); 18test_image_equals_image($orig, $saved); 19?> 20--EXPECT-- 21bool(true) 22The images are equal. 23--CLEAN-- 24<?php 25@unlink(__DIR__ . "/gd276.bmp"); 26?> 27