1--TEST--
2Testing imagegammacorrect() of GD library
3--CREDITS--
4Rafael Dohms <rdohms [at] gmail [dot] com>
5#testfest PHPSP on 2009-06-20
6--EXTENSIONS--
7gd
8--SKIPIF--
9<?php
10    if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
11        die("skip test requires GD 2.2.2 or higher");
12    }
13?>
14--FILE--
15<?php
16$image = imagecreatetruecolor(150, 150);
17
18$grey = imagecolorallocate($image,6,6,6);
19$gray = imagecolorallocate($image,15,15,15);
20
21$half =  imagefilledarc ( $image, 75, 75, 70, 70, 0, 180, $grey, IMG_ARC_PIE );
22$half2 =  imagefilledarc ( $image, 75, 75, 70, 70, 0, -180, $gray, IMG_ARC_PIE );
23
24$gamma = imagegammacorrect($image, 1, 5);
25var_dump((bool) $gamma);
26
27include_once __DIR__ . '/func.inc';
28test_image_equals_file(__DIR__ . '/imagegammacorrect_basic.png', $image);
29?>
30--EXPECT--
31bool(true)
32The images are equal.
33