1--TEST--
2Test Imagick, Imagick::exportImagePixels
3--SKIPIF--
4<?php
5$imageMagickRequiredVersion=0x700;
6require_once(dirname(__FILE__) . '/skipif.inc');
7?>
8--FILE--
9<?php
10
11$imagick = new \Imagick();
12$imagick->newPseudoImage(256, 256, "gradient:black-white");
13
14$initialMask = $imagick->setImageChannelMask(\Imagick::CHANNEL_RED);
15$imagick->brightnessContrastImage(-20, 20);
16$imagick->setImageFormat("png");
17$imagick->writeImage("./maskTest.png");
18
19$redMask = $imagick->setImageChannelMask(\Imagick::CHANNEL_DEFAULT);
20
21if ($initialMask != \Imagick::CHANNEL_DEFAULT) {
22	echo "initialMask is not equal to \Imagick::CHANNEL_DEFAULT but instead is $initialMask\n";
23}
24
25if ($redMask != \Imagick::CHANNEL_RED) {
26	echo "redMask is not equal to \Imagick::CHANNEL_RED but instead is $redMask\n";
27}
28
29echo "Ok";
30?>
31--EXPECTF--
32Ok