1--TEST-- 2Testing imagegammacorrect() of GD library 3--CREDITS-- 4Rafael Dohms <rdohms [at] gmail [dot] com> 5#testfest PHPSP on 2009-06-20 6--SKIPIF-- 7<?php 8 if (!extension_loaded("gd")) die("skip GD not present"); 9?> 10--FILE-- 11<?php 12$image = imagecreatetruecolor(150, 150); 13 14$grey = imagecolorallocate($image,6,6,6); 15$gray = imagecolorallocate($image,15,15,15); 16 17$half = imagefilledarc ( $image, 75, 75, 70, 70, 0, 180, $grey, IMG_ARC_PIE ); 18$half2 = imagefilledarc ( $image, 75, 75, 70, 70, 0, -180, $gray, IMG_ARC_PIE ); 19 20$gamma = imagegammacorrect($image, 1, 5); 21 22if ($gamma){ 23 ob_start(); 24 imagepng($image, null, 9); 25 $img = ob_get_contents(); 26 ob_end_clean(); 27} 28 29echo md5(base64_encode($img)); 30?> 31--EXPECT-- 3230639772903913594bc665743e1b9ab8 33