1--TEST--
2Testing imagegammacorrect() of GD library with non TrueColor image
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 = imagecreate(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--
327716c0905ae08bd84b4d6cba8969a42e
33