Current File : /home/mmdealscpanel/yummmdeals.com/alt-php84-pecl-imagick_3.8.0-7.el8.zip
PKq9�Z!���!�!util/functions.phpnu�[���<?php

// Mirrored from https://github.com/Danack/HexFloat

require_once __DIR__ . "/FloatInfo.php";
require_once __DIR__ . "/Float32Info.php";

use HexFloat\FloatInfo;
use HexFloat\Float32Info;

/**
 * Returns a string containing a hexadecimal representation of the given float,
 * using 64 bits of info
 *
 * @param float $number
 * @return string
 */
function floathex(float $number)
{
    return strrev(unpack('h*', pack('d', $number))[1]);
}

/**
 * Returns a string containing a hexadecimal representation of the given float,
 * using 32 bits of info
 *
 * @param float $number
 * @return string
 */
function floathex32(float $num)
{
    return strrev(unpack('h*', pack('f', $num))[1]);
}

/**
 * Convert a floating point number to a FloatInfo object,
 * which contains string representations of the float's sign,
 * exponent and mantissa
 * @param float $num
 * @return FloatInfo
 */
function float_info(float $num)
{
    $float64 = floathex($num);

    //Sign bit: 1 bit
    //Exponent: 11 bits
    //Significand precision: 53 bits (52 explicitly stored)

    $chars = str_split($float64);


    // 3 bits from this
    $byte1 = hexdec($chars[0]);
    // 4 bits from this
    $byte2 = hexdec($chars[1]);

    // 1 bit from this
    $byte3 = hexdec($chars[2]);

    $sign = '0';

    if ($byte1 >= 8) {
        $sign = '1';
    }

    $exponentString = substr($float64, 0, 3);
    $exponentValue = hexdec($exponentString) & 0x7ff;
    $exponent = sprintf("%b", $exponentValue);
    $exponent = str_pad($exponent, 11, '0', STR_PAD_LEFT);

    $mantissa = substr($float64, 2);
    $mantissa = hexdec($mantissa) & 0xfffffffffffff;
    $mantissa = sprintf("%b", $mantissa);
    $mantissa = str_pad($mantissa, 52, '0', STR_PAD_LEFT);

    return new FloatInfo(
        $sign,
        $exponent,
        $mantissa
    );
}

/**
 * Convert a floating point number to a Float32Info object,
 * which contains string representations of the float's sign,
 * exponent and mantissa
 *
 * @param float $num
 * @return Float32Info
 */
function float_info_32(float $num)
{
    $float32 = floathex32($num);
    $chars = str_split($float32);

    // 3 bits from this
    $byte1 = hexdec($chars[0]);
    // 4 bits from this
    $byte2 = hexdec($chars[1]);

    // 1 bit from this
    $byte3 = hexdec($chars[2]);

    $sign = '0';

    if ($byte1 >= 8) {
        $sign = '1';
    }
    $exponent3Bits = ($byte1 & 0x7);
    $exponent4Bits = $byte2;
    $exponent1Bit = ($byte3 & 0x8) >> 3;
    $exponent = ($exponent3Bits << 5) | ($exponent4Bits << 1) | $exponent1Bit;

    $exponent = sprintf("%b", $exponent);
    $exponent = str_pad($exponent, 8, '0', STR_PAD_LEFT);

    $mantissa = substr($float32, 2, 6);
    $mantissa = hexdec($mantissa) & 0x7fffff;
    $mantissa = sprintf("%b", $mantissa);
    $mantissa = str_pad($mantissa, 23, '0', STR_PAD_LEFT);

    return new Float32Info(
        $sign,
        $exponent,
        $mantissa
    );
}

/**
 * Produce a debug string that shows the Sign, Exponent and Mantissa for
 * two floating point numbers, using 64bit precision
 *
 *
 * @param float $value1
 * @param float $value2
 * @return string
 *
 * Example result
 * ┌──────┬─────────────┬──────────────────────────────────────────────────────┐
 * │ Sign │ Exponent    │ Mantissa                                             │
 * │    0 │ 01111111011 │ 1001100110011001100110011001100110011001100110011010 │
 * │    0 │ 10000011001 │ 0111110101111000010000000100000000000000000000000000 │
 * └──────┴─────────────┴──────────────────────────────────────────────────────┘
 *
 */
function float_compare(float $value1, float $value2)
{
    $float_info_1 = float_info($value1);
    $float_info_2 = float_info($value2);

    //Sign bit: 1 bit
    //Exponent: 11 bits
    //Significand precision: 53 bits (52 explicitly stored)

    $output  = "┌──────┬─────────────┬──────────────────────────────────────────────────────┐\n";
    $output .= "│ Sign │ Exponent    │ Mantissa                                             │\n";

    $format_string = "│    %s │ %s │ %s │\n";

    $output .= sprintf($format_string, $float_info_1->getSign(), $float_info_1->getExponent(), $float_info_1->getMantissa());
    $output .= sprintf($format_string, $float_info_2->getSign(), $float_info_2->getExponent(), $float_info_2->getMantissa());

    $output .= "└──────┴─────────────┴──────────────────────────────────────────────────────┘\n";

    return $output;
}


/**
 * Produce a debug string that shows the Sign, Exponent and Mantissa for
 * two floating point numbers, using 32bit precision
 *
 * @param float $value1
 * @param float $value2
 * @return string
 *
 * Example result
 * ┌──────┬──────────┬─────────────────────────┐
 * │ Sign │ Exponent │ Mantissa                │
 * │    0 │ 01111011 │ 10011001100110011001101 │
 * │    0 │ 10011001 │ 01111101011110000100000 │
 * └──────┴──────────┴─────────────────────────┘
 *
 */
function float_compare_32(float $value1, float $value2)
{
    $float_info_1 = float_info_32($value1);
    $float_info_2 = float_info_32($value2);

    $output  = "┌──────┬──────────┬─────────────────────────┐\n";
    $output .= "│ Sign │ Exponent │ Mantissa                │\n";

    $format_string = "│    %s │ %s │ %s │\n";

    $output .= sprintf($format_string, $float_info_1->getSign(), $float_info_1->getExponent(), $float_info_1->getMantissa());
    $output .= sprintf($format_string, $float_info_2->getSign(), $float_info_2->getExponent(), $float_info_2->getMantissa());

    $output .= "└──────┴──────────┴─────────────────────────┘\n";

    return $output;
}

/**
 * So. One of the disadvantages of non-HDRI compiled Image Magick
 * is that it can't accurately represent a '50%' color accurately.
 *
 * For example, if ImageMagick is compiled with 16bit color depth
 * then the two closest colors to midpoint are:
 *   32767 / 65535 = 0.5 - (1 / (2 ^ 17)) = 0.499992370...
 *  or
 *   32768 / 65535 = 0.5 + (1 / (2 ^ 17)) = 0.50000762951
 *
 * Either way there is going to be 'error' of
 * 0.00000762939453125
 *
 * The problem is even worse when ImageMagick is compiled with 8-bit
 * numbers (though this really shouldn't be used any more) and the
 * error would be 0.001953125
 *
 */
function get_epsilon_for_off_by_half_errors()
{
    // These could be defined better...
    $epsilon_values_for_non_hdri = [
        '255' => (1 / (pow(2, 8) - 1)) + 0.0000000000001,
        '65535' => (1 / (pow(2, 16) - 1)) + 0.0000000000001,
        '16777215' => (1 / (pow(2, 24) - 1) ) + 0.0000000000001,
        '4294967295' => (1 / (pow(2, 32) - 1)) + 0.0000000000001,
    ];

    // These could definitely be defined better...
    $epsilon_values_for_hdri = [
        '255' => 0.0000000000001,
        '65535' => 0.0000000000001,
        '16777215' => 0.0000000000001,
        '4294967295' => 0.0000000000001
    ];

    if (Imagick::getHdriEnabled() === false) {
        $quantum = (string)Imagick::getQuantum();
        if (array_key_exists($quantum, $epsilon_values_for_non_hdri) !== true) {
            throw new Exception(
                "Quantum values is $quantum which is not any of (2^(8|16|24|32)) - 1. Please report this as a bug."
            );
        }
        return $epsilon_values_for_non_hdri[$quantum];
    }

    $quantum = Imagick::getQuantum();
    if (array_key_exists($quantum, $epsilon_values_for_hdri) !== true) {
        throw new Exception(
            "Quantum values is $quantum which is not any of (2^(8|16|24|32)) - 1. Please report this as a bug."
        );
    }

    return $epsilon_values_for_hdri[$quantum];
}PKq9�Z&f8��util/fixup_arginfo.phpnu�[���<?php

declare(strict_types = 1);


if ($argc !== 2) {
    fwrite(STDERR, "usage php fixup_arginfo.php \$arginfo_filename\n");
    exit(-1);
}

$filename = $argv[1];

$fixup_note = "file has been fixedup for different versions";

echo "Fixing $filename\n";

$input_lines = file($filename);

foreach ($input_lines as $input_line) {
    if (strpos($input_line, $fixup_note) !== false) {
        echo "File has already been fixedup.\n";
        exit(0);
    }
}

$output_lines = [];

$search = [];
$replace = [];

$search[] = "#.*Stub hash: (.*) .*/#iu";
$replace[] = "* Stub hash: regen with 'sh regen_arginfo.sh' \n* $fixup_note */";

$search[] = "#ZEND_ARG_OBJ_INFO\(0, (\w*), IMAGICK_QUANTUM_TYPE, 0\)#iu";
$replace[] = "
#if MAGICKCORE_HDRI_ENABLE 
	ZEND_ARG_TYPE_INFO(0, $1, IS_DOUBLE, 0)
#else
	ZEND_ARG_TYPE_INFO(0, $1, IS_LONG, 0)
#endif
";


// ZEND_ARG_TYPE_INFO(pass_by_ref, name, type_hint, allow_null)
// ZEND_ARG_INFO(pass_by_ref, name)

$search[] = "#ZEND_ARG_TYPE_INFO\((\w*), (\w*), (\w*), (\w*)\)#iu";
$replace[] = "
#if PHP_VERSION_ID >= 80000
    ZEND_ARG_TYPE_INFO($1, $2, $3, $4)
#else
    ZEND_ARG_INFO($1, $2)
#endif";

$search[] = "#ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX\((\w*), 0, (\w*), IMAGICK_QUANTUM_TYPE, 0\)#iu";
$replace[] = "
#if MAGICKCORE_HDRI_ENABLE 
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX($1, 0, $2, IS_DOUBLE, 0)
#else
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX($1, 0, $2, IS_LONG, 0)
#endif
";


//ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null)
#define ZEND_BEGIN_ARG_INFO_EX(name, _unused, return_reference, required_num_args)
$search[] = "#ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX\((\w*), (\w*), (\w*), (\w*), (\w*)\)#iu";
$replace[] = "
#if PHP_VERSION_ID >= 80000
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX($1, $2, $3, $4, $5)
#else
ZEND_BEGIN_ARG_INFO_EX($1, 0, $2, $3)
#endif
";

//#define ZEND_ARG_TYPE_MASK(pass_by_ref, name, type_mask, default_value) \
$search[] = "#.*ZEND_ARG_TYPE_MASK\(([\w|\|]*), ([\w|\|]*), ([\w|\|]*), ([\w\|\"]*)\)#iu";
$replace[] = "
#if PHP_VERSION_ID >= 80000
    ZEND_ARG_TYPE_MASK($1, $2, $3, $4)
#else
    ZEND_ARG_INFO($1, $2)
#endif
";

//ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(name, return_reference, required_num_args, type)
//ZEND_BEGIN_ARG_INFO_EX(name, _unused, return_reference, required_num_args)

$search[] = "#.*ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX\(([\w|\|]*), ([\w|\|]*), ([\w|\|]*), ([\w|\|]*)\)#iu";
$replace[] = "
#if PHP_VERSION_ID >= 80000
    ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX($1, $2, $3, $4)
#else
    ZEND_BEGIN_ARG_INFO_EX($1, 0, $2, $3)
#endif
";

//ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(name, return_reference, required_num_args, class_name, allow_null)
$search[] = "#ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX\((\w*), (\w*), (\w*), (\w*), (\w*)\)#iu";
$replace[] = "
#if PHP_VERSION_ID >= 80000
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX($1, $2, $3, $4, $5)
#else
ZEND_BEGIN_ARG_INFO_EX($1, 0, $2, $3)
#endif
";

//ZEND_ARG_OBJ_INFO(pass_by_ref, name, classname, allow_null) \
$search[] = "#.*ZEND_ARG_OBJ_INFO\((\w*), (\w*), resource, (\w*)\)#iu";
$replace[] = "
#if PHP_VERSION_ID >= 80000
\tZEND_ARG_OBJ_INFO($1, $2, resource, $3)
#else
\tZEND_ARG_INFO($1, $2)
#endif
";

// ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filename, IS_STRING, 1, "null")
$search[] = "#.*ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE\((\w*), (\w*), (\w*), (\w*), ([\w\"]*)\)#iu";
$replace[] = "
#if PHP_VERSION_ID >= 80000
    ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE($1, $2, $3, $4, $5)
#else
    ZEND_ARG_INFO($1, $2)
#endif
";

// ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, filename, "null")
$search[] = "#.*ZEND_ARG_INFO_WITH_DEFAULT_VALUE\((\w*), (\w*), ([\w\"]*)\)#iu";
$replace[] = "
#if PHP_VERSION_ID >= 80000
    ZEND_ARG_INFO_WITH_DEFAULT_VALUE($1, $2, $3)
#else
    ZEND_ARG_INFO($1, $2)
#endif
";



//#if PHP_VERSION_ID >= 80000
//ZEND_ARG_TYPE_MASK(0, files, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_NULL, NULL)
//#else
//    ZEND_ARG_INFO(0, files)
//#endif



foreach ($input_lines as $input_line) {
    $input_line = rtrim($input_line);
    $input_line = preg_replace($search, $replace, $input_line);

    $output_lines[] = $input_line;
}

file_put_contents($filename, implode("\n", $output_lines));
echo "File has now been fixedup.\n";
PKq9�Z�w���util/Float32Info.phpnu�[���<?php

namespace HexFloat;

// Mirrored from https://github.com/Danack/HexFloat

class Float32Info
{
    //Sign bit: 1 bit
    private $sign;

    //Exponent: 11 bits
    private $exponent;

    //Mantissa precision: 53 bits (52 explicitly stored)
    private $mantissa;

    public function __construct(
        $sign,
        $exponent,
        $mantissa
    ) {
        // TODO - check lengths
        $this->sign = $sign;
        $this->exponent = $exponent;
        $this->mantissa = $mantissa;
    }

    public function getSign()
    {
        return $this->sign;
    }

    public function getExponent()
    {
        return $this->exponent;
    }

    public function getMantissa()
    {
        return $this->mantissa;
    }
}
PKq9�Zq���util/FloatInfo.phpnu�[���<?php

namespace HexFloat;

// Mirrored from https://github.com/Danack/HexFloat

class FloatInfo
{
    //Sign bit: 1 bit
    private  $sign;

    //Exponent: 11 bits
    private  $exponent;

    //Mantissa precision: 53 bits (52 explicitly stored)
    private  $mantissa;

    public function __construct(
        $sign,
        $exponent,
        $mantissa
    ) {
        // TODO - check lengths
        $this->sign = $sign;
        $this->exponent = $exponent;
        $this->mantissa = $mantissa;
    }

    public function getSign()
    {
        return $this->sign;
    }

    public function getExponent()
    {
        return $this->exponent;
    }

    public function getMantissa()
    {
        return $this->mantissa;
    }
}
PKq9�Z*��/tests/306_Imagick_interpolativeResizeImage.phptnu�[���--TEST--
Test Imagick, interpolativeResizeImage
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('interpolativeResizeImage'));
?>
--FILE--
<?php


function interpolativeResizeImage() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');
    $imagick->interpolativeResizeImage(
		320,
		200,
		Imagick::INTERPOLATE_CATROM
	);
//    $imagick->writeImage(__DIR__ . '/claheImage_output_image.png');
    $imagick->getImageBlob();
}

interpolativeResizeImage() ;
echo "Ok";
?>
--EXPECTF--
Ok
PKq9�Zo���cc+tests/159_Imagick_transformImage_basic.phptnu�[���--TEST--
Test Imagick, transformImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('transformimage'));
?>
--FILE--
<?php


function transformimage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $newImage = $imagick->transformImage("400x600", "200x300");
    $bytes = $newImage->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

transformimage() ;
echo "Ok";
?>
--EXPECTF--
Deprecated: %s Imagick::transformImage() is deprecated in %s
Ok
PKq9�ZRo.
��'tests/173_ImagickDraw_bezier_basic.phptnu�[���--TEST--
Test ImagickDraw, bezier
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function bezier($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $strokeColor = new \ImagickPixel($strokeColor);
    $fillColor = new \ImagickPixel($fillColor);

    $draw->setStrokeOpacity(1);
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);

    $draw->setStrokeWidth(2);

    $smoothPointsSet = array(
        array(
            array('x' => 10.0 * 5, 'y' => 10.0 * 5),
            array('x' => 30.0 * 5, 'y' => 90.0 * 5),
            array('x' => 25.0 * 5, 'y' => 10.0 * 5),
            array('x' => 50.0 * 5, 'y' => 50.0 * 5),
        ),
        array(
            array('x' => 50.0 * 5, 'y' => 50.0 * 5),
            array('x' => 75.0 * 5, 'y' => 90.0 * 5),
            array('x' => 70.0 * 5, 'y' => 10.0 * 5),
            array('x' => 90.0 * 5, 'y' => 40.0 * 5),
        ),
    );

    foreach ($smoothPointsSet as $points) {
        $draw->bezier($points);
    }


    $disjointPoints = array(
        array(
            array('x' => 10 * 5, 'y' => 10 * 5),
            array('x' => 30 * 5, 'y' => 90 * 5),
            array('x' => 25 * 5, 'y' => 10 * 5),
            array('x' => 50 * 5, 'y' => 50 * 5),
        ),
        array(
            array('x' => 50 * 5, 'y' => 50 * 5),
            array('x' => 80 * 5, 'y' => 50 * 5),
            array('x' => 70 * 5, 'y' => 10 * 5),
            array('x' => 90 * 5, 'y' => 40 * 5),
        )
    );
    $draw->translate(0, 200);

    foreach ($disjointPoints as $points) {
        $draw->bezier($points);
    }

    //Create an image object which the draw commands can be rendered into
    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");

    //Render the draw commands in the ImagickDraw object 
    //into the image.
    $imagick->drawImage($draw);

    //Send the image to the browser
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

bezier($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z2�k#��tests/004_clone.phptnu�[���--TEST--
Testing clone keyword
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php
print "--- Testing clone keyword\n";

try {
	$im = new Imagick();
	$im->newImage(100, 100, new ImagickPixel("white"));
	$new = clone $im;
	
	if ($new->getImageWidth() == 100 && $new->getImageHeight() == 100) {
		echo "Cloning succeeded\n";
	} else {
		echo "Cloning failed\n";
	}
} catch (Exception $e) {
	echo "Cloning failed\n";
}
?>
--EXPECTF--
--- Testing clone keyword
Cloning succeededPKq9�Zt�D_��%tests/236_Imagick_identify_basic.phptnu�[���--TEST--
Test Imagick, identifyImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$imagick = new \Imagick();
$imagick->newPseudoImage(640, 480, "magick:logo");
$imagick->setImageFormat('png');
$data = $imagick->identifyimage();

echo "format: " . strtolower($data["format"]) . "\n";
echo "units: " . strtolower($data["units"]) . "\n";
echo "type: " . strtolower($data["type"]) . "\n";

if (array_key_exists('geometry', $data)) {
	$geometry = $data['geometry'];
	if (array_key_exists('width', $geometry) && array_key_exists('height', $geometry)) {
		printf(
			"Image geometry %dx%d",
			$geometry['width'],
			$geometry['height']
		);
		exit(0);
	}
}

echo "Failed get geometry from identifyimage:\n";
var_dump($data);

?>
--EXPECTF--
format: png (portable network graphics)
units: undefined
type: palette
Image geometry 640x480PKq9�Z�b=��+tests/119_Imagick_sepiaToneImage_basic.phptnu�[���--TEST--
Test Imagick, sepiaToneImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$sepia = 55;

function sepiaToneImage($sepia) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->sepiaToneImage($sepia);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

sepiaToneImage($sepia) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z��oٽ�*tests/070_Imagick_equalizeImage_case2.phptnu�[���--TEST--
Test Imagick, equalizeImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


//This appears to corrupt the image colors?
function extentImage($startX, $startY, $width, $height) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->equalizeImage();
    $imagick->extentImage(
        $startX, $startY, $width, $height
    );
    
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}
$startX = 50;
$startY = 50;
$width = 150;
$height = 150;

extentImage($startX, $startY, $width, $height) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z��W[[(tests/144_Imagick_spliceImage_basic.phptnu�[���--TEST--
Test Imagick, spliceImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$startX = 50;
$startY = 50;
$width = 50;
$height = 50;

function spliceImage($startX, $startY, $width, $height) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->spliceImage($width, $height, $startX, $startY);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

spliceImage($startX, $startY, $width, $height) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Zȭ=���&tests/074_Imagick_flopImage_basic.phptnu�[���--TEST--
Test Imagick, flopImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc'); 
?>
--FILE--
<?php


function flopImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->flopImage();
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

flopImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Zͷr�<<2tests/266_ImagickDraw_getFontResolution_basic.phptnu�[���--TEST--
Test ImagickDraw, getFontResolution
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('ImagickDraw', array('getFontResolution', 'setFontResolution'));
?>
--FILE--
<?php

require_once(dirname(__FILE__) . '/functions.inc');

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';


$draw = new \ImagickDraw();
setFontForImagickDraw($draw);

$draw->setStrokeColor($strokeColor);
$draw->setFillColor($fillColor);

$draw->setStrokeWidth(2);
$draw->setFontSize(72);

$fontResolution = $draw->getFontResolution();

if (isset($fontResolution["x"]) == false || isset($fontResolution["y"]) == false) {
	echo "$fontResolution doesn't contain expected values:\n";
	var_dump($fontResolution);
}

if ($fontResolution["x"] < 8 || $fontResolution["x"] > 100) {
	echo "Font resolution x outside expected range: ".$fontResolution["x"]."\n";
}
if ($fontResolution["y"] < 8 || $fontResolution["y"] > 100) {
	echo "Font resolution y outside expected range: ".$fontResolution["y"]."\n";
}

$resolutionToSet = 36;

$draw->setFontResolution($resolutionToSet, $resolutionToSet);
$fontResolution = $draw->getFontResolution();

if (abs($fontResolution["x"] - $resolutionToSet) > 0.0001) {
	echo "Font resolution x after set is not $resolutionToSet instead: ".$fontResolution["x"]."\n";
}
if (abs($fontResolution["y"] - $resolutionToSet) > 0.0001) {
	echo "Font resolution y after set is not $resolutionToSet instead: ".$fontResolution["y"]."\n";
}

$draw->line(125, 70, 100, 50);
$draw->annotation(50, 32, "Lorem Ipsum!");

$imagick = new \Imagick();
$imagick->newImage(500, 500, $backgroundColor);
$imagick->setImageFormat("png");
$imagick->drawImage($draw);


$bytes = $imagick->getImageBlob();
if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 


echo "Ok";
?>

--EXPECTF--
OkPKq9�Z�l
�8tests/251_ImagickPixelIterator_setIteratorRow_basic.phptnu�[���--TEST--
Test ImagickPixelIterator, setIteratorRow
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function setIteratorRow() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imageIterator = $imagick->getPixelRegionIterator(200, 100, 200, 200);

    for ($x = 0; $x < 20; $x++) {        
        $imageIterator->setIteratorRow($x * 5);
        $pixels = $imageIterator->getCurrentIteratorRow();
        /* Loop through the pixels in the row (columns) */
        foreach ($pixels as $pixel) {
            /** @var $pixel \ImagickPixel */
            /* Paint every second pixel black*/
            $pixel->setColor("rgba(0, 0, 0, 0)"); 
        }

        /* Sync the iterator, this is important to do on each iteration */
        $imageIterator->syncIterator();
    }

    $bytes = $imagick;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setIteratorRow() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�ZO�g"	"	5tests/280_imagickkernel_exception_invalid_origin.phptnu�[���--TEST--
ImagickKernel::fromMatrix exceptions
--SKIPIF--
<?php 

$imageMagickRequiredVersion = 0x680;
require_once(dirname(__FILE__) . '/skipif.inc');
 
?>
--FILE--
<?php


$kernelArray = array(
	array(1, 0, -1),
	array(1, 0, -1),
	array(1, 0, -1),
);

$validOrigins = [
    [0, 0],
    [2, 0],
    [0, 2],
    [2, 2],
    [1, 2]
];

$invalidOrigins = [
    [-1, 0],
    [3, 0],
    [0, 3],
    [3, 3],
    [1, PHP_INT_MAX - 10],
];


foreach ($validOrigins as $validOrigin) {
    try {
        $kernel = ImagickKernel::fromMatrix($kernelArray, $validOrigin);
    }
    catch (\Exception $e) {
        echo "unexpected exception: " . $e->getMessage();
    }
}

foreach ($invalidOrigins as $invalidOrigin) {
    try {
        $kernel = ImagickKernel::fromMatrix($kernelArray, $invalidOrigin);
        echo "Exception wasn't thrown for case: \n";
        var_dump($invalidOrigin);
    }
    catch (\ImagickKernelException $e) {
        $message = $e->getMessage();
        if (strpos($message, "origin_y for matrix is outside bounds of rows") === 0) {
            // this is fine.
        }
        else if (strpos($message, "origin_x for matrix is outside bounds of columns") === 0) {
            // this is fine.
        }
        else {
            echo "Unexpected message: " . $message . "\n";
        }
    }
}

$flatKernelArray = array(
	array(1, 0, -2, 0, 1),
);

try {
    $kernel = ImagickKernel::fromMatrix($flatKernelArray, [1, 4]);
    echo "Exception wasn't thrown for case: \n";
    var_dump($invalidOrigin);
}
catch (\ImagickKernelException $e) {
    $message = $e->getMessage();
    if (strpos($message, "origin_y for matrix is outside bounds of rows") === 0) {
        // this is fine.
    }
    else {
        echo "Unexpected message: " . $message . "\n";
    }
}


$tallKernelArray = array(
	array(1),
	array(0),
	array(-2),
	array(0),
	array(1),
);


try {
    $kernel = ImagickKernel::fromMatrix($tallKernelArray, [4, 1]);
    echo "Exception wasn't thrown for case: \n";
    var_dump($invalidOrigin);
}
catch (\ImagickKernelException $e) {
    $message = $e->getMessage();
    if (strpos($message, "origin_x for matrix is outside bounds of columns") === 0) {
        // this is fine.
    }
    else {
        echo "Unexpected message: " . $message . "\n";
    }
}



echo "Complete".PHP_EOL;
?>
--EXPECTF--
Complete
PKq9�Z��MM+tests/100_Imagick_posterizeImage_basic.phptnu�[���--TEST--
Test Imagick, posterizeImage
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$posterizeType = 2;
$numberLevels = 8;

function posterizeImage($posterizeType, $numberLevels) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->posterizeImage($numberLevels, $posterizeType);
    $imagick->setImageFormat('png');
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

posterizeImage($posterizeType, $numberLevels) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�#��1tests/220_ImagickDraw_setStrokeOpacity_basic.phptnu�[���--TEST--
Test ImagickDraw, setStrokeOpacity
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setStrokeOpacity($strokeColor, $fillColor, $backgroundColor) {
    $draw = new \ImagickDraw();

    $draw->setStrokeWidth(1);
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(10);
    $draw->setStrokeOpacity(1);
    $draw->line(100, 80, 400, 125);
    $draw->rectangle(25, 200, 150, 350);
    $draw->setStrokeOpacity(0.5);
    $draw->line(100, 100, 400, 145);
    $draw->rectangle(200, 200, 325, 350);
    $draw->setStrokeOpacity(0.2);
    $draw->line(100, 120, 400, 165);
    $draw->rectangle(375, 200, 500, 350);

    $image = new \Imagick();
    $image->newImage(550, 400, $backgroundColor);
    $image->setImageFormat("png");
    $image->drawImage($draw);

    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setStrokeOpacity($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�:���4tests/217_ImagickDraw_setStrokeMiterLimit_basic.phptnu�[���--TEST--
Test ImagickDraw, setStrokeMiterLimit
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setStrokeMiterLimit($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setStrokeOpacity(0.6);
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(10);

    $yOffset = 100;

    $draw->setStrokeLineJoin(\Imagick::LINEJOIN_MITER);

    for ($y = 0; $y < 3; $y++) {

        $draw->setStrokeMiterLimit(40 * $y);

        $points = array(
            array('x' => 22 * 3, 'y' => 15 * 4 + $y * $yOffset),
            array('x' => 20 * 3, 'y' => 20 * 4 + $y * $yOffset),
            array('x' => 70 * 5, 'y' => 45 * 4 + $y * $yOffset),
        );

        $draw->polygon($points);
    }

    $image = new \Imagick();
    $image->newImage(500, 500, $backgroundColor);
    $image->setImageFormat("png");
    $image->drawImage($draw);

    $image->setImageType(\Imagick::IMGTYPE_PALETTE);
    //TODO - this should either be everywhere or nowhere
    $image->setImageCompressionQuality(100);
    $image->stripImage();

    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setStrokeMiterLimit($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Zf��b��!tests/320_Imagick_getOptions.phptnu�[���--TEST--
Test Imagick, getOptions
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('getOptions'));
?>
--FILE--
<?php

function getOptions() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');
    $result = $imagick->getOptions();

    if ($result !== []) {
    	echo "unexpected contents of options:\n";
    	var_dump($result);
    }

    $imagick->setOption("jpeg:preserve", "yes");

    $result = $imagick->getOptions();
    $expected = ["jpeg:preserve" => "yes"];

    if ($result !== $expected) {
        echo "unexpected contents of options:\n";
        var_dump($result);
    }

    $imagick->deleteOption("jpeg:preserve");
    $result = $imagick->getOptions();

    if ($result !== []) {
    	echo "unexpected contents of options, failed to delete the set one:\n";
    	var_dump($result);
    }
}

getOptions() ;
echo "Ok";
?>
--EXPECTF--
Ok
PKq9�Z���~~ tests/276_Imagick_artifacts.phptnu�[���--TEST--
Test Imagick::setImageArtifact and Imagick::getImageArtifact
--SKIPIF--
<?php

$imageMagickRequiredVersion = 0x656;

require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('setImageArtifact', 'getImageArtifact', 'deleteImageArtifact'));

?>
--FILE--
<?php

$im = new IMagick(__DIR__ . '/php.gif');

/* Examle from http://php.net/manual/de/imagick.setimageartifact.php */
var_dump($im->setImageArtifact('compose:args', '1,0,-0.5,0.5'));

var_dump($im->getImageArtifact('compose:args'));
var_dump($im->deleteImageArtifact('compose:args'));

?>
--EXPECT--
bool(true)
string(12) "1,0,-0.5,0.5"
bool(true)PKq9�Z��}.EE-tests/106_Imagick_reduceNoiseImage_basic.phptnu�[���--TEST--
Test Imagick, reduceNoiseImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('reduceNoiseImage'));
?>
--FILE--
<?php

$reduceNoise = 5;

function reduceNoiseImage($reduceNoise) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    @$imagick->reduceNoiseImage($reduceNoise);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

reduceNoiseImage($reduceNoise) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z���rii%tests/294_Imagick_cannyEdgeImage.phptnu�[���--TEST--
Test Imagick, cannyEdgeImage
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('cannyEdgeImage'));
?>
--FILE--
<?php


function cannyEdgeImage() {
    $path = realpath(__DIR__ . '/Biter_500.jpg');

    if ($path === false) {
        echo "Image is not readable.\n";
        exit(-1);
    }

    $imagick = new \Imagick();
    $imagick->readImage($path);

    $imagick->cannyEdgeImage(10, 4, 0.1, 0.5);
//    $imagick->writeImage(__DIR__ . '/cannyEdgeImage_output_image.png');
    $imagick->getImageBlob();
}

cannyEdgeImage() ;
echo "Ok";
?>
--EXPECTF--
Ok
PKq9�Z��!���,tests/188_ImagickDraw_pushPattern_basic.phptnu�[���--TEST--
Test ImagickDraw, pushPattern
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function pushPattern($strokeColor, $fillColor, $backgroundColor) {
    $draw = new \ImagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(1);
    $draw->setStrokeOpacity(1);
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);

    $draw->setStrokeWidth(1);

    $draw->pushPattern("MyFirstPattern", 0, 0, 50, 50);
    for ($x = 0; $x < 50; $x += 10) {
        for ($y = 0; $y < 50; $y += 5) {
            $positionX = $x + (($y / 5) % 5);
            $draw->rectangle($positionX, $y, $positionX + 5, $y + 5);
        }
    }
    $draw->popPattern();

    $draw->setFillOpacity(0);
    $draw->rectangle(100, 100, 400, 400);
    $draw->setFillOpacity(1);

    $draw->setFillOpacity(1);

    $draw->push();
    $draw->setFillPatternURL('#MyFirstPattern');
    $draw->setFillColor('yellow');
    $draw->rectangle(100, 100, 400, 400);
    $draw->pop();

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");

    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

pushPattern($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z<�.T&&$tests/261_compositeImageGravity.phptnu�[���--TEST--
Test compositeImageGravity
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc');

$v = Imagick::getVersion();
if ($v['versionNumber'] < 0x693)
	die ('skip too old ImageMagick');

// if ($v ['versionNumber'] >= 0x660 && $v ['versionNumber'] < 0x670)
//	die ('skip seems to be broken in this version of ImageMagick');
?>
--FILE--
<?php

$im1 = new Imagick("magick:logo");


$im2 = new Imagick("magick:logo");

$im2->scaleImage(
	$im2->getImageWidth() / 2,
	$im2->getImageHeight() / 2
);

$im1->compositeImageGravity(
	$im2,
	\Imagick::COMPOSITE_ATOP,
	\Imagick::GRAVITY_NORTHEAST
);

$im1->compositeImageGravity(
	$im2,
	\Imagick::COMPOSITE_ATOP,
	\Imagick::GRAVITY_SOUTH
);

// $im1->setImageFormat('png');
// $im1->writeImage('compositeImageGravity.png');

echo "Ok";

?>
--EXPECT--
OkPKq9�Z�&tests/131_Imagick_setOption_case2.phptnu�[���--TEST--
Test Imagick, setOption
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$imageOption = 0;
$format = 'png64';

function renderPNG($format) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->setImageFormat('png');
    $imagick->setOption('png:format', $format);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

renderPNG($format) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�n���)tests/314_Imagick_getBackgroundColor.phptnu�[���--TEST--
Test Imagick, getBackgroundColor
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('getBackgroundColor'));
?>
--FILE--
<?php

function getBackgroundColor() {
    $imagick = new \Imagick();
    $background_color = $imagick->getBackgroundColor();

    /** @var $background_color \ImagickPixel */
    echo "Color is: " . $background_color->getColorAsString() . "\n";

    $imagick->setBackgroundColor('red');
    $background_color = $imagick->getBackgroundColor();

    /** @var $background_color \ImagickPixel */
    echo "Color is now: " . $background_color->getColorAsString() . "\n";

}

getBackgroundColor() ;
echo "Ok";
?>
--EXPECTF--
Color is: srgb(255,255,255)
Color is now: srgb(255,0,0)
Ok
PKq9�Z3֔YY0tests/027_Imagick_adaptiveResizeImage_basic.phptnu�[���--TEST--
Test Imagick, adaptiveResizeImage
--SKIPIF--
<?php 
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc'); 
?>
--FILE--
<?php

$width = 200;
$height = 200;
$bestFit = 1;

function adaptiveResizeImage($width, $height, $bestFit) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->adaptiveResizeImage($width, $height, $bestFit);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

adaptiveResizeImage($width, $height, $bestFit) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z!��cc%tests/321_Imagick_getOrientation.phptnu�[���--TEST--
Test Imagick, getOrientation/setOrientation
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('getOrientation'));
?>
--FILE--
<?php

function getOrientation() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');
    $orientation = $imagick->getOrientation();

    echo "Orientation is $orientation\n";
    $imagick->setOrientation(Imagick::ORIENTATION_LEFTBOTTOM);
	$orientation = $imagick->getOrientation();

    echo "Orientation is now $orientation\n";
}

getOrientation() ;
echo "Ok";
?>
--EXPECTF--
Orientation is 0
Orientation is now 8
Ok
PKq9�Z����9tests/073_Imagick_forwardFourierTransformImage_basic.phptnu�[���--TEST--
Test Imagick, forwardFourierTransformImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;

require_once(dirname(__FILE__) . '/skipif.inc'); 
require_once(dirname(__FILE__) . '/skipprobefourier.inc');

?>
--FILE--
<?php


//Utility function for forwardTransformImage
function createMask() {
    $draw = new \ImagickDraw();

    $draw->setStrokeOpacity(0);
    $draw->setStrokeColor('rgb(255, 255, 255)');
    $draw->setFillColor('rgb(255, 255, 255)');

    //Draw a circle on the y-axis, with it's centre
    //at x, y that touches the origin
    $draw->circle(250, 250, 220, 250);

    $imagick = new \Imagick();
    $imagick->newImage(512, 512, "black");
    $imagick->drawImage($draw);
    $imagick->gaussianBlurImage(20, 20);
    $imagick->autoLevelImage();

    return $imagick;
}


function forwardFourierTransformImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->resizeimage(512, 512, \Imagick::FILTER_LANCZOS, 1);

    $mask = createMask();
    $imagick->forwardFourierTransformImage(true);

    $imagick->setIteratorIndex(0);
    $magnitude = $imagick->getimage();

    $imagick->setIteratorIndex(1);
    $imagickPhase = $imagick->getimage();

    if (true) {
        $imagickPhase->compositeImage($mask, \Imagick::COMPOSITE_MULTIPLY, 0, 0);
    }

    if (false) {
        $output = clone $imagickPhase;
        $output->setimageformat('png');
    $bytes = $output->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
    }

    $magnitude->inverseFourierTransformImage($imagickPhase, true);

    $magnitude->setimageformat('png');
    $bytes = $magnitude->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

forwardFourierTransformImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z����NN(tests/243_Tutorial_svgExample_basic.phptnu�[���--TEST--
Test Tutorial, svgExample
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php


function svgExample() {

    $svg = <<< END
<?xml version="1.0"?>
<svg version='1.0' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='746' height='742' viewBox='-362 -388 746 742' encoding='UTF-8' standalone='no'>
    <defs>
        <ellipse id='ellipse' cx='36' cy='-56' rx='160' ry='320' />
        <g id='ellipses'>
            <use xlink:href='#ellipse' fill='#0000ff' />
            <use xlink:href='#ellipse' fill='#0099ff' transform='rotate(72)' />
        </g>
    </defs>
</svg>
END;

    
    
    $svg = '<?xml version="1.0"?>
    <svg width="120" height="120"
         viewPort="0 0 120 120" version="1.1"
         xmlns="http://www.w3.org/2000/svg">

        <defs>
            <clipPath id="myClip">
                <circle cx="30" cy="30" r="20"/>
                <circle cx="70" cy="70" r="20"/>
            </clipPath>
        </defs>

        <rect x="10" y="10" width="100" height="100"
              clip-path="url(#myClip)"/>

    </svg>';



    
    $image = new \Imagick();

    $image->readImageBlob($svg);
    $image->setImageFormat("jpg");
    $bytes = $image;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

svgExample() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Zz�,tests/198_ImagickDraw_setClipPath_basic.phptnu�[���--TEST--
Test ImagickDraw, setClipPath
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setClipPath($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeOpacity(1);
    $draw->setStrokeWidth(2);

    $clipPathName = 'testClipPath';

    $draw->pushClipPath($clipPathName);
    $draw->rectangle(0, 0, 250, 250);
    $draw->popClipPath();
    $draw->setClipPath($clipPathName);
    $draw->rectangle(100, 100, 400, 400);

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");

    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setClipPath($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�$P���&tests/227_ImagickDraw_skewY_basic.phptnu�[���--TEST--
Test ImagickDraw, skewY
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';
$fillModifiedColor = 'LightCoral';
$startX = 50;
$startY = 50;
$endX = 400;
$endY = 400;
$skew = 10;

function skewY($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor, 
               $startX, $startY, $endX, $endY, $skew) {

    $draw = new \ImagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setStrokeWidth(2);
    $draw->setFillColor($fillColor);
    $draw->rectangle($startX, $startY, $endX, $endY);
    $draw->setFillColor($fillModifiedColor);
    $draw->skewY($skew);
    $draw->rectangle($startX, $startY, $endX, $endY);

    $image = new \Imagick();
    $image->newImage(500, 500, $backgroundColor);
    $image->setImageFormat("png");
    $image->drawImage($draw);

    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

skewY($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor,
	$startX, $startY, $endX, $endY, $skew);
echo "Ok";
?>
--EXPECTF--
OkPKq9�ZX��j��+tests/281_imagick_houghLineImage_basic.phptnu�[���--TEST--
Test Imagick, houghLineImage
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('houghLineImage'));
?>
--FILE--
<?php


function houghLineImage() {
    $path = realpath(__DIR__ . '/houghline_input_image.png');

    if ($path === false) {
        echo "Image is not readable.\n";
        exit(-1);
    }

    $imagick = new \Imagick();
    $imagick->readImage($path);
    $imagick->setbackgroundcolor('rgb(64, 64, 64)');
    $imagick->houghLineImage(20,40, 40);
    $imagick->writeImage(__DIR__ . '/houghline_output_image.png');
}

houghLineImage() ;
echo "Ok";
?>
--CLEAN--
<?php
$f = __DIR__ . '/houghline_output_image.png';
if (file_exists($f)) {
    @unlink($f);
}
?>
--EXPECTF--
Ok
PKq9�Z�l2���3tests/088_Imagick_implodeImageWithMethod_basic.phptnu�[���--TEST--
Test Imagick, implodeImageWithMethod
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x700;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function implodeImage($method) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->implodeImageWithMethod(1.15, $method);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
//    $imagick->writeImage(__DIR__ . "/implodeImageWithMethod_$method.png");
}

$methods = [
    Imagick::INTERPOLATE_SPLINE,
    Imagick::INTERPOLATE_AVERAGE_16,
    Imagick::INTERPOLATE_BACKGROUND_COLOR
];

foreach ($methods as $method) {
    implodeImage($method);
}
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z!��CC$tests/076_Imagick_fxImage_basic.phptnu�[���--TEST--
Test Imagick, fxImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
checkFormatPresent('png');
?>
--FILE--
<?php


function fxImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(200, 200, "xc:white");

    $fx = 'xx=i-w/2; yy=j-h/2; rr=hypot(xx,yy); (.5-rr/140)*1.2+.5';
    $fxImage = $imagick->fxImage($fx);

    $fxImage->setimageformat('png');
    $bytes = $fxImage->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

fxImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z���oo1tests/028_Imagick_adaptiveSharpenImage_basic.phptnu�[���--TEST--
Test Imagick, adaptiveSharpenImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc'); 
?>
--FILE--
<?php

$radius = 5;
$sigma = 1;
$channel = Imagick::CHANNEL_DEFAULT;

function adaptiveSharpenImage($radius, $sigma, $channel) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->adaptiveSharpenImage($radius, $sigma, $channel);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

adaptiveSharpenImage($radius, $sigma, $channel) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Zx�Մ��(tests/272_imagick_identifyimagetype.phptnu�[���--TEST--
Test identifyImageType
--SKIPIF--
<?php 

require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('identifyImageType'));

?>
--FILE--
<?php

$im = new Imagick();
$im->newPseudoImage(100, 100, "magick:logo");

$type = $im->identifyImageType();

if ($type !== Imagick::IMGTYPE_PALETTE) {
	echo "Unexpected type value. Expecting: ".Imagick::IMGTYPE_PALETTE.", but got $type. \n";
}
echo "Ok";

?>
--EXPECTF--
OkPKq9�Z�4d!,,&tests/132_Imagick_setOption_case3.phptnu�[���--TEST--
Test Imagick, setOption
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$imageOption = 0;

function renderCustomBitDepthPNG() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->setImageFormat('png');
    $imagick->setOption('png:bit-depth', '16');
    $imagick->setOption('png:color-type', 6);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

renderCustomBitDepthPNG() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z
��

$tests/175_ImagickDraw_arc_basic.phptnu�[���--TEST--
Test ImagickDraw, arc
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';
$startX = 50;
$startY = 50;
$endX = 400;
$endY = 400;
$startAngle = 0;
$endAngle = 270;

function arc($strokeColor, $fillColor, $backgroundColor, $startX, $startY, $endX, $endY, $startAngle, $endAngle) {

    //Create a ImagickDraw object to draw into.
    $draw = new \ImagickDraw();
    $draw->setStrokeWidth(1);
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(2);

    $draw->arc($startX, $startY, $endX, $endY, $startAngle, $endAngle);

    //Create an image object which the draw commands can be rendered into
    $image = new \Imagick();
    $image->newImage(500, 500, $backgroundColor);
    $image->setImageFormat("png");

    //Render the draw commands in the ImagickDraw object 
    //into the image.
    $image->drawImage($draw);

    //Send the image to the browser
    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

arc($strokeColor, $fillColor, $backgroundColor, $startX, $startY, $endX, $endY, $startAngle, $endAngle) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�ZuIm���7tests/250_ImagickPixelIterator_resetIterator_basic.phptnu�[���--TEST--
Test ImagickPixelIterator, resetIterator
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function resetIterator() {

    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");

    $imageIterator = $imagick->getPixelIterator();

    /* Loop trough pixel rows */
    foreach ($imageIterator as $pixels) {
        /* Loop through the pixels in the row (columns) */
        foreach ($pixels as $column => $pixel) {
            /** @var $pixel \ImagickPixel */
            if ($column % 2) {

                /* Make every second pixel 25% red*/
                $pixel->setColorValue(\Imagick::COLOR_RED, 64); 
            }
        }
        /* Sync the iterator, this is important to do on each iteration */
        $imageIterator->syncIterator();
    }

    $imageIterator->resetiterator();

    /* Loop trough pixel rows */
    foreach ($imageIterator as $pixels) {
        /* Loop through the pixels in the row (columns) */
        foreach ($pixels as $column => $pixel) {
            /** @var $pixel \ImagickPixel */
            if ($column % 3) {
                $pixel->setColorValue(\Imagick::COLOR_BLUE, 64); /* Make every second pixel a little blue*/
                //$pixel->setColor("rgba(0, 0, 128, 0)"); /* Paint every second pixel black*/
            }
        }
        $imageIterator->syncIterator(); /* Sync the iterator, this is important to do on each iteration */
    }

    $imageIterator->clear();

    $bytes = $imagick;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

resetIterator() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�1�;S
S
tests/025-get-color.phptnu�[���--TEST--
Test getColor and getColorQuantum
--SKIPIF--
<?php 

require_once(dirname(__FILE__) . '/skipif.inc');


?>
--FILE--
<?php

define('ORIGINAL', 'ORIGINAL');
define('NORMALISED', 'NORMALISED');
define('NORMALISED_INCLUDING_ALPHA', 'NORMALISED_INCLUDING_ALPHA');
define('QUANTUM', 'QUANTUM');

function checkExpectedValue($expectedValue, $actualValue, $hasVariance) {

	$variance = 0; 

	// Behaviour of 50% pixel was changed in 
	// key = version
	// value = variance expected in result
	$troubledVersions = array(
		0x692 => 1
	);
	$v = Imagick::getVersion();
	$versionNumber = $v['versionNumber'];

	if (array_key_exists($versionNumber, $troubledVersions)) {
		$variance = $troubledVersions[$versionNumber];
	}

	if (Imagick::getHDRIEnabled()) {
		return abs($expectedValue - $actualValue) < (0.01 + $variance);
	}

	if ($hasVariance) {
		$difference = abs($expectedValue - $actualValue);
		if ($difference < 1 + $variance) {
			return true;
		}
		echo "difference $difference not < 1 + variance $variance\n";
		return false;
	}
	else if($expectedValue == $actualValue) {
		return true;
	}

	return false;
}

function getExpectedValue($someValue) {
	if (Imagick::getHDRIEnabled()) {
		return $someValue;
	}

	$v = Imagick::getVersion();
	if ($v['versionNumber'] >= 0x692) {
		//this is the new correct behaviour
		return (intval(round($someValue, 0, PHP_ROUND_HALF_UP)));
	}
	else {
		//old behaviour had wrong rounding.
		return (intval(round($someValue, 0, PHP_ROUND_HALF_DOWN)));
	}
}


$tests = array(
	array(
		'red',
		ORIGINAL,  
		array(
			array('r', getExpectedValue(255), 0),
			array('a', getExpectedValue(1.0), 0)
		),
	),
	array(
		'red',
		QUANTUM,  
		array(
			array('r', getExpectedValue(\Imagick::getQuantum()), 0),
			array('a', getExpectedValue(\Imagick::getQuantum()), 0)
		),
	),
	array(
		'rgb(25%, 25%, 25%)',
		QUANTUM,
		array(
			array('r', getExpectedValue(\Imagick::getQuantum() / 4), 0),
			array('a', getExpectedValue(\Imagick::getQuantum()), 0),
		)
	)
);

$version = Imagick::getVersion();
// The following don't seem stable in lesser versions.
if ($version['versionNumber'] >= 0x687) {
	$tests[] = array(
		'green',
		QUANTUM,  
		array(
			array('g', getExpectedValue(\Imagick::getQuantum() * (128 / 255)), 1),
			array('a', getExpectedValue(\Imagick::getQuantum()), 1)
		),
	);

	$tests[] = array(
		'rgb(0, 50%, 0)',
		QUANTUM,  
		array(
			array('g', getExpectedValue(\Imagick::getQuantum() / 2), 1),
			array('a', getExpectedValue(\Imagick::getQuantum()), 0)
		),
	);
}


foreach ($tests as $test) {

	list($colorString, $type, $expectations) = $test;
	$pixel = new ImagickPixel($colorString);

	switch ($type) {

		case(ORIGINAL): {
			$color = $pixel->getColor();
			break;
		}

		case(NORMALISED): {
			$color = $pixel->getColor(true);
			break;
		}

		case(NORMALISED_INCLUDING_ALPHA): {
			$color = $pixel->getColor(2);
			break;
		}

		case(QUANTUM): {
			$color = $pixel->getColorQuantum();
			break;
		}

		default:{
			echo "Unknown test type $type" . PHP_EOL;
			break;
		}
	}

	foreach ($expectations as $test) {
		list($key, $expectedValue, $hasVariance) = $test;
		if (!checkExpectedValue($expectedValue, $color[$key], $hasVariance)) {
			printf( 
				"%s %s is wrong for colorString '%s': actual %s != expected %s"  . PHP_EOL,
				$type,
				$key, $colorString,
				$color[$key], $expectedValue
			);
		}
	}
}

echo "OK" . PHP_EOL;
?>
--EXPECT--
OKPKq9�Z!�5F$$1tests/152_Imagick_swirlImageWithMethod_basic.phptnu�[���--TEST--
Test Imagick, swirlImageWithMethod
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x700;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$swirl = 100;

function swirlImageWithMethod($swirl) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->swirlImageWithMethod($swirl, Imagick::INTERPOLATE_BILINEAR);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

swirlImageWithMethod($swirl) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z6����&tests/185_ImagickDraw_point_basic.phptnu�[���--TEST--
Test ImagickDraw, point
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function point($fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $draw->setFillColor($fillColor);

    for ($x = 0; $x < 10000; $x++) {
        $draw->point(rand(0, 500), rand(0, 500));
    }

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");
    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

point($fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�t˭II0tests/239_Tutorial_gradientReflection_basic.phptnu�[���--TEST--
Test Tutorial, gradientReflection
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php


function gradientReflection() {
    $im = new \Imagick();
    $im->newPseudoImage(640, 480, "magick:logo");
    
    $reflection = clone $im;

    $reflection->flipImage();

    $reflection->cropImage($im->getImageWidth(), $im->getImageHeight() * 0.75, 0, 0);

    $gradient = new \Imagick();
    $gradient->newPseudoImage(
         $reflection->getImageWidth(),
         $reflection->getImageHeight(),
         //Putting spaces in the rgba string is bad
         'gradient:rgba(255,0,255,0.6)-rgba(255,255,0,0.99)'
    );

    $reflection->compositeimage(
       $gradient,
       \Imagick::COMPOSITE_DSTOUT,
       0, 0
    );

    $canvas = new \Imagick();
    $canvas->newImage($im->getImageWidth(), $im->getImageHeight() * 1.75, new \ImagickPixel('rgba(255, 255, 255, 0)'));
    $canvas->compositeImage($im, \Imagick::COMPOSITE_BLEND, 0, 0);
    $canvas->setImageFormat('png');
    $canvas->compositeImage($reflection, \Imagick::COMPOSITE_BLEND, 0, $im->getImageHeight());

    $canvas->stripImage();
    $canvas->setImageFormat('png');
    header('Content-Type: image/png');
    $bytes = $canvas;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

gradientReflection() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�ZF��$��/tests/213_ImagickDraw_setStrokeAlpha_basic.phptnu�[���--TEST--
Test ImagickDraw, setStrokeAlpha
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setStrokeAlpha($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(4);
    $draw->line(100, 100, 400, 145);
    $draw->rectangle(100, 200, 225, 350);
    $draw->setStrokeOpacity(0.1);
    $draw->line(100, 120, 400, 165);
    $draw->rectangle(275, 200, 400, 350);

    $image = new \Imagick();
    $image->newImage(500, 400, $backgroundColor);
    $image->setImageFormat("png");

    $image->drawImage($draw);

    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setStrokeAlpha($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z���*SS&tests/048_Imagick_cropImage_basic.phptnu�[���--TEST--
Test Imagick, cropImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$startX = 50;
$startY = 50;
$width = 50;
$height = 50;

function cropImage($startX, $startY, $width, $height) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->cropImage($width, $height, $startX, $startY);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

cropImage($startX, $startY, $width, $height) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z����TT&tests/041_Imagick_chopImage_basic.phptnu�[���--TEST--
Test Imagick, chopImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$startX = 50;
$startY = 50;
$width = 100;
$height = 50;

function chopImage($startX, $startY, $width, $height) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->chopImage($width, $height, $startX, $startY);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

chopImage($startX, $startY, $width, $height) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�ZR�e޲�tests/bug21229.phptnu�[���--TEST--
Test PECL bug #21229
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

class ImagickTest extends Imagick {
    
	/* Protected property */
    protected $test;
    
	/* Override width property */
	public $width = 112233;

    public function setTestValue($value) {
        $this->test = $value;
        return $this;
    }
    
    public function getTestValue() {
        return $this->test;
    }
}

$test = new ImagickTest("magick:logo");
$test->setTestValue("test value");

echo "Value: " , $test->getTestValue() , PHP_EOL;

var_dump($test->width, $test->height);

echo "OK" , PHP_EOL;


?>
--EXPECTF--
Value: test value
int(112233)
int(%d)
OKPKq9�ZD�ڊUU*tests/093_Imagick_modulateImage_basic.phptnu�[���--TEST--
Test Imagick, modulateImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$hue = 150;
$saturation = 100;
$brightness = 100;

function modulateImage($hue, $brightness, $saturation) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->modulateImage($brightness, $saturation, $hue);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

modulateImage($hue, $brightness, $saturation) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z>z�e��'tests/138_Imagick_shaveImage_basic.phptnu�[���--TEST--
Test Imagick, shaveImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function shaveImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->shaveImage(100, 50);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

shaveImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�			#tests/278_Imagick_optimaze_gif.phptnu�[���--TEST--
Test Imagick::optimizeimagelayers and Imagick::optimizeimagetransparency
--SKIPIF--
<?php

$imageMagickRequiredVersion = 0x686;

require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('optimizeimagelayers'));
checkClassMethods('Imagick', array('optimizeimagetransparency'));

?>
--FILE--
<?php

function makeSimpleGif() {
    $aniGif = new \Imagick();
    $aniGif->setFormat("gif");

    $circleRadius = 20;
    $imageFrames = 6;
    $imageSize = 200;

    $background = new \Imagick();
    $background->newpseudoimage($imageSize, $imageSize, "canvas:gray");

    $blackWhite = new \Imagick();
    $blackWhite->newpseudoimage($imageSize, $imageSize, "gradient:black-white");

    $backgroundPalette = clone $background;
    $backgroundPalette->quantizeImage(240, \Imagick::COLORSPACE_RGB, 8, false, false);

    $blackWhitePalette = clone $blackWhite;
    $blackWhitePalette->quantizeImage(16, \Imagick::COLORSPACE_RGB, 8, false, false);

    $backgroundPalette->addimage($blackWhitePalette);

    for($count=0 ; $count<$imageFrames ; $count++) {
        echo "Frame: ".$count."\n";
        $drawing = new \ImagickDraw();
        $drawing->setFillColor('white');
        $drawing->setStrokeColor('rgba(64, 64, 64, 0.8)');
        $strokeWidth = 4;
        $drawing->setStrokeWidth($strokeWidth);

        $distanceToMove = $imageSize + (($circleRadius + $strokeWidth) * 2);
        $offset = ($distanceToMove * $count / ($imageFrames -1)) - ($circleRadius + $strokeWidth);
        $drawing->translate($offset, ($imageSize / 2) + ($imageSize / 3 * cos(20 * $count / $imageFrames)));
        $drawing->circle(0, 0, $circleRadius, 0);

        $frame = clone $background;
        $frame->drawimage($drawing);
        $frame->clutimage($backgroundPalette);
        $frame->setImageDelay(10);
        $aniGif->addImage($frame);
    }

    $aniGif = $aniGif->deconstructImages();

    $bytes = $aniGif->getImagesBlob();
    if (strlen($bytes) <= 0) {
        echo "Failed to generate image.";
    }

    return $aniGif;
}

function optimizeGif($im) {
    $im = $im->coalesceImages();
    $im->optimizeImageLayers();
    $im->optimizeimagetransparency();
}

$simpleGif = makeSimpleGif();
optimizeGif($simpleGif);

echo "Ok"
?>
--EXPECT--
Frame: 0
Frame: 1
Frame: 2
Frame: 3
Frame: 4
Frame: 5
Ok
PKq9�Z���2HHtests/houghline_input_image.pngnu�[����PNG


IHDR�,e��gAMA���a cHRMz&�����u0�`:�p��Q<�PLTE������^^^KKK���������8cy�w�Z�	-O���쭭�PPP��޿��~~~}����K����r���
0Ua���ߐ��6a}����[[[V��츸�n����)#�bKGD*S�Ԟ9IDATx���nGEQ9DZ�-�
��6)J�С��4���'O8��^�ͷ�~g�3���q���9�ß�K'w���=��Wv����:|y/�|����k�{���k{��_��'w��֜��KYr�/b��>�}'w�Ď���S:~r�O���>��'w�z���C�wr����>�1'w�@F���Cr��l��~��'�����"����?��95�9����d����w���*'��oy�g�����'����/f�R)�O~���㾚�Qu$8��|}y�7����'_�oE[3IN�,߉�FҜ�����L'_�D�q�N.��v�E����혔'mG$=�h�/��ѶS擋�]r�\���h۪��E�6%N.ڶ(rrѶ^��/�m�J'm��:�h[��R'_D��~���Ͽ̾W�m�_�>��̾X�m�?�7���g��8ѶR��mk�xѶ^��m��xѶE��m۔�xѶQ��m��xѶ]��m;d�xѶK�m���xѶS�m���x�v@ڍmd�x�vH΍m��x�vPƍm���x��@��m-d�x��D��m�d�x��J��m���x��P��m-%�x��V��m�e�x��Z��m���x��A�m=�x��G�m�D�x��K�m���x��Sԍm=�x��Wȍm��x��]��m���x�6B��mC�x�6F��m��x�6L��m��x�6R��mC��x�6X��m��x�6��m��x�6��mS��x�6�̍m�L�x�6ͼ�m��x�6՜�ms��x�6ٌ�mӍ�x�6��m��x��؍m1�x��ȍma��x�ǰ�m���x�ʘ�m��x�̀�m���x�O��mu�x�Sߍm1u�x�UǍmqu�x�X��m�u�x�[��m�u�x�]��m�5�xі@�m)4�xіCӍmI��xіFÍmy4�xіH��m���xіL��mɴ�xі��m	�xі�эm)�xіԑ�mY�xі��m���xі�ލm���xіܞ�m���xі��ml�x�V�ƍm5l�x�VĖ�mUl�x�V��m���x�V�ʍm���x�V͚�mլ�x�V�+7^�U�m%�b�E[M�n�h�ꑍme=�񢭮7^�U��Ƌ����x�Vܽ/ڪ�g�E[yw7^�����mg��Ƌ�Sxq�E�I��x�v�6^��ƭ�m��|�Eۉ�l�h;��/�N�f��~	]o�h;��7^��˿/���j�E��\m��'S�����z�IEND�B`�PKq9�ZY1��,tests/063_Imagick_distortImage_Shepards.phptnu�[���--TEST--
Test Imagick, distortImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$distortion = 1;

        //The control points move points in the image in a taffy like motion
        $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");

        $points = array(

            //Setup some control points that don't move
            5 * $imagick->getImageWidth() / 100, 5 * $imagick->getImageHeight() / 100,
            5 * $imagick->getImageWidth() / 100, 5 * $imagick->getImageHeight() / 100,
            
            5 * $imagick->getImageWidth() / 100, 95 * $imagick->getImageHeight() / 100,
            5 * $imagick->getImageWidth() / 100, 95 * $imagick->getImageHeight() / 100,

            95 * $imagick->getImageWidth() / 100, 95 * $imagick->getImageHeight() / 100,
            95 * $imagick->getImageWidth() / 100, 95 * $imagick->getImageHeight() / 100,

            5 * $imagick->getImageWidth() / 100, 5 * $imagick->getImageHeight() / 100,
            95 * $imagick->getImageWidth() / 100, 95 * $imagick->getImageHeight() / 100,
//            //Move the centre of the image down and to the right
//            50 * $imagick->getImageWidth() / 100, 50 * $imagick->getImageHeight() / 100,
//            60 * $imagick->getImageWidth() / 100, 60 * $imagick->getImageHeight() / 100,
//
//            //Move a point near the top-right of the image down and to the left and down
//            90 * $imagick->getImageWidth(), 10 * $imagick->getImageHeight(),
//            80 * $imagick->getImageWidth(), 15 * $imagick->getImageHeight(),  
        );

        $imagick->setimagebackgroundcolor("#fad888");
        $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_EDGE);
        $imagick->distortImage(\Imagick::DISTORTION_SHEPARDS, $points, TRUE);
    $bytes = $imagick;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 

echo "Ok";
?>
--EXPECTF--
OkPKq9�Zț+(tests/066_Imagick_embossImage_basic.phptnu�[���--TEST--
Test Imagick, embossImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$radius = 5;
$sigma = 1;

function embossImage($radius, $sigma) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->embossImage($radius, $sigma);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

embossImage($radius, $sigma) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�JXuZZ&tests/130_Imagick_setOption_case1.phptnu�[���--TEST--
Test Imagick, setOption
--SKIPIF--
<?php
//Double-free issue in ImageMagick makes test un-runnable before 690
$imageMagickRequiredVersion=0x690;
require_once(dirname(__FILE__) . '/skipif.inc'); 
?>
--FILE--
<?php

$extent = '10kb';

function renderJPG($extent) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->setImageFormat('jpg');
    $imagick->setOption('jpeg:extent', $extent);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

renderJPG($extent) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Zӥ��$tests/322_Imagick_getResolution.phptnu�[���--TEST--
Test Imagick, getResolution
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('getResolution'));
?>
--FILE--
<?php

function getResolution() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');
    $result = $imagick->getResolution();

    echo "x is " . $result['x'] . "\n";
    echo "y is " . $result['y'] . "\n";

    $imagick->setResolution(120, 60);
    $result = $imagick->getResolution();

    echo "x is now " . $result['x'] . "\n";
    echo "y is now " . $result['y'] . "\n";

    $imagick->getImageBlob();
}

getResolution() ;
echo "Ok";
?>
--EXPECTF--
x is 72
y is 72
x is now 120
y is now 60
Ok
PKq9�Z�64>>/tests/197_ImagickDraw_roundRectangle_basic.phptnu�[���--TEST--
Test ImagickDraw, roundRectangle
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';
$startX = 50;
$startY = 50;
$endX = 400;
$endY = 400;
$roundX = 100;
$roundY = 50;

function roundRectangle($strokeColor, $fillColor, $backgroundColor, $startX, $startY, $endX, $endY, $roundX, $roundY) {

    $draw = new \ImagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeOpacity(1);
    $draw->setStrokeWidth(2);

    $draw->roundRectangle($startX, $startY, $endX, $endY, $roundX, $roundY);

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");

    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

roundRectangle($strokeColor, $fillColor, $backgroundColor, $startX, $startY, $endX, $endY, $roundX, $roundY) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�ZD�٭IItests/009_properties.phptnu�[���--TEST--
Test reading properties
--SKIPIF--
<?php 
	require_once(dirname(__FILE__) . '/skipif.inc'); 
	checkFormatPresent('png');
?>
--FILE--
<?php

$im = new Imagick();
$im->newPseudoImage(100, 100, "XC:red");
$im->setImageFormat("png");

echo $im->width . "x" . $im->height . "\n";
echo $im->format;

?>
--EXPECTF--
100x100
pngPKq9�Z1��jj*tests/085_Imagick_haldClutImage_basic.phptnu�[���--TEST--
Test Imagick, haldClutImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function haldClutImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagickPalette = new \Imagick();
    $imagickPalette->newPseudoImage(640, 480, "magick:NETSCAPE");

    $imagickPalette->sepiatoneImage(55);
    $imagick->haldClutImage($imagickPalette);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

haldClutImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�UU��.tests/256_Imagick_exportImagePixels_basic.phptnu�[���--TEST--
Test Imagick, Imagick::exportImagePixels
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x687;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$imagick = new \Imagick();
$imagick->newPseudoImage(256, 256, "gradient:black-white");

$pixelTypes = array(
	Imagick::PIXEL_CHAR => function($v) { return $v / 255; } ,
	Imagick::PIXEL_DOUBLE => function($v) { return $v; } ,
	Imagick::PIXEL_FLOAT => function($v) { return $v; } ,
	Imagick::PIXEL_LONG => function($v) { return $v / 4294967295; },
	Imagick::PIXEL_QUANTUM => function($v) { return $v / Imagick::getQuantum(); } ,
	Imagick::PIXEL_SHORT => function($v) { return $v / 65535; } ,

	// This is not supported as ints close to 64bits are weird in PHP
	// Imagick::PIXEL_LONGLONG => function($v) { return $v / (2 << 64 -1 ); } ,
);

$v = Imagick::getVersion();
if ($v['versionNumber'] < 0x700) {
	//This test will probably fail on 32bit platforms. If you see this please
	//submit a PR that fixes the problem.
	$pixelTypes[Imagick::PIXEL_INTEGER] =  function($v) { return $v / 4294967295; }; 
}



foreach ($pixelTypes as $pixelType => $scaleFn) {
	try {
		$pixels = $imagick->exportImagePixels(0, 0, 1, 256, "R", $pixelType);
	
		for ($i = 0; $i<10 ; $i++) {
			$expectedValue = $i / 255;
			$scaledActualValue = $scaleFn($pixels[$i]);
	
			if (abs($expectedValue - $scaledActualValue) > 0.0001) {
				echo "pixel type $pixelType has incorrect values. They should be 0/255, 1/255, 2/255... 255/255 or the scaled equivalent\n";
				var_dump($pixels);
				break;
			}
		}
	}
	catch (\Exception $e) {
		echo "Exception caught for pixelType: $pixelType ";
		echo $e->getMessage();
	}
}


echo "Ok";
?>
--EXPECTF--
OkPKq9�Z?� �jj(tests/049_Imagick_deskewImage_basic.phptnu�[���--TEST--
Test Imagick, deskewImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
checkFormatPresent('jpg');
?>
--FILE--
<?php

$threshold = 0.5;

function deskewImage($threshold) {
    $imagick = $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $deskewImagick = clone $imagick;
    
    //This is the only thing required for deskewing.
    $deskewImagick->deskewImage($threshold);

    //The rest of this example is to make the result obvious - because
    //otherwise the result is not obvious.
    $trim = 9;

    $deskewImagick->cropImage($deskewImagick->getImageWidth() - $trim, $deskewImagick->getImageHeight(), $trim, 0);
    $imagick->cropImage($imagick->getImageWidth() - $trim, $imagick->getImageHeight(), $trim, 0);
    $deskewImagick->resizeimage($deskewImagick->getImageWidth() / 2, $deskewImagick->getImageHeight() / 2, \Imagick::FILTER_LANCZOS, 1);
    $imagick->resizeimage(
        (int)($imagick->getImageWidth() / 2),
        (int)($imagick->getImageHeight() / 2),
        \Imagick::FILTER_LANCZOS,
        1
    );
    $newCanvas = new \Imagick();
    $newCanvas->newimage($imagick->getImageWidth() + $deskewImagick->getImageWidth() + 20, $imagick->getImageHeight(), 'red', 'jpg');
    $newCanvas->compositeimage($imagick, \Imagick::COMPOSITE_COPY, 5, 0);
    $newCanvas->compositeimage($deskewImagick, \Imagick::COMPOSITE_COPY, $imagick->getImageWidth() + 10, 0);

    $bytes = $newCanvas->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

deskewImage($threshold) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z������)tests/112_Imagick_roundCorners_basic.phptnu�[���--TEST--
Test Imagick, roundCorners
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');

checkClassMethods('Imagick', array('roundCornersImage'));
?>
--FILE--
<?php

function roundCorners() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->setBackgroundColor('red');

    $imagick->setbackgroundcolor('pink');

    $x_rounding = 40;
    $y_rounding = 40;
    $stroke_width = 5;
    $displace = 0;
    $size_correction = 0;

    $imagick->roundCornersImage(
            $x_rounding,
                $y_rounding,
                $stroke_width,
                $displace,
                $size_correction
    );

    $bytes = $imagick->getImageBlob();
    $imagick->setImageFormat('png');
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";}
// $imagick->writeImage(__DIR__ . "/112_round_corner.png");
}

roundCorners() ;
echo "Ok";
?>
--EXPECTF--
Ok
PKq9�ZZ�!]] tests/001_imagick_readimage.phptnu�[���--TEST--
Imagick::readImage test
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php
print "--- Catch exception with try/catch\n";
$imagick = new Imagick();
try {
	$imagick->readImage('foo.jpg');
} catch (ImagickException $e) {
	echo "got exception";
}

?>
--EXPECTF--
--- Catch exception with try/catch
got exceptionPKq9�Z�1����'tests/195_ImagickDraw_rotate_basic.phptnu�[���--TEST--
Test ImagickDraw, rotate
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';
$fillModifiedColor = 'LightCoral';

function rotate($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor) {
    $draw = new \ImagickDraw();
    $draw->setStrokeColor($strokeColor);
    $draw->setStrokeOpacity(1);
    $draw->setFillColor($fillColor);
    $draw->rectangle(200, 200, 300, 300);
    $draw->setFillColor($fillModifiedColor);
    $draw->rotate(15);
    $draw->rectangle(200, 200, 300, 300);

    $image = new \Imagick();
    $image->newImage(500, 500, $backgroundColor);
    $image->setImageFormat("png");
    $image->drawImage($draw);

    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

rotate($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Zdgr�		(tests/186_ImagickDraw_polygon_basic.phptnu�[���--TEST--
Test ImagickDraw, polygon
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function polygon($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $draw->setStrokeOpacity(1);
    $draw->setStrokeColor($strokeColor);
    $draw->setStrokeWidth(4);

    $draw->setFillColor($fillColor);

    $points = array(
        array('x' => 40 * 5, 'y' => 10 * 5),
        array('x' => 20 * 5, 'y' => 20 * 5),
        array('x' => 70 * 5, 'y' => 50 * 5),
        array('x' => 60 * 5, 'y' => 15 * 5),
    );

    $draw->polygon($points);

    $image = new \Imagick();
    $image->newImage(500, 300, $backgroundColor);
    $image->setImageFormat("png");
    $image->drawImage($draw);

    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

polygon($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z꣮���&tests/196_ImagickDraw_scale_basic.phptnu�[���--TEST--
Test ImagickDraw, scale
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';
$fillModifiedColor = 'LightCoral';

function scale($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor) {

    $draw = new \ImagickDraw();
    $draw->setStrokeColor($strokeColor);
    $draw->setStrokeWidth(4);
    $draw->setFillColor($fillColor);
    $draw->rectangle(200, 200, 300, 300);
    $draw->setFillColor($fillModifiedColor);
    $draw->scale(1.4, 1.4);
    $draw->rectangle(200, 200, 300, 300);

    $image = new \Imagick();
    $image->newImage(500, 500, $backgroundColor);
    $image->setImageFormat("png");
    $image->drawImage($draw);

    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

scale($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�aP--!tests/260_localContrastImage.phptnu�[���--TEST--
Test localContrastImage
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc');

$v = Imagick::getVersion();
checkClassMethods('Imagick', array('localContrastImage'));

?>
--FILE--
<?php

$im = new Imagick("magick:logo");
$im->localContrastImage(2, 2);

echo "Ok";

?>
--EXPECT--
OkPKq9�Zn���@@(tests/039_Imagick_borderImage_basic.phptnu�[���--TEST--
Test Imagick, borderImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$width = 50;
$height = 20;
$color = 'rgb(127, 127, 127)';

function borderImage($color, $width, $height) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->borderImage($color, $width, $height);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

borderImage($color, $width, $height) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�ZL4+�xxtests/323_Imagick_getType.phptnu�[���--TEST--
Test Imagick, getType
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('getType'));
?>
--FILE--
<?php

function test_getType() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');
    $type = $imagick->getType();

    echo "Type is " . $type . "\n";
}

test_getType() ;
echo "Ok";
?>
--EXPECTF--
Type is 0
Ok
PKq9�Z�ӅPP,tests/054_Imagick_distortImage_Bilinear.phptnu�[���--TEST--
Test Imagick, distortImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$distortion = 1;

        $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
        $points = array(
            0,0, 25,25, # top left  
            176,0, 126,0, # top right
            0,135, 0,105, # bottom right 
            176,135, 176,135 # bottum left
        );
        $imagick->setImageBackgroundColor("#fad888");
        $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_BACKGROUND );
        $imagick->distortImage( \Imagick::DISTORTION_BILINEAR, $points, TRUE );
        header( "Content-Type: image/jpeg" );
    $bytes = $imagick;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 

echo "Ok";
?>
--EXPECTF--
OkPKq9�Z��!���,tests/193_ImagickDraw_pushPattern_basic.phptnu�[���--TEST--
Test ImagickDraw, pushPattern
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function pushPattern($strokeColor, $fillColor, $backgroundColor) {
    $draw = new \ImagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(1);
    $draw->setStrokeOpacity(1);
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);

    $draw->setStrokeWidth(1);

    $draw->pushPattern("MyFirstPattern", 0, 0, 50, 50);
    for ($x = 0; $x < 50; $x += 10) {
        for ($y = 0; $y < 50; $y += 5) {
            $positionX = $x + (($y / 5) % 5);
            $draw->rectangle($positionX, $y, $positionX + 5, $y + 5);
        }
    }
    $draw->popPattern();

    $draw->setFillOpacity(0);
    $draw->rectangle(100, 100, 400, 400);
    $draw->setFillOpacity(1);

    $draw->setFillOpacity(1);

    $draw->push();
    $draw->setFillPatternURL('#MyFirstPattern');
    $draw->setFillColor('yellow');
    $draw->rectangle(100, 100, 400, 400);
    $draw->pop();

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");

    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

pushPattern($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z6wep**2tests/143_Imagick_spreadImageWithMethod_basic.phptnu�[���--TEST--
Test Imagick, spreadImageWithMethod
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x700;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$radius = 5;

function spreadImageWithMethod($radius) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->spreadImageWithMethod($radius, Imagick::INTERPOLATE_BILINEAR);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

spreadImageWithMethod($radius) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�lύ�tests/325_Imagick_setDepth.phptnu�[���--TEST--
Test Imagick, setDepth
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('setDepth'));
?>
--FILE--
<?php

function setDepth() {
    $imagick = new \Imagick();

    $imagick->setDepth(16);
    $imagick->newPseudoImage(640, 480, "gradient:red-blue");

    echo "Depth is " .$imagick->getImageDepth() . "\n";

    // $imagick->getImageBlob();
    // TODO - check that the depth has actually worked?
    // this could be done by generating a gradient, and counting the unique
    // numbers of colours, or by looking at gradient artifacts.
}

setDepth() ;
echo "Ok";
?>
--EXPECTF--
Depth is 16
Ok
PKq9�ZuC~:��*tests/235_ImagickDraw_translate_basic.phptnu�[���--TEST--
Test ImagickDraw, translate
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';
$fillModifiedColor = 'LightCoral';
$startX = 50;
$startY = 50;
$endX = 400;
$endY = 400;
$translateX = 75;
$translateY = 75;

function translate($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor, 
                   $startX, $startY, $endX, $endY, $translateX, $translateY) {

    $draw = new \ImagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->rectangle($startX, $startY, $endX, $endY);

    $draw->setFillColor($fillModifiedColor);
    $draw->translate($translateX, $translateY);
    $draw->rectangle($startX, $startY, $endX, $endY);

    $image = new \Imagick();
    $image->newImage(500, 500, $backgroundColor);
    $image->setImageFormat("png");

    $image->drawImage($draw);

    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

translate($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor,
    $startX, $startY, $endX, $endY, $translateX, $translateY);
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�)�VQQ*tests/151_Imagick_subImageMatch_basic.phptnu�[���--TEST--
Test Imagick, subImageMatch
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x687;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

function subImageMatch() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->adaptiveResizeImage(100, 100, true);
    //This makes the test fall over on some versions of ImageMagick
    //$imagick->setImageAlphaChannel(\Imagick::ALPHACHANNEL_DEACTIVATE);
    $imagick2 = clone $imagick;
    $imagick2->cropimage(25, 25, 50, 50);
    $imagick2->setImageFormat('png');

    $imagick2->setImagePage(25, 25, 0, 0);
    $imagick2->vignetteimage(0.25, 0.75, 3, 3);

    $similarity = 'not set';
    $bestMatch = 'not st';
    $comparison = $imagick->subImageMatch($imagick2, $bestMatch, $similarity);

    $comparison->setImageFormat('png');
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 

    $version = Imagick::getVersion();
    if ($version['versionNumber'] >= 0x700) {
        $expectedValue = 0.7642;
    }
    else {
        $expectedValue = 0.5585;
    }

    // This doesn't work reliably - the values are not comparable across versions
    // if (abs($expectedValue - $similarity) <= 0.005) {
    //     echo "Similarity in range\n";
    // }
    // else {
    //     echo "Similarity is out of range.\n";
    //     var_dump($similarity);
    // }
    
    ksort($bestMatch);
    foreach ($bestMatch as $key => $value) {
        echo "$key : $value\n";
    }
}

subImageMatch() ;
echo "Ok";
?>

--EXPECTF--
height : 25
width : 25
x : 50
y : 50
OkPKq9�Z�kͪ55*tests/296_Imagick_waveletDenoiseImage.phptnu�[���--TEST--
Test Imagick, waveletDenoiseImage
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('waveletDenoiseImage'));
?>
--FILE--
<?php


function waveletDenoiseImage() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');

    $imagick->waveletDenoiseImage(5, 5);
    $imagick->writeImage(__DIR__ . '/waveletDenoiseImage_output_image.png');
//    $imagick->getImageBlob();
}

waveletDenoiseImage() ;
echo "Ok";
?>
--CLEAN--
<?php
@unlink(__DIR__ . '/waveletDenoiseImage_output_image.png');
?>
--EXPECTF--
Ok
PKq9�Znm?��*tests/181_ImagickDraw_pathStart_basic.phptnu�[���--TEST--
Test ImagickDraw, pathStart
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function pathStart($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $draw->setStrokeOpacity(1);
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);

    $draw->setStrokeWidth(2);
    $draw->setFontSize(72);

    $draw->pathStart();
    $draw->pathMoveToAbsolute(50, 50);
    $draw->pathLineToAbsolute(100, 50);
    $draw->pathLineToRelative(0, 50);
    $draw->pathLineToHorizontalRelative(-50);
    $draw->pathFinish();

    $draw->pathStart();
    $draw->pathMoveToAbsolute(50, 50);
    $draw->pathMoveToRelative(300, 0);
    $draw->pathLineToRelative(50, 0);
    $draw->pathLineToVerticalRelative(50);
    $draw->pathLineToHorizontalAbsolute(350);
    $draw->pathclose();
    $draw->pathFinish();

    $draw->pathStart();
    $draw->pathMoveToAbsolute(50, 300);
    $draw->pathCurveToAbsolute(50, 300, 100, 200, 300, 300);
    $draw->pathLineToVerticalAbsolute(350);
    $draw->pathFinish();

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");

    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

pathStart($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z/A��  'tests/078_Imagick_gammaImage_basic.phptnu�[���--TEST--
Test Imagick, gammaImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$gamma = 2.2;
$channel = Imagick::CHANNEL_DEFAULT;

function gammaImage($gamma, $channel) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->gammaImage($gamma, $channel);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

gammaImage($gamma, $channel) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Zi�Xtzz!tests/326_Imagick_setExtract.phptnu�[���--TEST--
Test Imagick, setExtract
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('setExtract'));
?>
--FILE--
<?php

function setExtract() {
    $imagick = new \Imagick();
    $imagick->setExtract("300x200+0+0");

    $imagick->readImage(__DIR__ . '/Biter_500.jpg');


//    $data = $imagick->getImageBlob();
//
//    $new_imagick = new Imagick();
//    $new_imagick->readImageBlob($data);

    echo "Width is " . $imagick->getImageWidth() . "\n";
    echo "Height is " . $imagick->getImageHeight() . "\n";
}

setExtract() ;
echo "Ok";
?>
--EXPECTF--
Width is 300
Height is 200
Ok
PKq9�Z�~�**+tests/045_Imagick_compositeImage_basic.phptnu�[���--TEST--
Test Imagick, compositeImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function compositeImage() {

    $img1 = new \Imagick();
    $img1->newPseudoImage(640, 480, "magick:logo");

    $img2 = new \Imagick();
    $img2->newPseudoImage(640, 480, "magick:logo"); 
    $img2->negateImage(false);
    $img2->blurimage(10, 5);


    $img1->resizeimage(
        $img2->getImageWidth(),
        $img2->getImageHeight(),
        \Imagick::FILTER_LANCZOS,
        1
    );

    $opacity = new \Imagick();    
    $opacity->newPseudoImage(
        $img1->getImageHeight(),
        $img1->getImageWidth(),
        "gradient:gray(10%)-gray(90%)"
    );
    $opacity->rotateimage('black', 90);

    $img2->compositeImage($opacity, \Imagick::COMPOSITE_COPYOPACITY, 0, 0);
    $img1->compositeImage($img2, \Imagick::COMPOSITE_ATOP, 0, 0);

    $bytes = $img1->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

compositeImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�bb.tests/080_Imagick_gaussianBlurImage_basic.phptnu�[���--TEST--
Test Imagick, gaussianBlurImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$radius = 5;
$sigma = 1;
$channel = Imagick::CHANNEL_DEFAULT;

function gaussianBlurImage($radius, $sigma, $channel) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->gaussianBlurImage($radius, $sigma, $channel);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

gaussianBlurImage($radius, $sigma, $channel) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z����00!tests/273_imagick_falsyimage.phptnu�[���--TEST--
Imagick::__construct false
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

try {
	$imagick = new Imagick(false);
}
catch (\ImagickException $ie) {
	echo $ie->getMessage()."\n";
}


?>
--EXPECTF--
Constructor shouldn't be called with a boolean as the filenamePKq9�Z�����$tests/305_Imagick_complexImages.phptnu�[���--TEST--
Test Imagick, complexImages
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('complexImages'));
?>
--FILE--
<?php

function complexImages() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');
    $multiply = new Imagick();
    $multiply->newPseudoImage($imagick->getImageWidth(), $imagick->getImageHeight(), "gradient:black-white");
    $imagick->addImage($multiply);

    $imagick->complexImages(Imagick::COMPLEX_OPERATOR_MULTIPLY);
//    $imagick->writeImage(__DIR__ . '/complexImages_output_image.png');
    $imagick->getImageBlob();
}

complexImages() ;
echo "Ok";
?>
--EXPECTF--
Ok
PKq9�ZG�����&tests/067_Imagick_edgeImage_basic.phptnu�[���--TEST--
Test Imagick, edgeImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$radius = 5;

function edgeImage($radius) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->edgeImage($radius);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

edgeImage($radius) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�����3tests/211_ImagickDraw_setStrokeAntialias_basic.phptnu�[���--TEST--
Test ImagickDraw, setStrokeAntialias
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setStrokeAntialias($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(1);
    $draw->setStrokeAntialias(false);
    $draw->line(100, 100, 400, 105);

    $draw->line(100, 140, 400, 185);

    $draw->setStrokeAntialias(true);
    $draw->line(100, 110, 400, 115);
    $draw->line(100, 150, 400, 195);

    $image = new \Imagick();
    $image->newImage(500, 250, $backgroundColor);
    $image->setImageFormat("png");

    $image->drawImage($draw);

    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setStrokeAntialias($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z-ιL		)tests/289_Imagick_setImageMask_basic.phptnu�[���--TEST--
Test Imagick, medianFilterImage
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('getImageMask', 'setImageMask'));
?>
--FILE--
<?php

$canvas = new Imagick(__DIR__ . '/houghline_input_image.png');

$mask = new Imagick();
$mask->newPseudoImage(
	$canvas->getImageWidth(),
	$canvas->getImageHeight(),
	'xc:black'
);

$drawing = new ImagickDraw();
$drawing->setBorderColor('black');
$drawing->setFillColor('black');
$drawing->rectangle(0, 0, $mask->getImageWidth(), $mask->getImageHeight());

$drawing->setBorderColor('white');
$drawing->setFillColor('white');
$drawing->circle(
	$mask->getImageWidth() / 2,
	$mask->getImageHeight() / 2,
	2 * $mask->getImageWidth() / 3,
	$mask->getImageHeight() / 2
);

$mask->drawImage($drawing);
//$mask->writeImage(__DIR__ . "/test_mask.png");

// This would probably be more useful for users
// but shows the issue with PIXELMASK_COMPOSITE
// $mask->blurImage(10, 2);

$mask_types = array(
	\Imagick::PIXELMASK_READ =>        "PIXELMASK_READ",
	\Imagick::PIXELMASK_WRITE =>       "PIXELMASK_WRITE",
	\Imagick::PIXELMASK_COMPOSITE =>   "PIXELMASK_COMPOSITE",
);

$channel_types = array(
	\Imagick::CHANNEL_ALL => "CHANNEL_ALL",
	\Imagick::CHANNEL_RED => "CHANNEL_RED",
	\Imagick::CHANNEL_ALPHA => "CHANNEL_ALPHA",
	\Imagick::CHANNEL_RGBA => "CHANNEL_RGBA",
	\Imagick::CHANNEL_BLACK => "CHANNEL_BLACK",
	\Imagick::CHANNEL_DEFAULT => "CHANNEL_DEFAULT",
);

foreach ($channel_types as $channel_type => $channel_name) {
	foreach ($mask_types as $type => $type_name) {
		$output = clone $canvas;
		$output->setImageMask($mask, $type);

		$output->blurImage(15, 4, $channel_type);
//		$output->writeImage(__DIR__ . "/test_canvas" . $type_name . "_" . $channel_name .  ".png");
	}
}

echo "Ok";
?>
--EXPECTF--
Ok
PKq9�Z�Ỡ�*tests/013-read-filehandle-file-stream.phptnu�[���--TEST--
Imagick::readImageFile, file stream test
--SKIPIF--
<?php
	require_once(dirname(__FILE__) . '/skipif.inc');
	checkFormatPresent('jpg');
?>
--FILE--
<?php

$file = dirname(__FILE__) . '/__tmp_rose.jpg';
$handle = fopen($file, 'w+');

$imagick = new Imagick('magick:rose');
$imagick->setImageFormat('jpg');
$imagick->writeImageFile($handle);

$imagick->clear();

rewind($handle);

$imagick->readImageFile($handle);

echo "Width: " . $imagick->getImageWidth() . "\n";
echo "Height: " . $imagick->getImageHeight() . "\n";

@unlink($file);

echo 'success';

?>
--CLEAN--
<?php
@unlink(dirname(__FILE__) . '/__tmp_rose.jpg');
?>
--EXPECT--
Width: 70
Height: 46
success
PKq9�Zb���-tests/241_Tutorial_psychedelicFont_basic.phptnu�[���--TEST--
Test Tutorial, psychedelicFont
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

require_once(dirname(__FILE__) . '/functions.inc');

function psychedelicFont() {
    $draw = new \ImagickDraw();
    setFontForImagickDraw($draw);
    $name = 'Danack';

    $draw->setStrokeOpacity(1);
    $draw->setFillColor('black');

    $draw->setfontsize(150);

    for ($strokeWidth = 25; $strokeWidth > 0; $strokeWidth--) {
        $hue = intval(170 + $strokeWidth * 360 / 25);
        $draw->setStrokeColor("hsl($hue, 255, 128)");
        $draw->setStrokeWidth($strokeWidth * 3);
        $draw->annotation(60, 165, $name);
    }

    //Create an image object which the draw commands can be rendered into
    $imagick = new \Imagick();
    $imagick->newImage(650, 230, "#eee");
    $imagick->setImageFormat("png");

    //Render the draw commands in the ImagickDraw object
    //into the image.
    $imagick->drawImage($draw);

    //Send the image to the browser
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

psychedelicFont() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z���i>>.tests/058_Imagick_distortImage_Polynomial.phptnu�[���--TEST--
Test Imagick, distortImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$distortion = 1;


// Order     X1,Y1 I1,J1     X2,Y2 I2,J2     X3,Y3 I3,J3     X4,Y4 I4,J4 . . . .
// The 'Order' argument is usually an integer from '1' onward, though a special value
// of '1.5' can also be used. This defines the 'order' or complexity of the 2-dimensional
// mathematical equation (using both 'x' and 'y') , that will be applied.
// For example an order '1' polynomial will fit a equation of the form...
// Xd = 	 C2x*Xs + C1x*Ys + C0x	  ,      	Yd = 	 C2y*Xs + C1y*Ys + C0y 
// See also http://www.imagemagick.org/Usage/distorts/#polynomial

        $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
        $points = array(
            1.5,   //Order 1.5 = special
            0, 0, 26, 0,   
            128,0,  114,23,  
            128,128,  128,100,
            0,128,  0,123
        );
        $imagick->setimagebackgroundcolor("#fad888");
        $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_BACKGROUND);
        $imagick->distortImage(\Imagick::DISTORTION_POLYNOMIAL, $points, TRUE);
    $bytes = $imagick;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 

echo "Ok";
?>
--EXPECTF--
OkPKq9�ZMߥ�tests/292_index_iterator.phptnu�[���--TEST--
Test iterating over images works
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$canvasTypes = [
    "radial-gradient:red-blue",
    "gradient:black-fuchsia",
    "plasma:tomato-steelblue",
];

$canvas = new Imagick();


foreach ($canvasTypes as $canvasType) {
    $imagick = new Imagick();
    $imagick->newPseudoImage(300, 300, $canvasType);
    $canvas->addImage($imagick);
}

$canvas->setImageFormat("png");

foreach ($canvas as $canvasSubImage) {
    echo $canvas->getIteratorIndex() . "\n";
    echo $canvas->getImageIndex() . "\n";
}

for ($i=0; $i<3; $i+=1) {
    $canvas->setImageIndex($i);
    echo $canvas->getIteratorIndex() . "\n";
}
for ($i=0; $i<3; $i+=1) {
    $canvas->setIteratorIndex($i);
    echo $canvas->getImageIndex() . "\n";
}

$canvas->setImageIndex(-1);
if ($canvas->getImageIndex() !== 2) {
    echo "Setting image index to -1 did something unexpected. Or at least is a BC break.\n";
}
else {
    echo "still " . $canvas->getImageIndex() . " as hasn't changed\n";
}

try {
    $canvas->setImageIndex(3);
}
catch (ImagickException $ie) {
    echo "Exception: ". $ie->getMessage() . "\n";
}

echo "Ok";
?>
--EXPECTF--
0
0
1
1
2
2
0
1
2
0
1
2
still 2 as hasn't changed
Exception: Unable to set image index
Ok

PKq9�Z {���,tests/203_ImagickDraw_setFillRule_basic.phptnu�[���--TEST--
Test ImagickDraw, setFillRule
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setFillRule($fillColor, $strokeColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $draw->setStrokeWidth(1);
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);

    $fillRules = array(\Imagick::FILLRULE_NONZERO, \Imagick::FILLRULE_EVENODD);

    $points = 11;
    $size = 150;

    $draw->translate(175, 160);

    for ($x = 0; $x < 2; $x++) {
        $draw->setFillRule($fillRules[$x]);
        $draw->pathStart();
        for ($n = 0; $n < $points * 2; $n++) {

            if ($n >= $points) {
                $angle = fmod($n * 360 * 4 / $points, 360) * pi() / 180;
            }
            else {
                $angle = fmod($n * 360 * 3 / $points, 360) * pi() / 180;
            }

            $positionX = $size * sin($angle);
            $positionY = $size * cos($angle);

            if ($n == 0) {
                $draw->pathMoveToAbsolute($positionX, $positionY);
            }
            else {
                $draw->pathLineToAbsolute($positionX, $positionY);
            }
        }

        $draw->pathClose();
        $draw->pathFinish();

        $draw->translate(325, 0);
    }

    $image = new \Imagick();
    $image->newImage(700, 320, $backgroundColor);
    $image->setImageFormat("png");
    $image->drawImage($draw);

    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setFillRule($fillColor, $strokeColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�)���+tests/242_Tutorial_levelizeImage_basic.phptnu�[���--TEST--
Test Tutorial, levelizeImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$blackPoint = 50;
$whitePoint = 100;
$gamma = 2.2;

function levelizeImage($blackPoint, $gamma,  $whitePoint) {
    $imagick = new \Imagick();
    $imagick->newPseudoimage(300, 300, 'gradient:black-white');
    $maxQuantum = $imagick->getQuantum();
    $imagick->evaluateimage(\Imagick::EVALUATE_POW, 1 / $gamma);
    
    //Adjust the scale from black to white to the new 'distance' between black and white
    $imagick->evaluateimage(\Imagick::EVALUATE_MULTIPLY, ($whitePoint - $blackPoint) / 100 );

    //Add move the black point to it's new value
    $imagick->evaluateimage(\Imagick::EVALUATE_ADD, ($blackPoint / 100) * $maxQuantum);
    $imagick->setFormat("png");

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

levelizeImage($blackPoint, $gamma,  $whitePoint) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�A��77tests/008_newpseudoimage.phptnu�[���--TEST--
Test pseudo formats
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$im = new Imagick();
$im->newPseudoImage(100, 100, "XC:red");
var_dump($im->getImageGeometry());

$im->newPseudoImage(10, 10, "magick:logo");
var_dump($im->getImageGeometry());

$im->readImage("magick:logo");
var_dump($im->getImageGeometry());

$im->newPseudoImage(10, 10, "rose:");
var_dump($im->getImageGeometry());

try { 
$im->newPseudoImage(10, 10, "png:");
var_dump($im->getImageGeometry());
} catch (Exception $e) {
	echo "fail\n";
}

?>
--EXPECTF--
array(2) {
  ["width"]=>
  int(%d)
  ["height"]=>
  int(%d)
}
array(2) {
  ["width"]=>
  int(%d)
  ["height"]=>
  int(%d)
}
array(2) {
  ["width"]=>
  int(%d)
  ["height"]=>
  int(%d)
}
array(2) {
  ["width"]=>
  int(%d)
  ["height"]=>
  int(%d)
}
failPKq9�Z�`�d(tests/234_Tutorial_edgeExtend_basic.phptnu�[���--TEST--
Test Tutorial, edgeExtend
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$virtualPixelType = 5;

function edgeExtend($virtualPixelType) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->setImageVirtualPixelMethod($virtualPixelType);

    $imagick->scaleimage(400, 300, true);

    $imagick->setbackgroundcolor('pink');
   
    $desiredWidth = 600;
    $originalWidth = $imagick->getImageWidth();

    //Make the image be the desired width.
    $imagick->sampleimage($desiredWidth, $imagick->getImageHeight());

    //Now scale, rotate, translate (aka affine project) it
    //to be how you want
    $points = array(//The x scaling factor is 0.5 when the desired width is double
        //the source width
        ($originalWidth / $desiredWidth), 0, //Don't scale vertically
        0, 1, //Offset the image so that it's in the centre
        ($desiredWidth - $originalWidth) / 2, 0);

    $imagick->distortImage(\Imagick::DISTORTION_AFFINEPROJECTION, $points, false);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 

//Fyi it may be easier to think of the affine transform by 
//how it works for a rotation:
//$affineRotate = array(
//    "sx" => cos($angle),
//    "sy" => cos($angle),
//    "rx" => sin($angle),
//    "ry" => -sin($angle),
//    "tx" => 0,
//    "ty" => 0,
//);
}

edgeExtend($virtualPixelType) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z��{y��(tests/143_Imagick_spreadImage_basic.phptnu�[���--TEST--
Test Imagick, spreadImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$radius = 5;

function spreadImage($radius) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->spreadImage($radius);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

spreadImage($radius) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�u��NN)tests/135_Imagick_sharpenImage_basic.phptnu�[���--TEST--
Test Imagick, sharpenImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$radius = 5;
$sigma = 1;
$channel = Imagick::CHANNEL_DEFAULT;

function sharpenImage($radius, $sigma, $channel) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->sharpenimage($radius, $sigma, $channel);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

sharpenImage($radius, $sigma, $channel) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�Hb���3tests/247_ImagickPixelIterator_construct_basic.phptnu�[���--TEST--
Test ImagickPixelIterator, construct
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function construct() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imageIterator = new \ImagickPixelIterator($imagick);

    /* Loop through pixel rows */
    foreach ($imageIterator as $pixels) { 
        /* Loop through the pixels in the row (columns) */
        foreach ($pixels as $column => $pixel) { 
            /** @var $pixel \ImagickPixel */
            if ($column % 2) {
                /* Paint every second pixel black*/
                $pixel->setColor("rgba(0, 0, 0, 0)");
            }
        }
        /* Sync the iterator, this is important to do on each iteration */
        $imageIterator->syncIterator();
    }

    $bytes = $imagick;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

construct() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�E�G��,tests/013-read-filehandle-memory-stream.phptnu�[���--TEST--
Imagick::readImageFile, in-memory stream test
--SKIPIF--
<?php
	require_once(dirname(__FILE__) . '/skipif.inc');
	checkFormatPresent('jpg');
?>
--XFAIL--
This test was recently added (July 2024), and appears to be failing on multiple
versions of PHP. It should be fixed, but doesn't need to hold up a release.
--FILE--
<?php

$handle = fopen('php://memory', 'w+');

$imagick = new Imagick('magick:rose');
$imagick->setImageFormat('jpg');
$imagick->writeImageFile($handle);

$imagick->clear();

rewind($handle);

$imagick->readImageFile($handle);

echo "Width: " . $imagick->getImageWidth() . "\n";
echo "Height: " . $imagick->getImageHeight() . "\n";

echo 'success';

?>
--EXPECT--
Width: 70
Height: 46
success
PKq9�ZUދC((tests/007_thumbnail_fill.phptnu�[���--TEST--
Test filling thumbnail with color
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc');

$v = Imagick::getVersion();
if ($v['versionNumber'] < 0x632)
	die ('skip too old ImageMagick');

if ($v ['versionNumber'] >= 0x660 && $v ['versionNumber'] < 0x670)
	die ('skip seems to be broken in this version of ImageMagick');
?>
--FILE--
<?php

$im = new Imagick("magick:logo");
$im->setImageBackgroundColor("pink");
$im->thumbnailImage(200, 200, true, true);

$color = $im->getImagePixelColor(5, 5);
if ($color->isPixelSimilar("pink", 0))
	echo "Similar" . PHP_EOL;
else
	var_dump ($color->getColorAsString());

$color = $im->getImagePixelColor(199, 5);
if ($color->isPixelSimilar("pink", 0))
	echo "Similar" . PHP_EOL;
else
	var_dump ($color->getColorAsString());
?>
--EXPECT--
Similar
SimilarPKq9�Z�ty�&tests/180_ImagickDraw_matte_basic.phptnu�[���--TEST--
Test ImagickDraw, matte
--SKIPIF--
<?php 
require_once(dirname(__FILE__) . '/skipif.inc'); 
checkClassMethods('ImagickDraw', array('matte'));
?>

--FILE--
<?php

$paintType = 4;
$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function matte($strokeColor, $fillColor, $backgroundColor, $paintType) {
    $draw = new \ImagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);

    $draw->setStrokeWidth(2);
    $draw->setFontSize(72);

    $draw->matte(120, 120, $paintType);
    
    $draw->rectangle(100, 100, 300, 200);
    

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");
    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

matte($strokeColor, $fillColor, $backgroundColor, $paintType) ;
echo "Ok";
?>
--EXPECTF--
Deprecated: %s ImagickDraw::matte() is deprecated in %s
Ok
PKq9�Zћ��(tests/315_Imagick_getImageArtifacts.phptnu�[���--TEST--
Test Imagick, getImageArtifacts
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('getImageArtifacts'));
?>
--FILE--
<?php

function getImageArtifacts() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');
    $artifacts = $imagick->getImageArtifacts();

// TODO - get a better test image with artifact data in it.
//
//    $expectedEntries = [
//        "exif:ApertureValue" => false,
//        "exif:ColorSpace" => false,
//        "exif:CustomRendered" => false,
//        "exif:DateTime" => false,
//        "exif:DateTimeDigitized" => false,
//        "exif:DateTimeOriginal" => false,
//        "exif:ExifOffset" => false,
//        "exif:ExifVersion" => false,
//    ];
//
//    foreach ($artifacts as $key => $value) {
//       if (array_key_exists($key, $expectedEntries) === true) {
//            $expectedEntries[$key] = true;
//        }
//    }
//
//    $any_failed = false;
//    foreach ($expectedEntries as $key => $value) {
//        if ($value !== true) {
//            echo "Expected entry $key was not set\n";
//            $any_failed = true;
//        }
//    }

//    if ($any_failed === true) {
//        var_dump($artifacts);
//    }

    $imagick->getImageBlob();
}

getImageArtifacts();
echo "Ok";
?>
--EXPECTF--
Ok
PKq9�Z4	�zmm!tests/003_cast_color_opacity.phptnu�[���--TEST--
Casting color and opacity to pixel
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php
print "--- Testing casts\n";

try {
	$im = new Imagick();
	$im->newImage(100, 100, "red");
	$im->tintImage("red", "gray(50%)");
	echo "Casting color and opacity succeeded\n";
} catch (Exception $e) {
	echo "Casting color and opacity failed: " , $e->getMessage() . PHP_EOL;
}

try {
	$im = new Imagick();
	$pixel = new ImagickPixel("red");
	$strengthPixel = new ImagickPixel("gray");
	$im->newImage(100, 100, $pixel);
	$im->tintImage($pixel, $strengthPixel);
	echo "Setting color and opacity without cast succeeded\n";
} catch (Exception $e) {
	echo "Setting color and opacity without cast failed: " , $e->getMessage() . PHP_EOL;
}

?>
--EXPECTF--
--- Testing casts
Casting color and opacity succeeded
Setting color and opacity without cast succeededPKq9�Z��nk""+tests/265_ImagickDraw_getOpacity_basic.phptnu�[���--TEST--
Test ImagickDraw, getOpacity
--SKIPIF--
<?php 
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('ImagickDraw', array('setOpacity'));
requirePHP("5.5.0");
?>

--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';



$draw = new \ImagickDraw();

$draw->setStrokeColor($strokeColor);
$draw->setFillColor($fillColor);

$draw->setStrokeWidth(2);
$draw->setFontSize(72);

$opacityToSet = 0.1;

$draw->setOpacity($opacityToSet);
$opacity = $draw->getOpacity();

$delta = abs($opacity - $opacityToSet);
if ($delta > 0.0001) {
	echo "Failed to get correct opacity, it should be $opacityToSet but got $opacity, which is a delta of $delta\n";
}

$draw->line(125, 70, 100, 50);
$draw->line(350, 170, 100, 150);

$imagick = new \Imagick();
$imagick->newImage(500, 500, $backgroundColor);
$imagick->setImageFormat("png");
$imagick->drawImage($draw);




$bytes = $imagick->getImageBlob();
if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 



echo "Ok";
?>
--EXPECTF--
OkPKq9�Z®.�==tests/330_Imagick_newImage.phptnu�[���--TEST--
Test Imagick, newImage
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');

?>
--FILE--
<?php


$image = new Imagick();
$image->newImage(100, 100, new ImagickPixel('red'), 'png');

// Image format case changed at some point in IM
echo strtolower($image->getImageFormat());
echo "\n";

$image = new Imagick();
$image->newImage(100, 100, 'blue', null);

try {
    $image->getImageFormat();
    echo "Failed to throw exception";
}
catch (ImagickException $ie) {
    echo $ie->getMessage() . "\n";
}

echo "Ok";
?>
--EXPECTF--
png
Image has no format
Ok
PKq9�Z�}��EE)tests/300_Imagick_autoThresholdImage.phptnu�[���--TEST--
Test Imagick, autoThresholdImage
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('autoThresholdImage'));
?>
--FILE--
<?php


function autoThresholdImage() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');
    $imagick->autoThresholdImage(Imagick::AUTO_THRESHOLD_OTSU);
    $imagick->writeImage(__DIR__ . '/autoThresholdImage_output_image.png');
//    $imagick->getImageBlob();
}

autoThresholdImage() ;
echo "Ok";
?>
--CLEAN--
<?php
@unlink(__DIR__ . '/autoThresholdImage_output_image.png');
?>
--EXPECTF--
Ok
PKq9�Z����3tests/030_Imagick_adaptiveThresholdImage_basic.phptnu�[���--TEST--
Test Imagick, adaptiveThresholdImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc'); 
?>
--FILE--
<?php

$width = 50;
$height = 20;
$adaptiveOffset = 0.125;

function adaptiveThresholdImage($width, $height, $adaptiveOffset) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $adaptiveOffsetQuantum = intval($adaptiveOffset * \Imagick::getQuantum());
    $imagick->adaptiveThresholdImage($width, $height, $adaptiveOffsetQuantum);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

adaptiveThresholdImage($width, $height, $adaptiveOffset) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z���S##+tests/268_ImagickDraw_getDensity_basic.phptnu�[���--TEST--
Test ImagickDraw, getDensity
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('ImagickDraw', array('getDensity', 'setDensity'));
?>
--XFAIL--
Expected behaviour is not known :-p
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

$draw = new \ImagickDraw();

$draw->setStrokeColor($strokeColor);
$draw->setFillColor($fillColor);

$draw->setStrokeWidth(2);
$draw->setFontSize(72);

$opacityToSet = 0.1;

$densitySet = "200";


$draw->setDensity($densitySet);
$densityGet = $draw->getDensity();

if (strcmp($densitySet, $densityGet) !== 0) {
	echo "Density retrieved [$densityGet] is not the value set [$densitySet].";
}

$draw->line(125, 70, 100, 50);
$draw->line(350, 170, 100, 150);

$imagick = new \Imagick();
$imagick->newImage(500, 500, $backgroundColor);
$imagick->setImageFormat("png");
$imagick->drawImage($draw);

$bytes = $imagick->getImageBlob();
if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 

echo "Ok";

?>
--EXPECTF--
OkPKq9�Zj����+tests/097_Imagick_newPseudoImage_basic.phptnu�[���--TEST--
Test Imagick, newPseudoImage
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$canvasType = 'gradient:red';

function newPseudoImage($canvasType) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(300, 300, $canvasType);
    $imagick->setImageFormat("png");
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

newPseudoImage($canvasType) ;
echo "Ok";
?>
--EXPECTF--
Ok
PKq9�Z�h�VV)tests/245_Tutorial_screenEmbed_basic.phptnu�[���--TEST--
Test Tutorial, screenEmbed
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function screenEmbed() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");

    $overlay = new \Imagick();
    $overlay->newPseudoImage(640, 480, "magick:logo");

    $overlay->setImageVirtualPixelMethod(\Imagick::VIRTUALPIXELMETHOD_TRANSPARENT);

    $width = $overlay->getImageWidth();
    $height = $overlay->getImageHeight();

    $offset = 332.9;

    $points = array(    
        0, 0, 364 - $offset, 51, 
        $width, 0, 473.4 - $offset, 23, 
        0, $height, 433.5 - $offset, 182, 
        $width, $height, 523 - $offset, 119.4
    );

    $overlay->modulateImage(97, 100, 0);
    $overlay->distortImage(\Imagick::DISTORTION_PERSPECTIVE, $points, true);

    $imagick->compositeImage($overlay, \Imagick::COMPOSITE_OVER, (int)(364.5 - $offset), 23);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

screenEmbed() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�#�FF/tests/133_Imagick_setSamplingFactors_basic.phptnu�[���--TEST--
Test Imagick, setSamplingFactors
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php


function setSamplingFactors() {

    $imagePath = "../imagick/images/FineDetail.png";
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->setImageFormat('jpg');
    $imagick->setSamplingFactors(array('2x2', '1x1', '1x1'));

    $compressed = $imagick->getImageBlob();

    
    $reopen = new \Imagick();
    $reopen->readImageBlob($compressed);

    $reopen->resizeImage(
        $reopen->getImageWidth() * 4,
        $reopen->getImageHeight() * 4,
        \Imagick::FILTER_POINT,
        1
    );
    
    $bytes = $reopen->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setSamplingFactors() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z��a~��/tests/221_ImagickDraw_setStrokeWidth_basic.phptnu�[���--TEST--
Test ImagickDraw, setStrokeWidth
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setStrokeWidth($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $draw->setStrokeWidth(1);
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->line(100, 100, 400, 145);
    $draw->rectangle(100, 200, 225, 350);
    $draw->setStrokeWidth(5);
    $draw->line(100, 120, 400, 165);
    $draw->rectangle(275, 200, 400, 350);

    $image = new \Imagick();
    $image->newImage(500, 400, $backgroundColor);
    $image->setImageFormat("png");
    $image->drawImage($draw);

    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setStrokeWidth($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z��t�$$tests/bug_72226.phptnu�[���--TEST--
Allow Imagick exceptions to be extended.
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php
error_reporting( E_ALL ); 

ini_set( "display_errors", true );

class UserlandImagickException extends ImagickException {}
class UserlandImagickDrawException extends ImagickDrawException {}
class UserlandImagickPixelException extends ImagickPixelException {}

if (class_exists('ImagickKernelException', false) == true) {
	class UserlandImagickKernelException extends ImagickKernelException
	{
	}
}

?>
--EXPECTF--
PKq9�ZJ
d�~~Ctests/183_ImagickDraw_pathCurveToQuadraticBezierAbsolute_basic.phptnu�[���--TEST--
Test ImagickDraw, pathCurveToQuadraticBezierAbsolute
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function pathCurveToQuadraticBezierAbsolute($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $draw->setStrokeOpacity(1);
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);

    $draw->setStrokeWidth(2);
    $draw->setFontSize(72);

    $draw->pathStart();
    $draw->pathMoveToAbsolute(50,250);

    // This specifies a quadratic bezier curve with the current position as the start
    // point, the control point is the first two params, and the end point is the last two params.
    $draw->pathCurveToQuadraticBezierAbsolute(
        150,50, 
        250,250
    );

    // This specifies a quadratic bezier curve with the current position as the start
    // point, the control point is mirrored from the previous curves control point
    // and the end point is defined by the x, y values.
    $draw->pathCurveToQuadraticBezierSmoothAbsolute(
        450,250
    );

    // This specifies a quadratic bezier curve with the current position as the start
    // point, the control point is mirrored from the previous curves control point
    // and the end point is defined relative from the current position by the x, y values.
    $draw->pathCurveToQuadraticBezierSmoothRelative(
        200,-100
    );

    $draw->pathFinish();

    $imagick = new \Imagick();
    $imagick->newImage(700, 500, $backgroundColor);
    $imagick->setImageFormat("png");

    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 

}

pathCurveToQuadraticBezierAbsolute($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Zy<mAA1tests/218_ImagickDraw_setStrokeLineCap_basic.phptnu�[���--TEST--
Test ImagickDraw, setStrokeLineCap
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setStrokeLineCap($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(25);

    $lineTypes = array(\Imagick::LINECAP_BUTT, \Imagick::LINECAP_ROUND, \Imagick::LINECAP_SQUARE,);

    $offset = 0;

    foreach ($lineTypes as $lineType) {
        $draw->setStrokeLineCap($lineType);
        $draw->line(50 + $offset, 50, 50 + $offset, 250);
        $offset += 50;
    }

    $imagick = new \Imagick();
    $imagick->newImage(300, 300, $backgroundColor);
    $imagick->setImageFormat("png");
    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setStrokeLineCap($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Zb�s8VV<tests/249_ImagickPixelIterator_getNextIteratorRow_basic.phptnu�[���--TEST--
Test ImagickPixelIterator, getNextIteratorRow
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function getNextIteratorRow() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imageIterator = $imagick->getPixelIterator();

    $count = 0;
    while ($pixels = $imageIterator->getNextIteratorRow()) {
        if (($count % 3) == 0) {
            /* Loop through the pixels in the row (columns) */
            foreach ($pixels as $column => $pixel) { 
                /** @var $pixel \ImagickPixel */
                if ($column % 2) {
                    /* Paint every second pixel black*/
                    $pixel->setColor("rgba(0, 0, 0, 0)");
                }
            }
            /* Sync the iterator, this is important to do on each iteration */
            $imageIterator->syncIterator(); 
        }

        $count += 1;
    }

    $bytes = $imagick;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

getNextIteratorRow() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�*~�{{0tests/075_Imagick_floodFillPaintImage_basic.phptnu�[���--TEST--
Test Imagick, floodFillPaintImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$fillColor = 'rgb(0, 0, 0)';
$fuzz = 0.2;
$targetColor = 'rgb(245, 124, 24)';
$x = 260;
$y = 150;
$inverse = 0;
$channel = Imagick::CHANNEL_DEFAULT;

function floodFillPaintImage($fillColor, $fuzz, $targetColor, $x, $y, $inverse, $channel) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    
    $imagick->floodFillPaintImage(
        $fillColor,
        $fuzz * \Imagick::getQuantum(),
        $targetColor,
        $x, $y,
        $inverse,
        $channel
    );
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

floodFillPaintImage($fillColor, $fuzz, $targetColor, $x, $y, $inverse, $channel) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�S`ff-tests/118_Imagick_setImageArtifact_basic.phptnu�[���--TEST--
Test Imagick, setImageArtifact
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function setImageArtifact() {
    $src1 = new \Imagick();
    $src1->newPseudoImage(640, 480, "magick:logo");
    
    $src2 = new \Imagick();
    $src2->newPseudoImage(480, 640, "magick:WIZARD");

    $compose_args = $src2->getImageArtifact('compose:args');
    var_dump($compose_args);

    $src2->setImageVirtualPixelMethod(\Imagick::VIRTUALPIXELMETHOD_TRANSPARENT);
    $src2->setImageArtifact('compose:args', "1,0,-0.5,0.5");
    $src1->compositeImage($src2, Imagick::COMPOSITE_MATHEMATICS, 0, 0);

    $compose_args = $src2->getImageArtifact('compose:args');
    var_dump($compose_args);

    $src2->setImageArtifact('compose:args', null);
    $compose_args2 = $src2->getImageArtifact('compose:args');
    var_dump($compose_args2);

    $src1->setImageFormat('png');
    $bytes = $src1->getImagesBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setImageArtifact() ;
echo "Ok";
?>
--EXPECTF--
NULL
string(12) "1,0,-0.5,0.5"
NULL
OkPKq9�Z*��-tests/165_Imagick_unsharpMaskImage_basic.phptnu�[���--TEST--
Test Imagick, unsharpMaskImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$radius = 5;
$sigma = 1;
$amount = 5;
$unsharpThreshold = 0;
$channel = Imagick::CHANNEL_DEFAULT;

function unsharpMaskImage($radius, $sigma, $amount, $unsharpThreshold) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->unsharpMaskImage($radius, $sigma, $amount, $unsharpThreshold);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

unsharpMaskImage($radius, $sigma, $amount, $unsharpThreshold) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�m

2tests/279_ImagickDraw_setTextInterlineSpacing.phptnu�[���--TEST--
Test ImagickDraw:: setTextInterlineSpacing
--SKIPIF--
<?php
$minimumVersions = ['6.9.8-6', '7.0.5-7'];
require_once(dirname(__FILE__) . '/skipif.inc');

?>
--FILE--
<?php

require_once(dirname(__FILE__) . '/functions.inc');

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

$interlineSpacings = [0, 16, 24, 36];

$imageHeights = [];

foreach ($interlineSpacings as $interlineSpacing) {

    $draw = new \ImagickDraw();

    setFontForImagickDraw($draw);

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);

    $draw->setStrokeWidth(2);
    $draw->setFontSize(56);

    $draw->setFontSize(16);
    $draw->setStrokeAntialias(true);
    $draw->setTextAntialias(true);
    $draw->setFillColor('#ff0000');
    $draw->setTextInterlineSpacing($interlineSpacing);

    $imagick = new \Imagick();
    $imagick->newImage(600, 600, "rgb(230, 230, 230)");
    $imagick->setImageFormat('png');
    $imagick->annotateImage($draw, 30, 40, 0, "Line 1\nLine 2\nLine 3");
    $imagick->trimImage(0);
    $imagick->setImagePage($imagick->getimageWidth(), $imagick->getimageheight(), 0, 0);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) {
        die("Failed to generate image.");
    }

    $imageHeights[$interlineSpacing] = $imagick->getImageHeight();

    $imagick->writeImage(__DIR__ . "/interline_spacing_test_$interlineSpacing.png");
}


$previousHeight = null;

foreach ($imageHeights as $interlineSpacing => $imageHeight) {
    if ($previousHeight !== null) {
        $differenceFromPrevious = $imageHeight - $previousHeight;
        if ($differenceFromPrevious < 15) {
            echo "textInterlineSpacing of $interlineSpacing only resulted in extra height of $differenceFromPrevious\n";
        }
    }

    $previousHeight = $imageHeight;
}

echo "Ok";
?>
--CLEAN--
<?php
$interlineSpacings = [0, 16, 24, 36];
foreach ($interlineSpacings as $interlineSpacing) {
    @unlink(__DIR__ . "/interline_spacing_test_$interlineSpacing.png");
}

?>
--EXPECTF--
Ok
PKq9�ZO=6��.tests/163_Imagick_uniqueImageColors_basic.phptnu�[���--TEST--
Test Imagick, uniqueImageColors
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function uniqueImageColors() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    //Reduce the image to 256 colours nicely.
    $imagick->quantizeImage(256, \Imagick::COLORSPACE_YIQ, 0, false, false);
    $imagick->uniqueImageColors();
    $imagick->scaleimage($imagick->getImageWidth(), $imagick->getImageHeight() * 20);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

uniqueImageColors() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z������'tests/052_Imagick_distortImage_Arc.phptnu�[���--TEST--
Test Imagick, distortImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$distortion = 1;

        //Make some text arc around the center of it's image
//        convert logo: -resize x150 -gravity NorthEast -crop 100x100+10+0! \
//        \( -background none label:'IM Examples' \
//        -virtual-pixel Background +distort Arc '270 50 20' \
//        -repage +75+21\! \)  -flatten  arc_overlay.jpg

        $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
        $degrees = array( 180 );
        $imagick->setimagebackgroundcolor("#fad888");
        $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_BACKGROUND );
        $imagick->distortImage( \Imagick::DISTORTION_ARC, $degrees, TRUE );
        header( "Content-Type: image/jpeg" );
    $bytes = $imagick;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 

echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�T�bb,tests/206_ImagickDraw_setFontSize_basic.phptnu�[���--TEST--
Test ImagickDraw, setFontSize
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

require_once(dirname(__FILE__) . '/functions.inc');

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setFontSize($fillColor, $strokeColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    setFontForImagickDraw($draw);

    $draw->setStrokeOpacity(1);
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(2);

    $sizes = array(24, 36, 48, 60, 72);

    foreach ($sizes as $size) {
        $draw->setFontSize($size);
        $draw->annotation(50, ($size * $size / 16), "Lorem Ipsum!");
    }

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");
    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setFontSize($fillColor, $strokeColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�	���tests/bug_66098.phptnu�[���--TEST--
Bug #66098	Check that there is no segfault from zval_addref_p
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc');
--FILE--
<?php

$img = new Imagick();
echo $img->foobar;

echo "OK";

?>
--EXPECT--
OKPKq9�Z����/tests/208_ImagickDraw_setFontStretch_basic.phptnu�[���--TEST--
Test ImagickDraw, setFontStretch
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

require_once(dirname(__FILE__) . '/functions.inc');

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setFontStretch($fillColor, $strokeColor, $backgroundColor) {

    $draw = new \ImagickDraw();
    setFontForImagickDraw($draw);

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(2);
    $draw->setFontSize(36);

    $fontStretchTypes = array(\Imagick::STRETCH_ULTRACONDENSED, \Imagick::STRETCH_CONDENSED, \Imagick::STRETCH_SEMICONDENSED, \Imagick::STRETCH_SEMIEXPANDED, \Imagick::STRETCH_EXPANDED, \Imagick::STRETCH_EXTRAEXPANDED, \Imagick::STRETCH_ULTRAEXPANDED, \Imagick::STRETCH_ANY);

    $offset = 0;
    foreach ($fontStretchTypes as $fontStretch) {
        $draw->setFontStretch($fontStretch);
        $draw->annotation(50, 75 + $offset, "Lorem Ipsum!");
        $offset += 50;
    }

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");
    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setFontStretch($fillColor, $strokeColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�ZD	a�fftests/295_Imagick_setSeed.phptnu�[���--TEST--
Test Imagick, setSeed
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('setSeed'));
?>
--FILE--
<?php


function setSeed() {

	Imagick::setSeed(50);

    $imagick = new \Imagick();
    $imagick->newPseudoImage(256, 256, "plasma:tomato-steelblue");

//    $imagick->writeImage(__DIR__ . '/cannyEdgeImage_output_image.png');
//    $imagick->getImageBlob();

	Imagick::setSeed(50);

    $imagick = new \Imagick();
    $imagick->newPseudoImage(256, 256, "plasma:tomato-steelblue");

    // TODO - compare images.
}

setSeed() ;
echo "Ok";
?>
--EXPECTF--
Ok
PKq9�Z�U���.tests/051_Imagick_distortImage_Projection.phptnu�[���--TEST--
Test Imagick, distortImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$distortion = 1;

        $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
        $points = array( 
            0.9,0.3,
            -0.2,0.7,
            20,15
        );
        $imagick->setimagebackgroundcolor("#fad888");
        $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_BACKGROUND );
        $imagick->distortImage( \Imagick::DISTORTION_AFFINEPROJECTION, $points, TRUE );
        header( "Content-Type: image/jpeg" );
    $bytes = $imagick;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 

echo "Ok";
?>
--EXPECTF--
OkPKq9�ZnS,�1tests/031_Imagick_affineTransformImage_basic.phptnu�[���--TEST--
Test Imagick, affineTransformImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
if (PHP_OS_FAMILY == 'Windows') die('skip dither is apparently borken on Windows https://github.com/Imagick/imagick/issues/590');
?>
--XFAIL--
I don't understand what values are returned in which elements of getImageChannelStatistics
--FILE--
<?php


function checkAllStatsAreValue($channelStatistics, $value) {

    if ($channelStatistics[Imagick::CHANNEL_RED]['mean'] != $value) {
        echo "Channel red is wrong " . $channelStatistics[Imagick::CHANNEL_RED]['mean'] . " vs " . $value. "\n";
    }
    if ($channelStatistics[Imagick::CHANNEL_GREEN]['mean'] != $value) {
        echo "Channel green is wrong " . $channelStatistics[Imagick::CHANNEL_GREEN]['mean'] . " vs " . $value. "\n";
    }
    if ($channelStatistics[Imagick::CHANNEL_BLUE]['mean'] != $value) {
        echo "Channel blue is wrong " . $channelStatistics[Imagick::CHANNEL_BLUE]['mean'] . " vs " . $value. "\n";
    }

    echo "Stats checked\n";
}

function affineTransformImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 640, "xc:black");
    $draw = new \ImagickDraw();

    $angle = deg2rad(45);
    //$angle = deg2rad(3);

    $draw->setFillColor('white');
    $draw->setStrokeColor('white');
    $draw->setStrokeWidth(10.0);
    $draw->setStrokeLineCap(Imagick::LINECAP_SQUARE);
    $draw->setStrokeLineJoin(Imagick::LINEJOIN_BEVEL);

    $draw->line(
        $start_x = -50,
        $start_y = -50,
        $end_x = 690,
        $end_y = 690
    );

    $imagick->drawImage($draw);

    $draw = new \ImagickDraw();

    $affineRotate = array(
        "sx" => cos($angle), "sy" => cos($angle), 
        "rx" => sin($angle), "ry" => -sin($angle), 
        "tx" => 0, "ty" => 0,
    );

    $draw->affine($affineRotate);

    $imagick->setImageVirtualPixelMethod(Imagick::VIRTUALPIXELMETHOD_BLACK);
    $imagick->affineTransformImage($draw);
    $imagick->setImagePage($imagick->getimageWidth(), $imagick->getimageheight(), 0, 0);

    $imagick->cropImage(
        $imagick->getImageWidth() - 40,
        $imagick->getImageHeight() - 40,
        20,
        20
    );

    $imagick->setImageFormat('png');
    $imagick->writeImage(__DIR__ . '/test_031.png');


    $lineCheckBlack = clone $imagick;
    $blackout = new \ImagickDraw();
    $blackout->setStrokeColor('black');
    $blackout->setFillColor('black');
    $blackout->rectangle(
        ($lineCheckBlack->getImageWidth() / 2) - 20,
        0,
        ($lineCheckBlack->getImageWidth() / 2) + 20,
        $lineCheckBlack->getImageHeight()
    );

    $lineCheckBlack->drawImage($blackout);
    // $lineCheckBlack->writeImage(__DIR__ . '/test_031_blank.png');

    $whiteout = new \ImagickDraw();
    $lineCheckWhite = clone $imagick;
    $whiteout->setStrokeColor('white');
    $whiteout->setFillColor('white');
    $whiteout->rectangle(
        ($lineCheckBlack->getImageWidth() / 2) - 4,
        0,
        0,
        $lineCheckBlack->getImageHeight()
    );
    $whiteout->rectangle(
        ($lineCheckWhite->getImageWidth() / 2) + 4,
        0,
        $lineCheckWhite->getImageWidth(),
        $lineCheckWhite->getImageHeight()
    );

    $lineCheckWhite->drawImage($whiteout);
    // $lineCheckWhite->writeImage(__DIR__ . '/test_031_white.png');

    $channelStatistics = $lineCheckWhite->getImageChannelStatistics();

    echo "Checking white\n";
    checkAllStatsAreValue($channelStatistics, Imagick::getQuantum());


    $channelStatistics = $lineCheckBlack->getImageChannelStatistics();
//    var_dump(
//        "lineCheckBlack channel stats are:",
//        $channelStatistics
//    );

    echo "Checking black\n";
    checkAllStatsAreValue($channelStatistics, 0);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";}
}

affineTransformImage() ;
echo "Ok";
?>
--CLEAN--
<?php
$f = __DIR__ . "/test_031.png";
if (file_exists($f)) {
    @unlink($f);
}
?>
--EXPECTF--
Checking white
Stats checked
Checking black
Stats checked
Ok
PKq9�Z��oo.tests/081_Imagick_getImageHistogram_basic.phptnu�[���--TEST--
Test Imagick, getImageHistogram
--SKIPIF--
<?php 
require_once(dirname(__FILE__) . '/skipif.inc');
checkFormatPresent('png');
?>
--FILE--
<?php


function getColorStatistics($histogramElements, $colorChannel) {
    $colorStatistics = array();

    foreach ($histogramElements as $histogramElement) {
        //So broken. Wow. Much surprise. Sad. Bad. Sad, bad, sad.
        //$color = $histogramElement->getColorValueQuantum($colorChannel);
        $color = $histogramElement->getColorValue($colorChannel);
        $color = intval($color * 255);
        $count = $histogramElement->getColorCount();

        if (array_key_exists($color, $colorStatistics)) {
            $colorStatistics[$color] += $count;
        }
        else {
            $colorStatistics[$color] = $count;
        }
    }

    ksort($colorStatistics);
    
    return $colorStatistics;
}
    


function getImageHistogram() {

    $backgroundColor = 'black';

    $draw = new \ImagickDraw();
    $draw->setStrokeWidth(0); //Lines have a wi

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");
    $imagick->drawImage($draw);

    $histogramWidth = 256;
    $histogramHeight = 100; // the height for each RGB segment

    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    //Resize the image to be small, otherwise PHP tends to run out of memory
    //This might lead to bad results for images that are pathologically 'pixelly'
    $imagick->adaptiveResizeImage(200, 200, true);
    $histogramElements = $imagick->getImageHistogram();

    $histogram = new \Imagick();
    $histogram->newpseudoimage($histogramWidth, $histogramHeight * 3, 'xc:black');
    $histogram->setImageFormat('png');

    $getMax = function ($carry, $item)  {
        if ($item > $carry) {
            return $item;
        }
        return $carry;
    };

    $colorValues = array(
        'red' => getColorStatistics($histogramElements, \Imagick::COLOR_RED),
        'lime' => getColorStatistics($histogramElements, \Imagick::COLOR_GREEN),
        'blue' => getColorStatistics($histogramElements, \Imagick::COLOR_BLUE),
    );

    $max = array_reduce($colorValues['red'] , $getMax, 0);
    $max = array_reduce($colorValues['lime'] , $getMax, $max);
    $max = array_reduce($colorValues['blue'] , $getMax, $max);

    $scale =  $histogramHeight / $max;

    $count = 0;
    foreach ($colorValues as $color => $values) {
        $draw->setstrokecolor($color);

        $offset = ($count + 1) * $histogramHeight;

        foreach ($values as $index => $value) {
            $draw->line($index, $offset, $index, $offset - ($value * $scale));
        }
        $count++;
    }

    $histogram->drawImage($draw);
    $bytes = $histogram->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

getImageHistogram();
echo "Ok";
?>
--EXPECTF--
OkPKq9�ZJB���*tests/069_Imagick_equalizeImage_case1.phptnu�[���--TEST--
Test Imagick, equalizeImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function equalizeImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->equalizeImage();
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

equalizeImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z��ɥ�)tests/060_Imagick_distortImage_Polar.phptnu�[���--TEST--
Test Imagick, distortImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$distortion = 1;

        //v6.4.2-6
        $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
        $points = array(
            0
        );     

        $imagick->setimagebackgroundcolor("#fad888");
        $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_BACKGROUND);
        $imagick->distortImage(\Imagick::DISTORTION_DEPOLAR, $points, TRUE);
    $bytes = $imagick;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 

echo "Ok";
?>
--EXPECTF--
OkPKq9�Z����tests/Biter_500.jpgnu�[������JFIF,,���Photoshop 3.08BIMIZ%G?094042+1000>20110723720110723<094042+10008BIM%yb6㏣���|s����XICC_PROFILEHLinomntrRGB XYZ �	1acspMSFTIEC sRGB���-HP  cprtP3desc�lwtpt�bkptrXYZgXYZ,bXYZ@dmndTpdmdd��vuedL�view�$lumi�meas$tech0rTRC<gTRC<bTRC<textCopyright (c) 1998 Hewlett-Packard CompanydescsRGB IEC61966-2.1sRGB IEC61966-2.1XYZ �Q�XYZ XYZ o�8��XYZ b����XYZ $����descIEC http://www.iec.chIEC http://www.iec.chdesc.IEC 61966-2.1 Default RGB colour space - sRGB.IEC 61966-2.1 Default RGB colour space - sRGBdesc,Reference Viewing Condition in IEC61966-2.1,Reference Viewing Condition in IEC61966-2.1view��_.���\�XYZ L	VPW�meas�sig CRT curv
#(-27;@EJOTY^chmrw|�������������������������
%+28>ELRY`gnu|����������������&/8AKT]gqz������������!-8COZfr~���������� -;HUcq~���������
+:IXgw��������'7HYj{�������+=Oat�������2FZn�������		%	:	O	d	y	�	�	�	�	�	�

'
=
T
j
�
�
�
�
�
�"9Qi������*C\u�����


&
@
Z
t
�
�
�
�
�.Id����	%A^z����	&Ca~����1Om����&Ed����#Cc����'Ij����4Vx���&Il����Ae����@e���� Ek���*Qw���;c���*R{���Gp���@j���>i���  A l � � �!!H!u!�!�!�"'"U"�"�"�#
#8#f#�#�#�$$M$|$�$�%	%8%h%�%�%�&'&W&�&�&�''I'z'�'�(
(?(q(�(�))8)k)�)�**5*h*�*�++6+i+�+�,,9,n,�,�--A-v-�-�..L.�.�.�/$/Z/�/�/�050l0�0�11J1�1�1�2*2c2�2�3
3F33�3�4+4e4�4�55M5�5�5�676r6�6�7$7`7�7�88P8�8�99B99�9�:6:t:�:�;-;k;�;�<'<e<�<�="=a=�=�> >`>�>�?!?a?�?�@#@d@�@�A)AjA�A�B0BrB�B�C:C}C�DDGD�D�EEUE�E�F"FgF�F�G5G{G�HHKH�H�IIcI�I�J7J}J�KKSK�K�L*LrL�MMJM�M�N%NnN�OOIO�O�P'PqP�QQPQ�Q�R1R|R�SS_S�S�TBT�T�U(UuU�VV\V�V�WDW�W�X/X}X�YYiY�ZZVZ�Z�[E[�[�\5\�\�]']x]�^^l^�__a_�``W`�`�aOa�a�bIb�b�cCc�c�d@d�d�e=e�e�f=f�f�g=g�g�h?h�h�iCi�i�jHj�j�kOk�k�lWl�mm`m�nnkn�ooxo�p+p�p�q:q�q�rKr�ss]s�ttpt�u(u�u�v>v�v�wVw�xxnx�y*y�y�zFz�{{c{�|!|�|�}A}�~~b~�#��G���
�k�͂0����W�������G����r�ׇ;����i�Ή3�����d�ʋ0�����c�ʍ1�����f�Ώ6����n�֑?����z��M��� ����_�ɖ4���
�u��L���$�����h�՛B��������d�Ҟ@��������i�ءG���&����v��V�ǥ8��������n��R�ĩ7�������u��\�ЭD���-�������u��`�ֲK�³8���%�������y��h��Y�ѹJ�º;���.���!������
�����z���p��g���_���X���Q���K���F���Aǿ�=ȼ�:ɹ�8ʷ�6˶�5̵�5͵�6ζ�7ϸ�9к�<Ѿ�?��D���I���N���U���\���d���l���v�ۀ�܊�ݖ�ޢ�)߯�6��D���S���c���s���
����2��F���[���p�����(��@���X���r�����4��P��m��������8��W��w����)���K��m�����ExifMM*	z
���(1*�2ȇi�CanonCanon EOS 5D,,Adobe Photoshop Lightroom 3.5 (Macintosh)2012:07:25 23:40:21��&��.�"�'��0230�6�J�
^�f�
n�v��	�
~��������������1
��2��4��2011:07:23 09:40:422011:07:23 09:40:421�����AE�Q,930602934FEF24-70mm f/2.8L USM��/http://ns.adobe.com/xap/1.0/<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0">
   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description rdf:about=""
            xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">
         <photoshop:DateCreated>2011-07-23T09:40:42+10:00</photoshop:DateCreated>
      </rdf:Description>
      <rdf:Description rdf:about=""
            xmlns:aux="http://ns.adobe.com/exif/1.0/aux/">
         <aux:SerialNumber>930602934</aux:SerialNumber>
         <aux:Lens>EF24-70mm f/2.8L USM</aux:Lens>
         <aux:LensID>230</aux:LensID>
         <aux:Firmware>1.1.1</aux:Firmware>
         <aux:ImageNumber>12</aux:ImageNumber>
         <aux:FlashCompensation>0/1</aux:FlashCompensation>
      </rdf:Description>
   </rdf:RDF>
</x:xmpmeta>
��C	
	
	
	

��C����"��	
���}!1AQa"q2���#B��R��$3br�	
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz������������������������������������������������������������������������	
���w!1AQaq"2�B����	#3R�br�
$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�����������������������������������������������������������������������?ԟS�S��R���k#��S?�H�6δ�v��`�C�]�My�������t�&���
I;��G��9�؊n9�SEԁ��`�x&�$hI/�׭R��#�V��ޫ�۳S&m;Qn+�չ&�;�-��?�G��<����pW⑔z�uќ�O�U�\��;�Y��j�O��k�<^��k�<F�;W�\���T�T�/�j�0"�^����J��H���T���GDV���*�EB���N����&N�Tь㊎5���3Y���ّ��.��|p:ӌ"N�i�!���$��Pm�n��'�@�&O�S���,�pXT�1�z�li\�G�P�ԡ8����dM<�m� �4��CDd})�8�H�3��=��l��1I�x���l��8�!Ni��&��5b2��y��3�Mc�i�
�\f��h�T�]�zұ�7<�F�H.#�)��ӛ���Ȧ&�DFz�Tl�`U��r8I�r��6f���4ɪ!�#�iJc�<�y�H�3V+��1J(�Q����LU<�c�r���P�K(�N4�l* ��ր��m�QɎ��W�TBO�S�&�j橓��;�㊉q�Ӂ��Lw�h�Oݢ��z��K������.�|�?Z�-�y9��;8Gk�'&�Ǣ���zۗ��?j��y�?�l$,5�xfŲ��ln��^�ۃ�u�ReEr�`Ev:u�@�l�E��"��,0��#E��f�2����?��>j���ʞ��kPpՄ���&��z�O.C��gup~%���z�e'��~.L��^i�D;�5�~.�ϯ�y���ö}k�������H���o�qK�J�=q�f�C�5=G526�*r8����J�=���d�d�7W&��*x�7<T��<�6]�iZ�S�VI	"I��ޡ���A�����d�ަF��ԙGN��@����64�����L�`��v�4�'|q�x�M+�F���~��ԇ�4��M �#'�RgiǽFNJ��K�3z����!9��[�!ɋ���~���sH[B��x9��Swq�&z�a��/A֚hS�W+Q�g�&�ݩs�v�w4'q4#t��g�HO�L+��$�n4�`T�rx�0#&�;�ƞ�ZcS���TD��T�-�L��:撔�6�.�t����G��9�!�"�&�J���|n~�-H�3��N��WC��j�	k6�R,+dT��^�M�Jz�osT�,T�N+�9��U�RӼ(?���A��aF2�V����+^��p3_�4~8��O��Hڵ�hZHL*-2�8�t�=�N*K5�
�x�����V^�g�h���������o��W���-����4F5�_-s��?)�u�pqӵs�ݾ�X��<�����SW����G�15�T�^-�
��>(��8�ռ]߯2�L_;dW��=�/C�q��P��I$cy��¸�Z1�����M8/)Uy�l�Dtc֥��Jx��6͢�'S��i?Jr�R]��֤L�ud��J���,}:��z�jh�֡�"d��OTH٧�� ܑzӺT{����P��#`SqJ[�i�E�+��=)�҂�Rj���bb���7I|�P�5QR��S�ck���j&�ү�֑ͫ[.�^+Y%��}k�φ_�KO��������\Nu���?vH�Gֽ\�*��s{+i��s,ކY��o�c����[�6Z���'d>Ӝ�����k���O��ſ�o��3�t֌��<�c� s����߱ޝ{m�x��ۢ�L�� 0!��|v��Z�A����Ӻ��$�T�Q~���h�c@�ơ�],4Yno$�D��5�x���<�G���G��OrA�i+g��v��ӿf]_�7��xQɷeDG$wS��_{Cm�_�	�ϩ��=����	e������.�i5>���'1�ag	R�p��G�pp:�2I�ӭS�	��;�sima�_DЫ�H�g��5��?d�_�?�O
��_�V���:�Ϯ85��w��e~k�i��$�cܣ𴯯Sȳ�֌|ܚ����+�|C�)�{mZ����l���N@�#��}�{�d���Q$r�L�O2�+NA��Ɣ��ή�����g�\S��/������z��pM}�C���7�[o�$�x$u��|��|�#�������WVm\��39QwI�^�)ϥ���!�ƞ=*7<�*F����Ԃ'&�c�O~i�*�hk9�I���~i���ֆR��4�n8��3NW=
��4�>�
��$�ղjdR,)��H��9���hN��g"�n6�S�s�U�<T�޵�������E7�Ҋ�KO����,��*����iXŜW�ㆎ�5�i܌�6��1]6��2(�o��8��������Һ[H�Q�q�#�M��#�WV>)�ŕ8�#H��k��"�Nk����q\��Ռ��M�}�(�<W�x�8bk�|Kޯ;�Rn
\�N�,��Ǎ��^g☹5�,^Z�����x����t����B/s�����?�[=��\R���@�4�k�sڜ4��Nj
���`Ӏ�ɦ���"{�l�r.jU�1�Z�)6KC�i��MQ�R�r^���qN�q֐�HV�W��L�N֕�qrH���<#{�m�L��A��j瀾j?uAo��d=��t������xY!<����`��3��攰�Ǚsv<�߳N������2z�+���;�f������l�!�C}��n��\W���|zf�g�hH-.
o�>W��ۿ��u�����Euj��V�[�)�;b��.ʖ�jT�,�O�3�q��'2N�-e���_���Ӿ���Dar���z���V�x�Z���K�.M߆]sg�l��������zv��CJ���ݦ�*X�Ͳ������z���^#�k��
�ᢝ�l��anH�C(<)#8�ON����џ����Ds
��{��ϡ����i�3�5;�|�f%�<��G3��;�;�/��i3
'O�=2y��I�F���� ����	�a�τr�cǺ���b<vQ*��_U%[�h�i���7��hk�/��_��c���ƶz�E��0�z�`8$t'�T��=��MT��_����9����g�h�
�]>�I�p�
M*�����{5p1�o�|B��^�yMn&vh�g�GֹQ�T��F]>�kw	xd�wGr�r�8������\_�?�~'�C�~3��9�%.|Ŗ9�h\��d�A��zjp�Z;~�\��RP���_�_ƈ�𞟫I0vŽH�?�> ��D�Ωkyr#B�Ĝ�t�|ۨ�D>&�3�d�@7��a��R]�luP������&y�!�Z鬯g�;(ć	<�g��l��+�NU*(��$��:0�ӏ5�v=�J��i��'S���,6�B�0=�����t`��Lo�~Ե��i"���&�8�l�Ȟk�o���}�x�o2X�^�l!�,Xw9q�]w�Ϗ:������Md��j� P	��(�N98�c�_U�W�愧N�X�}��J|3վ0�xh��JZox�m���@k���[�C��~6k6_�I���"�t���>�_B|����^��ݙ����I�p��C�ߊ6x�=��3K4�b��$W���(���Ilv`�j�:5h�K��ڿ��_�����q\0A����e�`W�;z����C�
'�'����_��|K��d��3���O'��`���}ޣf��ĶʷsJ����t�3_��h�u�+A�+me�z�>�'�S�x��&�~�o�c䖓֢w�Z�X^4Gt`��@a��P��i�}��ri�=jC�La��M0�ț�g�RI�Za?�.���4��✼P�V���51֞�j[�X�6⦋��A�XF�⥖���*��U㓏Jy�Ҳ��tD�M_͢���]'�֕�c����F�W��o��җWO�&1��t�H��I��h�td����>Q��4q�
�G�3T�����W��G�zT�\L�œ�5�����^���9��U�����g�5�lל��q��+�k�ٯ:�Z���Qhz44g�����*\3�ק��~f���~+_���ģ�0���\s-0t�.��i�3^c���.1J�֜?�CE�`Q�S��(\�v1֤��"�M;n(�p;R4��*���zT���E��&N� ���W�=_��ؗ#<�c'ҁ�h'����=��.�-
?6E��?�d�5����3��42Z\I�H6��_��>k��7��|#�$p'G,������g�j˧�Z��vڭ���W�q�-�(���g��Y���I=:����g���~�K�f��r�Gn��_�o���� �[�M���>�i�>!٦�%���ݼgc)�ƾ|��ӻ�Ư.����m�%�K�T�#ھ��g��a�E�utݜd�4�S�3%,K���yG�U�{C���
���B8�_5q��}
p_uX4�oX@�Zn�n�����t�x��6�~�|[�����RF��?w�UpN���|8��J��
�
#�^�c�s�j_���&&�L�q��ҿi�B��b��<	Ԕ'�-�x�᮫�}?|��2X�1���٨4{�L�u�A��W��5���F�1�����id��[����n^Há�?Q�&EE��,��dϤ^7�l�tO4�:�~qӑ�x��1e��?��uK�
�K����+3�]�L��,p�[�l��+(C���"�bc9�����k��t�ų�Z�q��i�8.
���=7�*>���O�}S�>��pi1�F:n�;F'��t�\��J�� ���/�V�u����?h�/���E�l���p��'x5�4��y�鯾J�k]i�e���J�)��ʐ7�My᪪UV��滯O��3
�����֞_3�%���e���Z�W^Z�j��Ю�y��\��ۧ����w^7ZU���e}u���K�������6��I#�m�-R��G���~I���F�>��I5o���!�9h�8$W��Z���?‹�;5��X�`𤄬������
�G>�k�Qto*q�V�K�0��U�~��	�
~"��K/����n�o%��2��&H�1��Gs����
���f��[�o%�b��V?�HI��A+�Oa^y�cW��1�so�p�G(=+�'����MO�?��e���_𼻧����e�]�C��²z�\&%NP�-]7�U����]jN��J��OK7�S��Ў�Y+��+��N�fO/�;w�&��iji#�V���s_�R2��#�\.�8 �H<����o��</�h.m���M5�q��;29C��q]�ǎ��>�P���A]�AM΄q�,K�h5�9�F�L<W��GӪ����:��))�w�����G�)��N�4���$�$�#g%Ӹ��ZBG�w	<wqs}�J�,�r"RG�p7_L:ב��L�[k= �tm�J�]�"[��V��ѩ�Z�<%�߲�Yj1۫�4�-4'�yP���"6��|�X��'�����u�	�Iu�)��ރo�[\K4�|߹����m�>�_U�_ ���}J��R��u4
4hrR>�ξ3��x?^��o���h�ko0�0�&y�g��j���/�����[�6�p��$9��ÔL�	Ϡ��Y�a/d�d�~�Ǚ�rW����������[�^'�	nD��e��q�@���7�K���(�zu���~4�ſ�Z<!����^F%ݏ|W�~�_W������&�#� ���{u��x�/�:p�a�{v�#�.̦�*��ݭ~�������<��ǯ�9�з��fx9������!��b�("�7q�ߚrri�Ӕc�RT�����P���R�鞵,��%V�Z~�
D���jmr�:�i�������o��;�Ұ�����k	�b�E?:m(�ֺ�)�Z�4��e��I�p4��a�ɒ+���c�hR�2q]V�'�R4���2c��'�|�{�ĥyʚ��7�tCr����)�c#�S���7Ҽ��K��J�&Cb���	�W]�F��,L��y����GŊ2��1�X�6+�Ğ�᯾Y�L#���'�j4|���*�;S���875%%a�ҝQ�"��恊N:R�n��҂��N*E9�Q��S�p{P]�#<ԣ��c�jT�9�{��wt��i��Ω�K\��Be$cz���-*��t�Ep���}��K����a��9W���xӉ
�%�Iߥ���y��S���=��-�Gy��G���LQL��!���~(���CIb��k&!�
=��ޙ�����5�Y�Q_~���I����MeP�������-��ښ�T��mn�h�ʴUH�������MN��=_�_FxD;�_lW�Y�d�|]�YW�z4"R<�x�W��̇��_�������ږ�=�N�.b�=�y�zƭ��q[Ϫx~�[���ƍ(�#�Sʟc�_�Q�����qq��og�|'8Wp�f��iu�s�1��^�;��K	�3�yw*��2�=ԃL�w�a�����=#Q̒�҇���=M�l��Rs��Dlz9ϗ|L�=㈭i�S�HyTG*.:����i�w����t�OZМc,k5�Ժ��qҪr�a�8ƛ_'��Kg;��V���'�!mO�7�.��r�;Iks�{2�c�s(��S�)�q���Nm �zhuk8��!����'��k��:�A����jd����2H�v�mVP~�y��[�~*��}�X��s�˿.ݙfm�1�.���'����x�
m�K�t��qxkM(�۹�h��<��Zj0L,ݶܪE'����Xf zn8�'�k���[Z[�-����l�
G�����<�!�@���o?j-2�����Q����xn�Ԁ���#.*���ex��v��[X�߅z�yjn`�����
�񓜁�_z����8�E��u���)'$�����x�D7��h^=�j��\�1���
�<��"��_|Z�o.�}r��C{mJb�t*�uV8�x�[�Y�V�Yr�
��˺2�4m���qY�4���E7"���J<�r�|6UV�<��kЯI��
��KX��]���:�1MO�Ah��5���O�~��_�X�s���Gs�3`���DRv�4m�C#���gԵKK��=漵���7�N�(�g�q�f�]<#|��nE�!b[k�5.o-a"3a�<H6<m���3*���>#�[�t�";-B�Y.�UQ$?+&�<ݒ����c��r:1���eh�t���OO=��e\�Tj+������r���"�u�"����6��VP�z96m%z�z�zkIS��*�/�N�o6�e�i�>@���h�R@1ʬ8'�Y���H���K�;ۺ��\Ca#�֤�ŰV�#��8��x7�Qh�o����Wח^�o5{�L��CD�BW���$�{�\5iR�Z:?r_$�O���v��*���گ���J?���Zz��6�As
w���v��`6���-ߋ�C�cMg��e�xce*�y2D~��~�
a��2�a�x���T��L��m �ȿeº��0?��S�:��������H;�f�n�.e�aP99��@�99Nj[	��J5��3�W�n�����,D�;$�����_�W+�S�Sj�Wם&��M�!�=�Q���W	�J�Q�����J���Pܾ[
+g"�!Pq�y&�>-��+�=c`"M?M�Y�BG�۽�"���!FO`kwþ��Ӭ'��R�JD�5�*R'���n��� /'�=��-���a�E]�}��_Mq�IG�M���C��:��4Khf�bhn&O$�6���'�p�{��G��%���Zϭ�imo�ڼ���&����~����K'���ϊf��mˍTا���yq[�1b^K��増b2��C�jW�$�Ʃ�ߍU���-���iV*\�*-�m�
���r8L��6�XUw�ݼ�_Vw���V)+KK�_��������qֶ|o�C�x�U��IR/%H�V
"�s�1�\VC�G'��X:s�Gc�zr��R]U�O�`q�+O4��T3D�����4�s�\v�;=GzP1J8�P99�p����i���*�J��"@��$�s�8�j�c�ǭ�?�QR_)�Z�u��;R�My�~&f��li���FM~�~+}OT�u%$s]^��)�5�Z�͎y��÷e��}�,���I\WY�N89�ó+�]���A�c�ڍ�9�����+�KsH��ŒV��)�����qX���[�g3���W�f���+��^��D���*\�*��D���/^a�ϼ޵�^0�wҼ�ū����b���s=B*mUv�Nj�o�yrG��(l
r��Z����iĪ�<ԁ���OWȩ��)n(^O�Ig�Kx��R
�t/��_��c�\��e2�IX�u�O�fP��5�c�ۋ��½G�TV�R���m��;��3�S�%7vsV�rG�ly^�����W]��L�O�]u��6�
�x�]��95�b8���6>3�Y��,��S�y�º��rnlmj�3��-��E-��Q��(���l�G�����m���ۻ���eA�=+�.>��fu�
S��ti=>e�q���^�k���Mn�h3�
m:����k��x�ľ9��_��W�v#�$�B{�ѿ���]C��R6�0-�*q_x��&�����*�ޛX{�_���X�&+��:OE����v��3���*��^�?�&w����͸���L�>x�|��{�c��5���o����b���升e��DZ���ľ*�[Y��웲Z+��)�t��>�$Y���ڝ��
�D�K��}�${�磃�"��Ŵ��޺��璟�ɋj�n�_�?ڋ_��ء����\�w��d�Á�ɮ�J��y�i�����'�92�ֻ�'$�pS�_1��|:�f캧�bI6ɷm�@�1䊗V��f�y��e�ۛ�BtTkd�[��'�\�+h΍.g��SZ]6޿��h�D:r�J�|��V_�s��?���L����͞�n�nt��7:m�'����B{��|�Q�|�yi���'���l�C�&�@�l@�Ƹ2Dy��6;��^�9|@�>)o��ͽ���QӶ-�eϖPczq�7'��#�z�{k6�o�t/4(�.�10�,6�/qЫ`I�p��R���}��?��+�n�k����(���a�xs�"�M��j�G�^v��Ot>j��<�L���5�o��o�4�n,b�����R[�0<�v�nDa�L$І�>��ĨF�&������е+��#L����BCZ����0��b�W���F�c�܍nڊ@x����8ea�h6kYSP���kf�^W��9�Wm��-���܎\����徵&�����G��<��H�p�Wi��wS]]y���#��r̜��I��V�s��Ɵ�!�5��׷^+�v�Oi4�V�����&+�c�K�Hr0+�t�SO����xU�1���f�eou����p:�0�Z���ʸz��T���W����%���ݯ{"�(ԃ�e��g�z\��xV�g���i���)2$D������#O���4{�zc����Q��%���q,k�2'��@e!X��-R�:8�J��g!�F����+���4�v/(���ݼ���'�^���Hq����*��Qx�+�7��Ev�^W�i��0��ug�7�w�w���Q��7ÿ��oD��>U�1����
�!�%���[�o���7��o%��ƭ����n��̼G�+RPEy幷񯅗L��g�iq��NA��"c�hV_\
�#�	�#�j�_o�}%��'��6u �}ϥ|���ʨ�M^���u�I��٥���=�1/O�+5�U���7��i��7�Lֶ��ki�6��:e��€���O5�go�x��o�1�hM����'1F�Z1'��c�?��� u-O�u�l �67r�#
��x�[��}_���]�ɢ�$�msPH&-����H�hR[���FQ��9�$�k�j�����d�U\y^�y���F����+��z�5)5
6(�{�*��C�+�����'�+��5���u��\A�B'ڲ^�<a�JҜ�ܹ�<p�*��i4
'�e�H��y���`� )��1�G'$�@�S��:��<;k�_E
ݦ�����g� ��H���P��X��c��q�Vm���d��k����qNQ��;�gO��Ľ"�Y�Y��M>$cmm�}痑3��2�O W�__[ּ]�j:��
��!Y��e��>��d)�|ƾ?��C�w�!I�9
�j��Tu���A�{����O^>
�t�C,zu���wM��L���Ӟ��z
�Stp����W�˚�\U��w��?w��\G���fer�ŗ?{9��_ư�qַ�yu-߉f�]�7��)x�d������6�q_��^j��n�s�|<���Z�W�ZM��g9�c=���F��Q�sGSҤ13K��~�;��T皗�Q��!�a�x枩�iv�p֓c��	K�
pC�5&����,wT���F��̿J�ti�c�8'���h�g�BG�7;�I��u�i�����r����n4�L�O���D?(�Ï��w��T{�!����G
� U�2)4h�ӮA�m]p+nu�9�}]~SYL���E�J�/�۫�<H�{5�~*�*��3ӡ��&7�ח��r[�1B7漿ű���bO��nyְ�K�z����{Z�犢�rkʓ�=�-�R�����j���� ��S���&s�7ic-�b%5�x7�\���ob�8_�&*N�^��N;d>��_
�<MS	M�*��Є�d�M�e�����crqɭТ����ҙ'�T��˶P�}{V&���>L��F�+�ϯ��ڪ��|�k�ӕ����Xt�a��U=C��Sb����\���͜�U���ᱚ飕ӡ?i-Y�����͡��7��$]g�4��j�Ż���ל�wS{ق =q_L~�	���s�U�e��#�8�6Mny8Z3�+(GS�~xnO	�q���EO�G�u�ti�K6��i��j����G�E{�f���J�k����cmu4�Ol����',��ٜ��.\�mz��JP�R�5+X��?c�_��X_�����3\/��,�"@m4�fn���'���<��F����q
ی�4X>����F��O�T	�����J�Y}�{�G��
.�œ�x��I����x�T�$$��M�Z���~�־>���R��B]��b�Iy)�����;�����]�uM.�]��wY";�T���^����6��
=���0��?y���рǾk3���$�t����z<�4�?�FXm�����}���R�"��o��V��柼��J�e�cZ��X�k|�+s�(��LN8<w���>��>��h��cL�m-$ԣ.�F�@�9v*��Z�/�����J��`���N��!�{w]�+tʰ�3�^=�Y�,����S�[�t`�����PWΞ���m)P�N�[8s_�ةe�T(AJnI%����I}����\��p���Ut���9%vҒ��c�4�$��J�{G���W������T�Sb)��	m/,$*_Y��.ee������=Y����k~y�V�����OV�\��;��Eq����w���z
��>Z蓏xB��Q�l�/�%�=��.mՠ�����x�"��w��KS��5��>����q\À��V8c�\���}�[��U��颺����{X�|֕-18T��n���v�kd������J�Ѽyi}��j�$�������6e�!��d�UH$��j��~-i�����m����Qml��G�laVH��@)�~S�Ei�@��s�Ƒ�j�6�cqu��La��� 3�P2��*�
e�z�'�
"�<Mc�Z_kJ���H�)�,��+n#9�^���
J���N�M������m�&������~_
x��
�[}R�m睦��Q��">%����rG,�t;����Wƺn�]�:9#n��}`����]��zƉ4�j�e����`�up�=#��6�v�_��*��<%��5���\5��[�b��xTa�8⹳?�j�(r�����o�M��uf����}�?������䰋��M�c���e��ǡ8�ғYT�>��Zh��+`e9�{��v�6���1�n�}��FNٍ��=�
P[����堒��0U��p��g8aaCB񶷽�_��켒���֦�G*2��f{˭#�"y
��YTM�{r����1����!�j�\j��{�KY!U��v
NA����4x����ɪxJ�{m2�Jۣ�;�g�>��X���.t�t�
����z�̀���+�s�_	�X)&�M�.�ۤ�����'��n��
Ƥ}�w�tko�v����kk�7�V[�[��-�G
�H��b6��+��lj��'�}H9�[(�X�@	au�H٣?�ز*��B{S<%��|9�n��]2K��A�c!�|�Ȯj�Z��+m����H�q�.��K�=� =�Oz�si��~�ZM>�W���#��������O�_�=S�Z���O	-����/��D�W>Q��-��;�N��&�~Gi��BݼA���'y+
����a�~�nؠg.�$5`��.��D��4U��mm����m��+�C�FY؟rk��l-$�VW�l�s*�rߺ����c!�X�k��G	V�oQE6މ=�^w���h�ھXm�_�W�|2����%�[��U�ܱ��wm[�aC
^WTc�
�m��
X'��;U��U�{(.�.T���1k�U#h\N+��\h�F5����CC��j���R�8���)��/��4/cyo�s $����o��X�%Sh�ܚ�)�=�'*��Z�%��ޥ.Y�G�[�<�Ś��N��ݘL�u�֎abі��IS�qY�3���\�ٮ$%�y^R}K1c��"��_�Ւ�����(ӊ��W!�pԁ}iLx�X�R&_N)6s�J�I��Rƈ��n:b�+�z@��ACq�*�J~�sO�f��PG֞��:R�֡�D'�GO�E;v�tR.�S��5�hSc�i��$�p>��w���w
�6�!�\�;&���޹Oxi�A�Ƙ�����|8����ABg�r~��^=��`�U"�k��b��M�.M�ґ�J��Y����&\�d��
c#��<I��Ҽ��Q��+�Iޯ<�LY1\��Qg���3����,�*s�^��(��.�l|6+��#��Kc�5��y��p\r{V�dn%'�5��X��~��L);3��f4𱼙�}�s�0k:M{͔`��ҳ<Eq#�R,�v�`�4�?Z�����|i�3�ځ�KU{��I�^��{�l�y-����}��H�>��o��k�`ϵ~QĘz��s��y�63����uP�:7d��g��\��t���`���f�bo[Xi�30���k�^��@N��_����U���!���KK����������Vߙ\dt���W|��$<`�*{����k��ci#�E�x�5-9�d3K�lb��	;ѩZ��+ˡ���J��o�j�.x��(R�ȯ�~����-��
|u�+K���n�����S�v1��<Q�:��O�J�ݡ�7S��)Jr�^��ɩ�l�C�E�G��n
^)nv�����8�{��?�g�n�@g ����߆��MJ�k� [[��~eS_u�W�y�6�*S^������}na�����j��9�?�/�Y�����h��o����hZO�w��Z76�1"���;o�#�Z��v�փ2�][��{�ڴ��_��x]��N��Hs��}i���=����	Y�o5�τ�$��Z��e��kGp�~#ќ9ppӠ<�Я0����{�;]����ܷ���D�����va�]���]c²x���jB���w����>�W�m|i�P�ߋ�/4�����B�N����{��ps�W��*�S�e����s��Tx�����H����i2��ީh�nO�{����
�?ڟ��~��x:��tk�O�&7i�[F��e�š/��'�����]�/�����%�cc
HB�M�-!nx� ���
���Jt�4۔��v�[G{�]j�(8����W�cf����
��~2�W�W�+
)E�r��Zח�ɯ-�?F�<NO���*1�Ԗ��HK��d���F�z&|�x7T�|%����&���R�J�����4����CH�B�I�#>���ċ�S���2C\���s���>�b���KҼEg�ǮjZ��ވ�4zU���ౘ4���ƻ�s��l��>?��\����H���%x�$`v��q+�.�Fp��䙕\F1c=��R�����G��}��%�hp�\���iկ*�߻�2�d��i8���s�G�	S�ɺ�t2Œ��)�c�z��!���*���;���i6�]����ך|���>6�3D�+2�z�Ҿ|��|�x{{�μ6�#��;#��]�񝴫�5�6|����<�u��L�_��x�W$���Nݴg�5��k����ďj����6�!��@�jEͨ�NH�0�5���ݧĭx�ᨳ�����l����4��Ywp[����˯j!�_j�]�p����a�%ݧ=Wo'�jұ��,��V��%d��m��+�~a�
�ײ���/J��ު�gӕ�ռ����g����I�WZk��<gÖrIgp|)�b{I�lF��aʂs���Zc�w �	�nW���0�=+��{a/�a��/�kw�兵+y!b��K�f�?��z�]#U���������ȹ�����J�6gK'��R|��-�-[K���V��Ļ�Y�8x�O��-m���S����B�;_?P�"�vx�y`I���Ͻtsj�ͦ���aqj�M����៼cߡ�!Ѵ�˔���Գ�.U�0|����=k|Ng���R�ٻ|K�N�_[Y��hS�Pni5o�_��^��k�OR�urdc�&U���5͵��̐�h�c"����8�'ՈU�`3Y��K��p�!�������qϽu^*�=?Rm/C�h�h�v�A�;��k��M\V&���Z�$��m�[/=�s��-:p�*�~�V�9�{�-���c�G܈3������ȼ�sX����(���H�0��@xL�x�սGA��.p����$�vG'�_S�I�5[K��Ig��-�K���>�1�[�qӥg��S��N�_+߾�G���z�L=9+�M_���mi��xv����ig$�g�����n�Rpz�)�8��gay�5-R�	��_������9q�vw��0�<t���+���mBa�D"�� �5�o��4?�60�o��J�6�X��g�18�c���,�M�YOD���im��y�GFy�aF+T���_�b�Lt�@^i�riv���0͸�m�v:c�1�R�$FɁ�n�u�YI=�<��7+���4� әsC�!�E'<w�'�H'x4��I�U=�CI���c��D��E0��3E"�x���>_ӭu:��W�5��xW�z�A�xsh\��?KR���l��I#o�^�2+�Ѵ����f�V-�zqR8��H�Ž�V~��c
�4�=�8��Eo���8���qC��JL�&U�X�uH�5�uZ���8�&t��<IZ�����|D��}k�|Sw�j�#�<gP�� �ޥ�|�⽇�	��X�q_?|L�����2�9�;华f�r\�rp9�uY��+��Vf�f��g�WM���ޕ��N�#�b��%��3{��o	)߭XX�@��)��J	V{�&��F�Oq�DZ5�q�F+�͝*iS���[US�KC�����
���	��W�|�{w�]i!�q`:g�_�V�e�D�|� r����iQ��/%�b+Iԧ�a��w^3֔��<�נ|EH<!��V
�{נ|1�]�|8>Իd�q�|��R��Ρ-�nJv����]療��"~���,�XʿG���YmCV�R��M��/���=G|�G�Ժ
��t�{��R�sAF�H�~��s��K��7�q�ߵ^����g �Wغ-��yd.C_8~ķ�i�+�n���]��[��1�_�>#�=�n�C}�~���,_}O	��uY �[)%�3Ҿ~�>˥�ky���;\˽�_z�O��Y���[\]=k���7�Z�y�sє���Ù
���־%���f>�Y�=<�d�_V�L��V���,L߹�*�[x��o�b��V�bN�@���{W	q�_Gd[����1%~��|;�W�%��n�u�Ɵ}&��DG���ؠ�RK�R�g��⟴����d<+�um.�+��[�aPl�W��=	�����~<�-?����x�����gw�H���*x�*�����++_�[�rޑ���h�3ݢ|�5���6�G�\��Q�`;��������R�R<����2r�zRi����xGNִ������Ή�����G��_C�pk����d�:�𶫢�ji��qM(�;Bp@I	��ܧ;�q�Ӻ�����5Iu�F.��q{k2���)/��=������x���mN�U�B��hczRʽ1�2{�aK���S��g��/�]�dk��ʜ�ޱ{��.�#�S5���x��Rռ�E$|(F?�!`��;��t/�-������Hs�����)#�8U���e�7�ou��ĺ�ë�;��g��d��&b�pGoj�|y�L<ks����B1݈��H/Y�~_��|�7�����W�c2�nkͦ�맮����a/yk�p;���?�ǩ\�Ip��ga�i��L��p����`����Mmqq"��c,�& �@%}�H>��x2Tw��1%ǘ�K}e�nS�˶`3Z�N�e�	/�cl������'��\�;�& ��o�J�����t7���/�_c�m�B���Lk�'�-��$j�ԫ��=s��4�i�v��}�M��eC"�N7�m4e�A�.��P�$���Q�@9)��I�W��%�QҶ�"�$�F������LW�akO-���}����y�!C�F��gc�rn��x�����s�����kKwim��4��fK�O�:md�3��Z؃’��Wݪ�Am�U�\�-�ökӠ�֙?��O��{p��i@��q����W�f���ٵʕ�Gm<*��9-O1����.ê�zE��E���p��h�8�9�s~)�}{��o�bQ{b��G+�@�nx����w��m2���]��$�'),3���z7�|?}���|O��}zh���,�'�\�j���'�kȧ�U��]����t�8%��E�?�>}�-e�5D���[��ϘGFFU}Ny��[�a���&�gԦh�Ye�RHfv' sԊ�u]6#��s<o�X`M�Ƨ���GSY�\��"_Z��0$�3�}}���:�XrI������2���k����I.���6. ����#\	?�$
��M���H"�����m�1��׫Hǩ��Ӓ
@]ã$SO���x���ISц:�������	4���ry˄�9�t8�zY>e)*�Zj��&8�+��,�����l�'�-�����R����?ކ�{��.�A��s^����~
Ѵ���I���)�*{�f��U�.��b��ie�ü�S��U=�㞄r8�ѩ����n<�[���f�q�:|��g™Z�ޫ�`���9�����F8���>��{1�F�֞�N)B��-����WT�Sd�sWd�{�va��M'SH�|�G��ޓh�q��������3��=�5(�i-������������,���c����Nt�S�EI
�^���R2�t_/���3LFFsN�1Z)Ȭ٬Qr��)Vݔ@b���kY��Z|�)���XE⣕iH���i�j���5�v>SX���5���q� �9�J��ʖ��Mz�����n�t�	���.
-XH�$�Qּ�f!RD�q�
�Oę���'9�x���95)半W�k,���k���8'�y?�ύ�6vR-��������UeWc��f�12�g�[�t��BQT|�k�B��R�9�(�ś��M������5�?���;�j�O�) �##�k��K��J�ǫ�P�.J1՟}~�Z��p�pG�����g�%:4�D,�pvZ����ҭ!w���w�ׄmgӂ���q_��K�J�?��oS�P�}�D�~����|�39��T
ʃ�-}{�_xl`�v���K�}��@~���b��ö�:6�Q�1Ҽ|���*�����<2�r�������n��i�/�ȯ�~-x*�^�k���9o�~�|O�k�
i���0������Qo�/M�D
U{
���ZXis����z9�[[5�(7���?9.c�-ۤ�yI5���.�<v�1�70qX����kW-)�z֯¿]�[]�F��D{�rk��b�9Q�7/���>a�>����g}_�v+;Bʬ��^����;�z"(�'$�͟�o�����WaAQ�����/<E�Ks�~��`(n�����fe�9��k��?�s�L�F8HƇN�	������ˤ[m#nW1��	���
8�P0�M��TZ�
Ŭ��:��(����?
�"'��ˆ]R�u�$��?:��Ȳh�yu*J7I-�S­�x��^�׺���4ґ�-�k�o�!!OҫO�E�)����ie�@3!?�y�}Zg��˜��]G�~�j��m���\)����}A&��-z���J���5hR���Ok~3�I|5�^[*c]�}1�Y���෺��.�ewp�Ǻ�N�J���P��{�MԤ�O��ŭ��su/�ha~s��KQ�5)��_��[;	e���B��P;���JXy�L3n��o�<�i��bςi)�ŚTڒ��c�����`3�:�[~*�<5�[+6�u��.�72������p�0^��s1��5(�MS�z��r���%�
�P��\����厥t��];nV1cI8��ʠbMoQ�W��_m���Q�;~�5��i�z��{q,>�~��r��[��i�B�P)�o����ڎ�s'��m|7i6ո�dݹ�ł['�q���w�|m�{�
F��i��.������>��B4�ntvO�Wz���s$�m�rA?�տ�z湪F�LM���|������B�ih߫��Om�i��u�j�xr̬]�H��"�,�yڼ��[��,<4��[�D׃�ӡ�B^�ȱ�-���1��%�P�m�|xSM�m[ˊ`(�bv�O�`2j]t=mS�d�z��e�Gb��ONGz��9ӌ�~|ZZ�]�z�����ھ���yz�&�S٢��g��_2,x�ޑ�N;�(`��J����^G�p��$�,�[i#%���gA��?�,�Z��+ķ�J�Z�|݋�E�m��x?��n���)�8��c�$}w�^+�:������ݾ������7X��~�=�{�U��/��0C�Y]y['��x.J9
�y|�2MR�kvzP6V��3~��M����?J��
�ֺ}ͻ�_++�	�zb��ៈ4��l��]-���4
b��>�9��w,�*�|��#��"�^����O���'�ѼL��/�|Gwi�쩇;z�8ʮ;���?��.���������L�dew=|����?1���F֖��~���.�V�yv�[��r	?P+�w�4��& ���,�_64����h������T��w�]^�9�aci/���K#�T�K.�a�]ޘn�HQB`��\�>��F1�k�o;y�bi�.?�p�=s^����&�v��3���m��A�q�]o|:��)3��,M����y_�&�y,,�G�}F3Ì]
9bi�'ut�gxW���=��lgkcg$��������X1n����G�'�	����B�\D-�!XZ8;�~�@�w��C�
K��!�Y�v�&��sPwB���x?/������׬��M��|Q%��$�l� ���@��?8e=�>��_�dIc`�1W{�߱��oBymW����x����o	i1\(�q�*�V^��l�NE`�z��C2���O��˷��bs���yv29����\����_ԩ��i^��R����⼃�Hn2y�Q�=�q��ư SNi��0�!�D�'���*f_�S�����`zS�i��

<u�j�Lc�����EX�f��9��u�t�z*3��ۥ~���Q���#��g	�\M(��\�Ҏy�i�
���V��8"�m8�01Z6�D�D#���N
iBW��<�S"�bގ
a��,3�@�诠�5���H���^@�o<�5i�+��mO<���/[�|�eh<f����D�Ri|�N9�h��?h��YiR��q���^-?����1.���|�"^֥��G���*��u���PVa,�%�3�כ��>%�y����Q^�g�=��J���b�{�(4�F� 6�Ⳮ�Q�B�jVW���g��Gsɾ��3��@眒E}��.|)[Y�"*�¯��:��\��8�k鏅��t����q��_��gF�7M�3���Yl^'=Z��>�����6�21]��4Q���\g����X�?/LWC6��ٓ(���w��l�9��nmY�Xl#q���}Bk�C�����{��,–�^w������]M��
班~s�g5q��J�Ej��`�)]�v�9�^�f��o]�⾃��M圏Ƽ����ܤX9S\y6oW�ѡKnclM�FqK��U�&?�kw��5����k����y8��,^�;�de�G�|E��hX�q_�=,l��W�!��y�z�k���g�UŞ��<�y�t���he�2+<ڼ�|T[]I�Pv�p+_^���t�ʺ4H8Ul�^�Y�֖aM�f��w���2|$.n����� =�b>��h|/��� ү�Q��\����|N��Y@z�|Y�ZoL�b����U�#��(�˝��s�n�m+/-F����*���~��ݻa��Rk����9����
�Y؅�C��8�X�{��� f�e	�*�U��o4׍oC
�e�21���x֯^<��V8eJ�9]��k��ۿ��2����ҷ��i�\i��^��]����3}�P�c|>��V�����l��w��G�\��>}��`�O��s�Q�QZʭL"�|ߧ��N8��5kk�$Z�P�� X�x[=�>��i���t���r���S��yQ/����!GA��'Ң�t�+�zA��I��0���IS��9�9?J��,�oZ�q�B-�ȕ�I�����R{�C�C�Rn��j���ź��Z��:+Mv�⦡l���Ȗ�A{���n����=u��No�֗w�z��]YF�-Q�3���l<".r�MrV6���]��Y˂'8�=I8�sUŖ�udoGm>&&[���A��+9V�J�.z�Vߞ�]����	r�a�;kP�j�W���2vʨ�jI)�TF��,@'���ƥ��ֽt�"�,�ʋ�@��'�'�j֭�᎕q,���������@}�U� �t�=W-�LK�o)�yb����~��a�`��]"����5�s����W���.�
�Źt��c_ò�E�Ȼ�X�^�p8���MzO��?��]�rڳj����I��v*��8�G,Y'��*Tד|C���=C]B�u��łyJ˾FUW>�UN=N}+�τ~
m{ᖻY_����ǜ|�նetU�dRF��y���0�A��|L���C�f�x���W~��a�xLʆcB
Ѝ�7��I-o��o���$*�p��ϧ�]v��ɤ�%�ee�B
r����N׶�5�b�r�A����q�rs�J���f�đA�>��]H͑*1�p}_j���݋�S��5�7(�h���>��o�t�r��-򲗍���$�c>��	|So�\���Dv���u��W��W~���I-ݼ�
Y2G|�^+��U�g��f��1��2T�M�7���u9�4�N�O>��_�����'#pk��4i&�u���W��&�_^��Y����4�<:� ����ܗ�~���W��M��%�Cn ¨e���&���em�~�Z^���/�{�f�"������g0��f����|C�I��\j�����a�!s����'���|m�-l�6�5�P�8[���9v�ɞ��/��|M��{�[�ۋ{��
�.S!!O�J���pR�B��^�q�sq.7�jۮg�^�?�P+7�[�ud����5+���ݺK�ߴE�]��x��ҿ1�#lmMz��dR�S�"a�)=�Z���Ӆ5���y旨���ZM٩hkQY��Q��R��NJ�
�J�ϥH��=}h$a���ޝש�0�
_���&)��A�sJ樌�֊xOƊ.Q�F4L�&�4j놌A�S�����]��c�1�X�E���e�y�P:TZ�N�ZK�r3�ip��(*�)I��{)�R��
�8�&���Z���G�:�i6H�)5���fMN�{KIH���������=rU���
�����:�t��D�os��]|�y�����Yӧh��yW�|
�ީ%�'s=�д�`�Kx��y;GO�z_�پ�h�U��5��#o���G rv�k�\ˌ��O�wc�8W�MN�\c�xW���<���Z�l<2�ʏNk��o��0P	�a�W��M��B�i4���@�ϥ���t���w����b�����~Mj�B���y�~��S�w�u�3l:�	6�Ys�ʼ#��ǭH�������NO�^���'P)$�<y����q.k����7��p�0t��R	��hz�De'�WAu<�a�A��ᇆx�<�G"���������q�Ԧ�c�!N4��W���krC��{k��Ł/�
yЀ[����kr]LE��u�yU[�����c��U"mg_6�ba�Lו|��,�&���ظ�$�Ra&H'�kKQ��P��K��+�r�L��f����傇"�����)�'ҼG0Hʲ��3����w)�5���a�p꺌��E��A���~3�[w�)�;�ҿ��8ϡ��ӅYY��[�<7����a�x��1�e��F	�� ��k%(�鞕���&�(G�fKko,dE.6�����.�^����ɫRt"�!&���E�d��~��]��!�,l�K���I~G�+��4�)�I�F��oRִ�+v�IR_ݞ����g��f"J������Q HHS��>�`x���lj��S4">c�>�}G�y���Mmv�鋇��Ɍ��!��/,Ŷ�Z�&;���S�MkS7�]8%��ZL��7:�߷H�S7��3�aϠ�}뷰:_��O6y�V�
����>���?�:��"C���k��L�ܢ���x�N�д�.ť��2�1��7p>��^��ӝw��w�;�XƤ��Ey5W�yn59�u^wH��Iʯa��tqx�R��%m*7���¬͜	�#��0\_	xNo�I�=���N���~���-p�m��'X�m[ )��&�.zP��6����&�ڌU�T��]���PX[Yg8M�Py��`2q��5�kӛ�];�߼��}���2n�ǻ`g�
�����5[��=����$�'�|�}O�{���+o+Ħ���&�T��2~����U%jZ�v�t����y�E��s�SC7��modi�n��k�6��r#Q�|���)��=���4�V8\_P���nw�g��3�?�q:�����H�7�NӦ}�G�P]=�����I��Y-� �,�Þ���zW?�"�R���kz��k������u�:���\:���s�\-�l�yJ�0-�9�}�޾��w�ˡj[R�")�$�a��+�u���Z���ރ7ۯ����ZL1Ya8尡s�����ע���?��k}�rq|�w׭7x��ա��^oݒ��Z�{���1����N>�㧮��r��
��I4ǎ];PAwj��(Sá��O@Wַ~hP|T��N��[_Zڼ�-����v��~y����2��udž4��wSv����[����,�Vl���R�W�M�mGIլ���yn]v���.�	u���f�	T���^��~WG�D+Jt�`��Z	r�5���q}�݋W��jQD�$��*�rv�:�]?��
#�=��B�K֚�@�&�n�n#x���c���G�+[�$�*��v�7aGݮLbi����a�B�2�U�'�3�z��i�����P���$�V��y����MDb-'K��v��T��z~4��(�|�r��Z]MH|�D�m�RK})[�d�t��Mu��ٵ
kw$|?����8U�������^����o.o�[� ���I��A��'�_J��Cƺ��ݻ%��9$�\�U�^
�-����m�KWT�BpDh��G��_G�g[�ԗ�Y�<�
W���qF�w���8�z�En�
��5��|Xcf$F����y�9��|���w?�X�Պy�_����"sO��V_C�xS쁈4�n9�c�S�"W;g��R1�zo �G-�{
X��I�y�M/�H/q�SQHž͞�u��!��q�4�:��mIi
��Ҝ�'�
�*��
����%�QV9$}(�q���J�Daګ����g��T,qO�N*��VcD����^*	.qޫ�y��2��fœ�6�u��䞂�]^qֹ�j]��=Ee'dh���ko��[�M|��-�
4���r���S5䁻f�SC��+�1�prp+�1SPP�S�+��x�{.��+k%P
eߵ�r��H��1x�X�v=.kw�Ϩ뷋���/�ƿ�s,�9˕z��d�T��sҵ-ջ7�{��\7�`�����_���]��&�L-rp;�����u#���9�̖�k����qi;���I��W�X�9��m!����:�7ᗆ�ˤ��=�}+���N�F���rzןŘeFMJ�l��)��ivz֝pƦ�v�sj�����C4ۋ�p����s����^Z�_PS�ǯOZ�V����y�f��E��Tu�o�R��+�x7
��Z��Q�S�/�թ:�1���[�����m>��i�D\�
s�\׎�gy0X���׻��7좷���b�����>-jݤ� ��xO�M��Sx���z/��jR�O��cR�����~���q�u=,}��2�єj�|e��Iyp��0	�q^W���ray)<���)x=��.C.C��ohRXj�N9ϵdp�o�cg�G�p�\�8�D�V��qYFm�x�Oߐ���Lmf;i?|��'5�5á�f��Үiz%���u�?�1<G�?�7Zu-��r�6��	o�S�a��r�Fѯ<U*}���F�0�|u�S%򵋘������W�{֯��(��4��}��1����������R�ih�.��VRiAj��I�}��-�;1��	���|W�#�^�֢q9��p�=�j���Ҕ���p�4�3d�UHu_���r�[�c���,BT��D]#���CӾ-[h~��Op��0�>�}M�!o�� _K�	�!'P;�W �
mZ�f����5����]Kټ��C���k���a%	U��N�N�*ɨ;3�<] �Z�g�i����mV���v'�~�W��&���Z�ܼ�ncY��A��W-��\�6z�q)�4�vƧ�X��g�ڰ�Mr�O��.�]��s޼�ٌ�����m��K��徝�����|Y6�=���X��`p�.?ϽZ�'�ω�罶�2L�:��@	���|;�i^�������s�8}��{*��?n�{��>���>�f��m-������d�vьp�qϭ:�����Z��X�I.��B�K-^�xU���^'�y-_O��Žp��[���|
x��y�{�
ג�T� ���h�g����ߴ%���|X��g{���yqɧ�HK��a��@�9���F�����Q��L�`�I�،��`�~u���=�=m8��>�/>����|U.̣�J�+n�>�u�l~ſ���u�F�;�^��u@G�5�|��nRQ���'�5��'�<g��X��5��X��o����EܛZAk�&�uA�8�5���e��^#D��c�[�|s�	�⍂=����4��񆝨�=��A$���Q��)��"��*�pG��1�e�!��A(�'�G����]�?�����ެ��(��QũA5iI�ΚmZ�k_5����V7�)s�[����m9����������Y�N̶�Ã��+�j/����>$xg���ƣm�x�nd��>TK!_�'�0f�}3^n�W�;�6�C-��mVnLè|�����Ӆ(�2�r�o4�4��S���$y�8ΔZ�����7-�5�ֆhm-�!r��T�$�<^����t����9�����M�&&x�$���q�Ҹϋ��i�(c	W���t�d��zW���}_�9o�sW�kH&�oO��Ǽ�a�?�'�I%�Z��	�_E6��6��NŽ������9��?��)D�YY���a�s��Z�"��o���?-n��w��.���K19��]��V��������yg�k:�Z#-�s�i�0)w~t�+����y�ٿ:q<�a�!��M�u7�Z	r~��5!�4�0*yC�kt�F�=)�t���M
��M��I��͢���zz?�Z~q�CF���z)��(�*��+ρ�Uy�⢒犯-�{����柯5J{�
Oך�q!9�e�af��z�5�3�Q\Js֩O1楖�5��A��^gO�'�_���s~5���=A�j�X�Q�?�G�����8Q�^5��W��o0�<V��㵲K����%Ey�E��$py�~5�t����8ON�d�6���W���o*��rk��O��!�R�rޝ��׋��cmr��6�=�t����u��?½M~�aҧ:s����S^�/g%�=����V��Aڼ�\�"����X����_����Pq�yw�|D�ӳ���M|���i���P狍��Þ>:}���`z��>!\�"�P�ھG��6�@D�p8��߆��H�8=���}�.���o����F���(��5��N�bI�𗌃�����P�Ơ.�Ha�W�y����E'I�֟i����x�Ix���pj��,��'1pq_;G5�\���tk%��it�J͓���s�<U
�(_z�]�KMU����z�|Es�J�
�Ҿ������<
r��\�|W|��eĨA�5�w�,����W<q�D��s�r�ᛇ�gG��~����%9l~���RWg�B��Ο3��(���mB׊�=zkIRN[`ז�K,3Ikp@����1������?5�|�5j;7�5��}|����,�
�sڰ�����]ߏt�*��X�ָB��9�~�f�%+���E��
��#.k�O#B�[��<�ѷ�������'e�=+RKX��9|qPͮ�p��L��Z��b(�ݻ��ҩM����<j,�����M�K���=��ic���싸�@Ѡ�
~��F�U�KB�b�+7�˹��̈́{_n鏥r�X.��%�~�Y��Z>$�\�J��?��8�5�o�r�`�8�z����0~�G-(�[��Ot���DKO'�Ú�=��–Ӵ@]�!ǰۜ*���H�s,K��"w�rk;S�n/,b�G%��#�=k��RWm}�d':�;�64]`�o� ����)_�kb�I�L����0YܕU �?���l��I�<rI��}�]7�'Y��;�2��7�����5�Z�N�m��+Sњ�W�f���kO/"c��m�W�9�3Ut��O��M�KB�.�:��=����1m���e`�����Pzf��!���mդiaa�̝[�7z��㏵�����\���]O>��f���&�����#n\�{���x����x��[���=
�
ݖ�+�W
�A�_�F�NU��1�w�
������-���Z2�\ w%���A^��*
N�uOȂ��6�����(���CC5N5aA�M_���s|VSQV�U�&�Ŵ��o�c�~��Í���Ѽ%��+E7v��ԓ���!LI��8V~X�1����ij�hX�����t�+���vB<g��Z���e�.�đ�2���8<�����Ք��Ҭ-�~Qs����k��Č<�����h�N��n�KWm9C�¾4��G*Uޮn��-��_C����s�j��K�i�Ϡ��=�`�5��1�_3j���;�d�@�����	u}��|��2{Q�\����mDuRJ�v�	$��L>�|R���5�e���H��*����_����|H��:�/�ih����"?��Y.2��`�~��7y���&�'���f*x�ҩQ��	(҂�~���9�ϭ#?<�:[�����1��sA��M+��ƟҐ���׭6�ț�bi��ӛ�Fi8��#�<�N������Li5`LJ'�3��SA~
fՋ�&S�֔�]��2穬�6D�'<b���QJ�s��!5���$�ޫ�zS_��Zē5S�A��m�����D�)\�k6������@�H���iy�6,����>!K�Y��ֵu=}T��_���	������ʲ�I�gV|�m�~پ-:����w�I������S�F!sȫ������%�o���`iw&�M���}f��ٟ+�Ŀ����æ��"+o�#�+��|t�&إ?\�W����{n�9�SG��c�`��Y��T��~��<WC
��'�=��xQ�.Os�q�2�ɺ�p1��{��b����b{qNѴ�j!c)<���_�"�NR����K���U`�t^�]��U��^���F�	�Z����ش�9ZU���"�9-������l�5eJ#ԣ���[��x]�T�幯e�k�<
n�Wh��7�)�#�+���F��ϓ�l�c�t/��͏Ưk^%[�F��⼮�S{h7�`G�W��/4��־W��K�D�%���J&w�����̢�tv��'��5����,��9�kͼG��������_��x{?g3�2(AC�f����;e��k9'���V�%V,:W9��
ifS$\Eֵs%�#m=k����B��I�_��s�$�>*�w\HcMy��xL�� ��]��m�b@8��5yR۲GҿV�1/
���C��a)�h{��o���.o��^Y%��y<W�k~�XB����x��2YH�
oj�{��zx�J�?�8˅k��n[����'�lŇ�j����Gʃ׽m�&(�ܩ.?JÚw�픀��y}y�j�C�"����+>���$���B�[�U�X�L�X�G�Ig���3�
3Qэ�|�6����γ��z�%\=5V[2����,��;w��
������9PkHnǚs�Z��nD�OLW�N�K���<�FM�%�6��+��o.�ۘ����_�|�c���Ӯ��w�Kd���a_ef�E�x�Z��SM4�F���h0�&��[g(��߰��lլ�7�풠u�+��2YZ��8nq�F�5?j�!�@����������aBm�޻�U����g�h/��>���")�Lf�p���b��]�y��Mli�}�rX;C��jՋ��l�	-w;���XCu �/}��-;�WzƦ����`8T�}j���Gt�j�_n�ږ��-CQ�m��<�+���%KO/�2�T�ԏ���:���_����մ�F�L��)�o�_P���ŷ���|�2Kw�V��I� �Dq%�/u��b��~f�����ٿ�k�|1kv��kq�&ky�b�PA� A�9�Ml�E���ڷ[�������
&6���d���F9o-��q�fbp:W�\O�Xl�<�w��.�5G�t�k��}M��}Ye�(�i&���G�5��jR���d2�+��NK9�"I�&�����!���Z��ޡ��DQ0�^zT^օ�N�Ma�g2�o(|'�a�H�S�*;��u}����ץ(#�#��r�g�'���Q���!�)sZ"$)���P{Rgw�ݎ�D6.>����Z��L�P@9�5��t��⡑��@	#�2HI�S�oJ�����b$�H?z�i�����[M)'�-z_�O�3�^9��Ϸxbb	�NM8НGh��U�Ҡ�9e�h�:��;��Q��-�������L�����g/�'զ�ijv����I���+��0.�$�ֽz�+���OF��M��_�?��-����I��h�Y��p-#�h���w8�֪��V�\U�!Y�>"U�*�o�h���o�r9z��c���:�
Y7�,U��^{�x�/G�=G���JE���MC�g-��6�����y����J�/�\�?�H����x�B�?J������dW�A�j~>g��^�]k�b�<W��Mg
.+���M›>m�$��	I9ɬ�6�;zԺ�Ǚ�H�Ξc��_�����������Mi�kC��d�T>��&���8���ɢ��	�.N�Ǚ殜]:[��p�A����VV����vP�/�+�~xfѧO" �=My>����[t'�s^�����r�'�S_��j���9j�ꜢT�aU:]�d�׆ݭ�-�TZ�|9y��98����.�-�Wg���]@W�����le|E)7�G��)nc鱝�)���]֑�-���ָ�n4��G�kO�ڜv��i0G���t��������[��$��@�6k����<W<M���)Ȯ~MT]?<�F�
P�G�DӚ�]DY���\Ʒt��zV���W�A�0����z�5�͞��Ե�s��M���;u�?�4�K����o�Җk��x�J�_�p/�]�g<��\�2䓦�~p���jWkmo��s�^$��1�=��48�%p�a^Q�{�5 +9 W��������Wu�4m��7S�x�C�
+����w�ﵭ�И$U��D�|ǚ�yal���`i�#�5sͼi�#�{e
��^i��C+��}	v�t�p�j�����=x���x�+�]��8���9���Vx��,�h���j�����f��t�E���P~*���ս�pE}}%�7��+�b<6�R�U��ӱ�Ũ�e��*k��/b%Z�.~��c�7a��O�7��Z寧��>X�]o����Es�v�ѥ{���\��1�/sP�o5����]�xP���!W��R���əP�t�b�&�H�-}O��e8�4����P��"�������k���~Z�O��%f<�iW�Mm6���n�-�tG�ڋT�fdV���d�{V���pعp1�U����č�r)�o{���c�E<B�nC���b�`��R[���<��^+�����c��kk�Bu���t?Iy*�����s�3*8ʭIX�ʸo�W�=6��п�-mn�5;�c���;�+᭱��ӥ`|5��pΆ5�{����ǣ�r�`	^+�*��e���O�����u�>j�j�z3�h�7�ʙ�<V��}_�*Kg&�S�lj���3�p��?�H�����p�������l���I7��x�MЃ�wnj��&�U�T��%�>�?
��1�i7s�Mc���D�c���3�����\��ͫ��Lv����ۍN@�P�+�5�C�w�'��_�YI7vZ�S�ߺ�aV�:Z�V8&n)�zUƧ Kd���M}[�	�}�4o�,�OPG��Ÿ�'����FkP�1�<ץG)�WW�<\NB��՟�	��|I�9�Ci$H��M}�	�s��R�$��w+�_���a�Ƃ4\w�^�Ꮑ��t��^�%�
e��x�"�WHh�����?��(�Y�#�^��/�~�C��ڢ��?K�uoh�dc�h<'C�@?
��բ��2�WyH��|6�JU!�Wm�1�3Z+��\(�����w��5�F��M��Br(��7?�� ��1������p�$<�Օ{�<�s]��\�q�x�#q�k�����k���f#?�g��L��^�]{�9��'޲n�K�9c��5.��ƫM��rs�E�ۻ�`���yŝ[�1�I�u7z�ț=�y�ĽTy2���'��g���(E�K��R��j����zS�K��}Nj��|u��-���ݚ�?�
���N���澟��z�&��9�)r���v�QS� �qּ�u�9F;�q�8ړj2�d��V/ss�z���������@PzW;�X���~�'����K銤8-�(=>���{�VžX��G�q���>��ĖѠ,v���ks�3�3�g=q_3x{�:ۙnd;3�\�k��Ʒ(��K�䞙�W�cxw�&��>�BS\�G���yi������e9߄����lNA#��t���,��-��J�:7
����n��$Zյ�t8'ڠ�1�NJ��Q}߼9�i�_i�>��<'���z�����J���f2)y>�j�N����P^x�8���+�4[���9J�Я�x���	����įy����Mhx�ZV��X?J��u����&��/�E%'O������g�_hs��W?�u���ƍZ���.�I�T���L;f��N����M�D��O"V��=2kI�� �=1Z��X��<��/uh���}k顊m'��V�a���f�E�9ZK�B����_ll7N�����U5c�($�߲9#��ۣ�ry>��4���5�*����V7kR����[�tNp9�U!�r8��Y	�s֜�R�AG���*�]y	5���P>�Vm6+�1�y�V^�W$��Q@��[��꣏��Z5lj�rپiQO�C'��c�O}&(Hd�j�s��q�VE���;�j�s	G��v<o�w&�7RuA�$�NU9���Td��R�\y��ПZu��A�<��3U)����̟/��t��I��:le��Z�Й�-A#�|��ܵ��	9������P�u�0�kb.�+����2�O�&z�b�G�9j�����~�k2����[����#~��'ƿ��4�1 �9��%�cUI��Gg��5ͫ<�[�mW���/^��g)�5�u��V��{��+r�^~ɘ%N���~�',C��{����)��*fl�*�K�h�$gc��eៃ:׉�U��u�܃_+Jn�G�N�i��g$�ۚ|�^��7��e��>��Z��,m�$�	�+韃��O{;-��T������շV<lV}����>�O��U�����Xs^��	ߨ��&��0<�����u�$X��M�.?ٯb��kOܨ�5�a�8CY�|�/�j��#⿅�O=?H�#-�'�ᯠ��!�i
�]��z�}�x��׏jݶ��*��)`��>z�>�WyH�����E�*����I�mok�ݨ�+�����N}���#��l�c��U��G�S�d���R!���T�&��lRq�&9,վ�J���ԗ��)���(���=襠����Wf�MP�T995�6�ב��s��~�Y�\ڟU��˩�:��	���[��.�3�b�W��O�`��.��
s�렏��3���-X�k�wX�u��yw��c3��]cX�	�s���)��f<�>�Zן)�y���8�nBd8�	��nN1W5F�I'��|G��;N
yXJ^�ѱ��˕����lT��cV\�$zטj� ��m�95��;v�Ui�95�K)��3�)e�N���a�.$�XՏ�n.�c����)j�V+�ڻ�0����2E|>p���q��1�XI���|%p֤4�B'A�����e�kKw�4W�w���Cgr�!]��W�chƫrj����_��W+��W�&�mk�6�v�H���'�y� �-�������C�]�"B�5��3�T璴F��RrG���:�O���8ݛ{���+�|)�Ʒ�Ӷ��]E��E�{���ϯ�ʌ�KAIʓ�='J���#�L������*�+1!`�Ҩ��I��$�5�C+�g�c:t��h����$�0�A\�$	ț���0��9��������kڡJ4�٣��b-fk�Ԣ����U���M�އ�C��t��x�kޘ/-�F�v+Y?d�z3ا�/����1�?�<��������ֹw-��V��a�W����+]s	;�ЊD�wz�H��f�������$�k��N��մ)#�l� �ͫ4C�9�ӜF[ �Y���N���ITj�%LB��C�r@�:�V��	"�/���QZx�#q��T�/�qK�@�������j�D=�>$�+�5����UϔF+:q��nS��T��ӽ�䕉v�k6�Qا�����!�
S:��7�I�FIu0�au:[{�4��֍�
?߮oM���֭����汫N{D㭘�]3��-R,g�����N���5��)��oϬ��1�>Y^��h�L׈�a�&婵�o<�0V<�kŖr�n�c�ֽ�ßo�i,j�!�W�|;��g�V3yf�v9)��/'�V
	%�?�x�6�ӫ)7�>!���W�:�}���Ԋ��v���mt��p����>�>��f�I�@�?r��=�/�xv�ۨ#�_CS��x||���>e�'�
GA��PN%k����5����������0���?v�j�]3ö�1����
*+Dc���Wwl�|������^�umb��5�\�gK���SG��l���k�l�ެ��F��@UV�*���
�������Mth�5e�lԊ���Rb!��R|�
W<X�YiE=[�Yq֗��CwԒ�i��T�i'� -�z��g�Ty�ix��b�2n=js�9��y~n�+Nwb��E�4�ds����ހ�E$�������}y�>#��ֹ���qY�>$#9z����[s�<g�֨O�L�\�׉:��N��q�^N[��Ú�g?��?=Q��'9�\]Lj�n5Jos�5Kw��s�^}���k��%�	=�Vҵ�=��ڛyq�6zu�͸�~�C�s7f�9�j*6oJ�O�m4�G�+��!��O"��P���Mvdtl��80��|�[+$�����zV=����u>�;c��19�1�1\��;(�A����O�^���Þ�$W����q���;ũo"�rz�|�&�X:�W?B�."TZ�ݏ_��O��lz�=jDwp�ɪ�2�
۟jν�7sp~Pk��8	R��G�~Q��J*iݱo�k��.�g�t�\�y$c5��Tt5��#'ڷ&vֵ��{&����'�Ж1
�<�z�j�q��^٬�5���u3�,i�����ξ[�JZ���R�2�5ζ�r��*����j�[�"���Q�Ş�P��Q�,BOB՞���]��NO�\��A
ki�+�ج�4a%���I�M�L��ެi��ӥ�Z���YH�s�aG�s��|55)rIho���f>�][�w�&�.��j�{�߂{ջ6��5����]f>�h�ͬ\s�Tn�"#��yc9��wP[PA#��ۆ��;E�u�I;
f��G��<VM����sf�n5�f;H������<�_$�e�c^��KqX�x��~f���Sյ�*r�>��j��X�د����j�)��Gu#���{��O�E��
�V����)����;�zة��y��=���z#��zB���A5�#��*�:�jH5K���y�VM��n4���zx�g"�\x�I�e�<�\晣��.
ϵzO��sk7I�#���i�T������W��.X|�^���p���J�C���s��M�#����O���%��:����7»mc
���W���;�|v;V�|�3?g�ٞ�I��}Vّ����~
�?����m�J����>S2ax\q^��_�2�8��#��w�J
74�5�_�iro���D�P
�q\Β�֢YA�ih�#�n� {ק
�QW<�ғz��p�/ɓQ�2���`K��G����B�J���P��j���n#+a�E*�b��
R}���W&@n��`�j�/x�5]=]W��B�ɡ�sp��2["���_�u� �g�$��Nk:rq��*q授���~V��('�5Fo�g(0�b}댾'T��s.��j�4���������7���]OG��_���H�����ʁ�q^%��Zf�P�[}+�4
xɣ�#/��_�]0�K�R]KP�(<�U �K�ҳ��Yn�I��9�*!��_Pk���h�y՛�QVjT�2*���4`�������cR�Tc(.�إ���5bk�)���>ќ����]������z�$�t��m?7J��R��cZj);Fɫ�O��z��M|��8Vw�{�*�.M��b��'��k2��Y���n�]'?5f��d���Y9�v:{�u���ƿ��W3q��ުI�pj%2�N�}w9�Ui5Þ[�5�>����B���Z���B�xKQ3F9�[����ٳ�q^��푉��OT�nFs�|q	b1��pr��'��I�A�5�ghd�{���B��]r3Lk1G�a��p��p�+�n@�]~�U`]������]��I�W|@�[ʄ��c���uW1��O�bF+��Бo6�~�Mn�
y�YZtbI�F��ʔ(��z=NJ�Rf�!kD
��
�g���k�׵?%�4�SC�rk�e�Rŧ&����]�-[�����#��^,���*�ǽxŧ���Kpz�x��~s��|�+�]ge��8ښ����<Lu�@ls�j����7Z�
�J���5��$YHP�ך��Y,�˗�D{�N#�⡤�=��Nr��k!"���޸�#�	{c9�R�����a^L�MQ�qi��t�� ����]aY2k�b�vK�֤Z�*[�ʾ\�k
x�N��-%��z�5���Gb�
�'��峚�u�u���{��6��F�g��X�V�|P#k��[
�b���/8c�W���WK��`��]���\�<K����\���l�s��a�]��,|����^� pjL��V~���-_�J\�{�
牂���O
jw�+��S�|"�/y�$?���
t֬�\gΣ�+�4��{VmΠ�9�=q^�o�R�r�H3��_������F�DžS���y)�INv���B���^������WM���W�:�v�1=^�O�U�?����.YX|��b��	|6iʗ\~���uMF�8��A��^���o�'d���:��VrO��u�Q�(Rë͟1�6�>�#k[v|��ֽ��k�.H�ؿ���'���m"�[x��*�x��X|0�툀Ypp~Z���#�x�R��|!�$�$iunPv��|�h�ˌ�Ê�o���5����p1Vc�M:�]�R��N�,t<��}�нG����5�鷑\*I!�2��
�����W�_�Ķq��+�b9�c
��U��WVS�U�:���ǟ�}jDѝ�@��^��կ�6�DG�V~��7ȷ
=��eo�V��U�+a�N�nz�3�O�Z�im���'8�y��Mw-�M&��q�����@k����x�R�R�Lԡ�5i�@��0HS�W�W^�ű�OB*�j|�-ψ~#x�i:l�-pX@�����F�ះ ēHO�T�֝nj��"q�͡�i,
�:��`�����/��%�m�.9�p�x�vu/'��>+��,���������V�=��:mEg\q]S�2�-�Y�kW��4�Q�r�M{�
-�{x�=�s��[Ԏu��ʁc��n�466��5PzUk]4�/-̹
�V�)��1�Np���O�~^�kJ��Ct�#�4}����%�f��	&�Vy�V��TܴF���VJ�;�9lf���W��8Y���v����w���*���)�b
)��R��g]��Y\L����S�gDF���#�W�x?�$�ωo�"��m�0� ����y���G�&��AK�Ӧ��24wh�F�"��V�)%{�2�*1��އN����>�#*ݶ����8�{��X�œ�����[{2��m�%f�J��f�ܩS���g:�机#�h��S<�SEu$���o>�q��Yu2�n���f�I�k�s��*e�/�w���~�
��RGC��PB�g�y��,T���m�D�t�����ƶD�`@5��LaU�-<�=s^6
-���ѻ��Y��R�$-Ҷ�5��6�Mq��3��N��u�Lq��E�<�mƹ����Ic/�i�_Q���EW�QW�W�[�Q�]->n��
n�Ϲ��]@�Oj���PG�dTc	)2��u,�Gz��G�L��ϸ$�|*6��hSJ)I��;�,���G�(]M���N�TL8�:XxKty�Uir������U�7��G ����b;}h^�U�˨VV�M��8�<��&z^��Q�
��l���
���#��x*MiZx�Hq�Ҿg�p�r�}V��Q�j��k��l���[�[���כX����	�:ס��o��#*�N�dn�P�~��򘼂t�>�
�4�M$�'��.5����Jv�������#��d�m ��dTV������m;T��X�U�B7}s_���π�/
x��LHd�0����ՁɣV�v}3.%����u?�0~ƾ1�]��K�+��m���S�;���[����dS�)�����zO�H\k�q;�m���/�:h>�>�g��>@+��_**�w<ʜC*�M�	�(����V��IZ�?�)d����ܮk�Y�kb�`��'�Bօ���bA����X{�y�sF���?��{��`ğ�ת��	+cu᧼�����q���/�@β\ģi�ع�M*�ɜ�G@+�XEݜ�4�k������U䑥��F�;i�߰�
s�E��k��j���r���Sxw���J
��ҝ<59-V��iQlτ,�b+he��=�Z�?�^�bEƧj�b����	 �C��Z�W��ymv�0+O��-"e,�o�,��t��:|`tN��c�K���(*�8�6�𽦑�Dj��������=
eK�gWu�8?j��[]�ML��/���h��y�:��=7��I�aW��-����D\�L�'Qr�K��ce�˨Y��\g�_|5�_�H��y�k���O�di�z
n��+Yc���ܚ!��2�>��G�W�qauxg�̓19�w~
�r��[}.�}�"q���Oģ��{��Os�"���t���"�*3�6m4�V�K��Ua���d�V���X�A���4�}>�ӵ��@JI>��^Ae
�b����tMrks�2�Яol�xPk�zֹf��j��`�:Wa��U�ët�:қ��E���5t��+�Y��Z��4�jQ���M�;3�+�>��Z�����q�t�
��8%i�猰��Q	�g	'v&��e�zRs����T�֨�$��P�#mHї�P��lL���0+�M*%�G��5[T𽞨����&�*�C�J7ԡoq�zM)s��5GW���[e��IF��;V嶉�g��
�S!�c,aڵP����Q��"3:1#����tiLg�d�u�Z:�"��A�ozx����M�[�u{lMƵ�I��WwS�MD-���1�FK8'����@�y$��k�����2B<'i�m��H��=	�JƲ�c}
)^N�o�>�tK���-�K
	��rN�~���~2x�ᙆxz�ó��4�S�ZNٕIL�F���u��lo`�/��N��o1���9?�{u�_^�.�5��Z��][8�,s((��x5���J�Z���8�<�/�o�u,�����T.���Wk�+I��<�
�GJ�)�>��z��"Mo�%����|������j��"�h0]�jR�nn�>"�eeb�ٌQZd���rX�8�?Zr�O4�J�n{�
X�U��sOQ��Ke%Me�#�5WӽK����-��k[D
�+�ғtx�X�G!}�҆��}+����1��	n8��k��,�B+~�|Frk��5�\�����3�o$��g�w��Z��_)�~�p��sZqͺ>;��a#�#ЩF�I�/�fjȽ�<�Z�����N�完J�=��9�@ISREs�sH��|ӥM5s��R�z���7$���"$q�]��k�?���]�3�L��Eo	��vʒ�Rf��x�'�5�W��U���kyu=.M�\ҡ݊�
��?��MC�=���P�`��V�q�ڜ��6��o��
x�������������}A�;���?⇗6�a5��H*s���>��3>|��=E�C��:�=�.���#�������&���E����?����T��gn]S�;��	������2�J�ycn(
}z<'gg&��E?J�,�Ő�,7��+��J��5c�|3�_K��@[�Ļ}�[w~�m��5�v�\G�9>�n��c\��Z***�"U����5��g*Ld�_�W7��]t[b�=@ɯk���N@5�jڅ��^In��;�*$e�Ϡ�5�[
�d٬1.:�o����$��2���\�Z�r�
Rx�P0r@���/���tKH�e�$�l1��k'H�+چ��{>�s����e�Ƶ����U�J�O��$��-|H���V�>���ֈ�0������-�z=�6�1�N�����I�9�*R���D+I{��O��O���^*
1�P:Wc`%�l�][In�
���G[��uu�#E'̄�Kfr��<�݁��jŵ��p��]�v#l���Y�a��Ғ�Nx�HPG]���-�<�L��Gk�Y���LMn� �p�t
d�\S"�Rً�C�ir���s(��@9�=��[*�2I�����&����uB�=������A��3�����7u�N���Opzn�%��_S�"���R��	U���Ě�
�����9ɦ��h\�&D��fq<��9��W�V�L��\����S�Id��A�"0@?������5���tYe>V~�y#������=Fäj0:���*����֫K�ȭ$�7�'vOҺUM�=��\���B�G�������0X{��eZ�Rr��R��剒�t[MA��/�q�9�nM�*�#�wk�9��q����|K{'Ġ<�j�#���%��Y�$$�u�@�zG�����[ͯ�f����u*K�H�H���8�*�e6�N)]�p�c6�g�Zj�xa�H�Yc�U7����V��>Q������I��k0�^��޲�|ɕ�D�UQ�����0'uv�Up3�^���B�Meh*r�]�HY�h#��d����䞀ⴖ��@����ǽt�a�T&�������l��2p?*� \,K�	��)��u|�T��k�Imz0:JD��\��ű�s�kE#�����q��4ęUa|��ڟ��*�U���x�'�M&5s��Z^��-"���j����.�㠐�(�	�tA
<-G��cNyw!������(�aU��~����ӄuz"^�BQR��\�S�Z�.
�"��^;=�s�i�s�J��O�Ơ`��N�ޚ��5*�jY�z�xʮ}kz���ǥaim���g�~�����.V�g�u���t�WU�?�}���g�)#ִ�a��i�e ��P+f��VN��t�v���Rff�2I����u;��Q���e�X%K?C_G�	��q|^����O�����b?Үb0��Xd��F�d_�5sQ�~ͨ~�:�T8f��W�X�jeUT�������c�B��;Զ�,�o's�c�2�O�W��/���?�,�z}"�b?}v�N=v��=�6��~͖0/��5`�łfx�;RM}9�i^�X�K+xD�y�e������*����N�%���ٵ)F�?,LW��?�&���t1x[��@
�%,�e�\�(��e���RTwa,D��s�/��/B�SJ�� � �I4�Te
1Zb'88�>r
ZIlf���(�ʠ���P�x��둒�S<����㧩�"��_!Fr�J�8M.�7*D�%�`����L�J�Mi�A�qO:c�*�$����N�s�-{�l�ۖ;ɳ>�R�O�l�'&O�kV��0�6^��ܣ��R]iz��Z�5L7MÑ�[Im�*��5�UE
��N? �Zy�N�����(�A��6}*��Yd�32t'���<�k|���H��G#��
E�g��;`@=�*�Ƥ4�i;�1�´dP��~�ϳ1�W�Œ�
��|M�僟Lu�� ��t�6HI��c�5I�4O;�'�;�?��&霃�Nj�]�;��s�U��[,�=01�� 3��"|F�c}�>���
',ř�㓓��zV�[��~g���?�(�q�\�zq��w3ΐ�t�aܒi�Kq7����}��M�O�Ϋ�(��鰔�vUTLrIl��d�vW��y�bclz�ۜ������4�y�+M� c>�ME �*y�sK1=x��U�'�c��݊�-[ݴ�fm���Bo!�=�W�<F�N8<�bʃBگ�I�,}�U�D"��?œ�)ɦ�e�;��
7*
��p1OHJ��M_Aܤ�-���%m"��
�3��T.}�����>�Ew��f�P*���H�f�4�vJ���������;�p�MO�֏-��~�����!�
r'<-XX��G��P�D#�)���<S�Y�@Xj"����z�N�P��j��8'�=W4픜�G�S��p�KS�BzӀ�R��(�wҞӭ"���9⼛j{���4��<�“�ҰǨ�s�SUsҦ�OL�H.�zd� 
�Iv���o������5�p�|%�|Cq+����??_���;��͵����?�����y��S��yx�.��w�y��^�D~ek�x�OA[?�c�����
����ѝ����)�2�L��i�0�����m{��6_j��M��
�~Q�
�S��7�N��:6����@�+��V��+#ȧ�Pw�����?���'�
j���m�?��~�|3�[6r=7���S�!�?�m���}={T�n��|���+�q���Tk3/�p
z��(�Z�*0Z���s�Y�x� �ig*�\W@c�V*+��2`�[�쐮���SZ��	��!셲GԎ+�1Q��帎�w��?뺏�--��-Ưyv�#�'X�p9i$s�Q�������B��$�zԊ7.�֛�`Ql��,L�:k���ɳ,�B;.��s�=�\*��ɧ�;��\�i���ԽKJ�a��O֗o�Á��"�y��BBU����1T��lZV�;�(��֚H��*Ql���'��~����02��J��$���74Ӕ_��ӊ-`�Ǹrs�ґ�EZ����i����'a�C�?����h�l=qȫOG[�eLb"��
��T��EqlT�8�T��p�}�H��\!.AC&��1���?�F��y��}
L"L�zӉ |�n�T\T^ʽ�E���S� d���9�ʖ���@
p�"�cD�EO\ML�7���r���
��l��dRO|u�"<Pi���9�L{Fiȧ��L}�B��*vD��a	>Ԫ�?5L�;Ҝv�""�t�r*]���z�	�LqCJ�s�
��@E?o<R������x�=�r�j�SҜ8F�
J` �֜:QJ��ӂR��-HQ@Q@Q@��P��PKq9�Z#��//)tests/329_imagick_getImageBlob_empty.phptnu�[���--TEST--
Imagick::getImageBlob behaviour on invalid images
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

// Fails due to image having no format
$imagick = new Imagick();
try {
    $imagick->newPseudoImage(200, 200, "xc:red");
	$result = $imagick->getImageBlob();
	echo "Imagick failed to throw exception" . PHP_EOL;
} catch (ImagickException $e) {
	echo "ImagickException: " . $e->getMessage() . PHP_EOL;
}

echo "Fin.\n";

?>
--EXPECTF--
ImagickException: Failed to get the image contents (empty or invalid image?)
Fin.PKq9�ZVQ�4��*tests/101_Imagick_quantizeImage_basic.phptnu�[���--TEST--
Test Imagick, quantizeImage
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$numberColors = 64;
$colorSpace = 1;
$treeDepth = 0;
$dither = 1;

function quantizeImage($numberColors, $colorSpace, $treeDepth, $dither) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->quantizeImage($numberColors, $colorSpace, $treeDepth, $dither, false);
    $imagick->setImageFormat('png');
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

quantizeImage($numberColors, $colorSpace, $treeDepth, $dither) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�E[*tt)tests/154_Imagick_textureImage_basic.phptnu�[���--TEST--
Test Imagick, textureImage
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php


function textureImage() {
    $image = new \Imagick();
    $image->newImage(640, 480, new \ImagickPixel('pink'));
    $image->setImageFormat("jpg");
    
    $texture = new \Imagick();
    $texture->newPseudoImage(640, 480, "magick:logo");
    $texture->scaleimage($image->getimagewidth() / 4, $image->getimageheight() / 4);
    $image = $image->textureImage($texture);
    $bytes = $image;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

textureImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�ۅ�cc.tests/029_Imagick_adaptiveBlurImage_basic.phptnu�[���--TEST--
Test Imagick, adaptiveBlurImage
--SKIPIF--
<?php 
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$radius = 5;
$sigma = 1;
$channel = Imagick::CHANNEL_DEFAULT;

function adaptiveBlurImage($radius, $sigma, $channel) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->adaptiveBlurImage($radius, $sigma, $channel);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

adaptiveBlurImage($radius, $sigma, $channel) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�ZN��DD,tests/282_ini_settings_set_falsy_string.phptnu�[���--TEST--
OpenMP segfault hacks

--INI--
imagick.shutdown_sleep_count=Off
imagick.set_single_thread=0
--SKIPIF--
<?php 


require_once(dirname(__FILE__) . '/skipif.inc');
 
?>
--FILE--
<?php


// So, this can't be tested for properly. ini values are stored as strings internally
// to PHP, and are not normalised to the actual type used by an extension. Which means
// you can't easily get the actual value being used by an extension, when the input
// type isn't the same type as the extension is going to use it as.
// aka 'Off' is stored as '' not 0.
//
//$sleepCount = ini_get('imagick.shutdown_sleep_count');
//if ($sleepCount !== 0) {
//    echo "imagick.shutdown_sleep_count is not set to 0 but instead " . var_export($sleepCount, true) ."\n";
//}

$setSingleThread = ini_get('imagick.set_single_thread');

// This should be a strict compare but can't be because
// it's stored as a string...
if ($setSingleThread != 0) {
    echo "imagick.set_single_thread setting is not 0 but instead " . var_export($setSingleThread, true) ."\n";
}


echo "Complete".PHP_EOL;
?>
--EXPECTF--
Complete
PKq9�Z���uMM*tests/299_Imagick_rangeThresholdImage.phptnu�[���--TEST--
Test Imagick, rangeThresholdImage
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('rangeThresholdImage'));
?>
--FILE--
<?php


function rangeThresholdImage() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');

    $imagick->rangeThresholdImage(
		32,
		64,
		192,
		228
	);

    $imagick->writeImage(__DIR__ . '/rangeThresholdImage_output_image.png');
//    $imagick->getImageBlob();
}

rangeThresholdImage() ;
echo "Ok";
?>
--CLEAN--
<?php
@unlink(__DIR__ . '/rangeThresholdImage_output_image.png');
?>
--EXPECTF--
Ok
PKq9�Zc>=�--0tests/168_Imagick_whiteThresholdImage_basic.phptnu�[���--TEST--
Test Imagick, whiteThresholdImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$color = 'rgb(127, 127, 127)';

function whiteThresholdImage($color) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    //TODO needs a control
    $imagick->whiteThresholdImage($color);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

whiteThresholdImage($color) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Zݞ�``%tests/179_ImagickDraw_line_basic.phptnu�[���--TEST--
Test ImagickDraw, line
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function line($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);

    $draw->setStrokeWidth(2);
    $draw->setFontSize(72);

    $draw->line(125, 70, 100, 50);
    $draw->line(350, 170, 100, 150);

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");
    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

line($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z� L��(tests/259_Imagick_colorPoints_basic.phptnu�[���--TEST--
Test Imagick, Imagick::evaluateImages
--SKIPIF--
<?php

require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

function im_check($value) {
	static $count = 0;

	if (abs($value - 0.5) > 0.0000001) {
		echo "Unexpected value of $value for check $count\n";
	}

	$count++;
}


$imagick = new \Imagick();
$imagick->newPseudoImage(640, 480, "magick:logo");

$imagick->setImageFormat('png');
$v = Imagick::getVersion();
if ($v['versionNumber'] < 0x700) {
	$imagick->setImageRedPrimary(0.5, 0.5);
	$imagick->setImageGreenPrimary(0.5, 0.5);
	$imagick->setImageBluePrimary(0.5, 0.5);
	$imagick->setImageWhitePoint(0.5, 0.5);

	$color = $imagick->getImageRedPrimary();
	im_check($color['x']);im_check($color['y']);

	$color = $imagick->getImageGreenPrimary();
	im_check($color['x']);im_check($color['y']);

	$color = $imagick->getImageBluePrimary();
	im_check($color['x']);im_check($color['y']);

	$color = $imagick->getImageWhitePoint();
	im_check($color['x']);im_check($color['y']);
}
else {
	$imagick->setImageRedPrimary(0.5, 0.5, 0.5);
	$imagick->setImageGreenPrimary(0.5, 0.5, 0.5);
	$imagick->setImageBluePrimary(0.5, 0.5, 0.5);
	$imagick->setImageWhitePoint(0.5, 0.5, 0.5);

	$color = $imagick->getImageRedPrimary();
	im_check($color['x']);im_check($color['y']);im_check($color['z']);

	$color = $imagick->getImageGreenPrimary();
	im_check($color['x']);im_check($color['y']);im_check($color['z']);

	$color = $imagick->getImageBluePrimary();
	im_check($color['x']);im_check($color['y']);im_check($color['z']);

	$color = $imagick->getImageWhitePoint();
	im_check($color['x']);im_check($color['y']);im_check($color['z']);
}


echo "Ok";
?>
--EXPECTF--
OkPKq9�Zh�\�>
>
tests/014-setresourcelimit.phptnu�[���--TEST--
Imagick::setResourceLimit test
--SKIPIF--
<?php 
$imageMagickRequiredVersion=0x692;
require_once(dirname(__FILE__) . '/skipif.inc'); 
?>
--FILE--
<?php


$k = 1024;
$m = $k * $k;

// These tests are flaky as the values ImageMagick will accept
// are limited by the policy.xml of the system.
// Also, it appears that some versions of ImageMagick will
// reject overly large values. e.g. setting RESOURCETYPE_WIDTH
// to a billion fails. Which is not totally unreasonable.

$tests = array(
	Imagick::RESOURCETYPE_AREA =>  100000000,

	// Set maximum amount of disk space in bytes permitted for use by the pixel cache. When this limit is exceeded, the pixel cache is not be created and an error message is returned.
	Imagick::RESOURCETYPE_DISK =>  100,

	//Set maximum number of open pixel cache files. When this limit is exceeded, any subsequent pixels cached to disk are closed and reopened on demand. This behavior permits a large number of images to be accessed simultaneously on disk, but with a speed penalty due to repeated open/close calls.
	Imagick::RESOURCETYPE_FILE => 100,

	// Set maximum amount of memory map in bytes to allocate for the pixel cache. When this limit is exceeded, the image pixels are cached to disk
	Imagick::RESOURCETYPE_MAP => 123 * $m,

	// Set maximum amount of memory in bytes to allocate for the pixel cache from the heap. When this limit is exceeded, the image pixels are cached to memory-mapped disk
	Imagick::RESOURCETYPE_MEMORY => 234 * $m,
);

if (defined('Imagick::RESOURCETYPE_TIME')) {
	$tests[Imagick::RESOURCETYPE_TIME] = 30;
}

if (defined('Imagick::RESOURCETYPE_THROTTLE')) {
	$tests[Imagick::RESOURCETYPE_THROTTLE] = 1;
}
if (defined('Imagick::RESOURCETYPE_THREAD')) {
	$tests[Imagick::RESOURCETYPE_THREAD] = 1;
}
if (defined('Imagick::RESOURCETYPE_WIDTH')) {
	$tests[Imagick::RESOURCETYPE_WIDTH] = 15 * $k;
}
if (defined('Imagick::RESOURCETYPE_HEIGHT')) {
	$tests[Imagick::RESOURCETYPE_HEIGHT] = 15 * $k;
}

$reflection_class = new ReflectionClass(Imagick::class);
$constants = $reflection_class->getConstants();
$resource_constants = [];
foreach ($constants as $name => $value) {
    if (strpos($name, "RESOURCETYPE") === 0) {
        $resource_constants[$value] = $name;
    }
}


foreach ($tests as $resourceType => $value) {
	Imagick::setResourceLimit($resourceType, $value);
	$actualValue = Imagick::getResourceLimit($resourceType);

	if ($actualValue != $value) {
		$resourceTypeString = $resource_constants[$resourceType];
		echo "Error testing $resourceTypeString, value returned $actualValue is not $value \n";
	}
}

echo 'success';

?>
--EXPECTF--
successPKq9�Z��c���*tests/099_Imagick_oilPaintImage_basic.phptnu�[���--TEST--
Test Imagick, oilPaintImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$radius = 5;

function oilPaintImage($radius) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->oilPaintImage($radius);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

oilPaintImage($radius) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�$�:��tests/018-clone-length.phptnu�[���--TEST--
Test clone length, this is expected upstream behaviour
--SKIPIF--
<?php 
require_once(dirname(__FILE__) . '/skipif.inc');

checkFormatPresent('png');

$v = imagick::getversion ();

if ($v ['versionNumber'] >= 0x640 && $v ['versionNumber'] < 0x650)
	die ('skip seems to be different in this version of ImageMagick');
?>
--FILE--
<?php

$im = new Imagick ('magick:rose');
$im->setImageFormat ('png');
if ($im->getImageLength()) {
	echo "Image created has length" . PHP_EOL;
}
else {
	echo "Image created has zero length" . PHP_EOL;
}

$cloned = clone $im;
$cloned->setImageFormat ('png');

var_dump ($cloned->getImageLength ());

?>
--EXPECT--
Image created has length
int(0)
PKq9�Z.7T���+tests/033_Imagick_autoLevelImage_basic.phptnu�[���--TEST--
Test Imagick, autoLevelImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');

?>
--FILE--
<?php


function autoLevelImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->autoLevelImage();
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

autoLevelImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�~�;��'tests/136_Imagick_shadeImage_basic.phptnu�[���--TEST--
Test Imagick, shadeImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function shadeImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->shadeImage(true, 45, 20);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

shadeImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�_�ss%tests/077_Imagick_frameImage_im7.phptnu�[���--TEST--
Test Imagick, frameImageWithComposite
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x700;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$color = 'rgba(255,0,255,50)';
$width = 5;
$height = 5;
$innerBevel = 3;
$outerBevel = 3;

function frameImage($color, $width, $height, $innerBevel, $outerBevel, $blendOption) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");

    $width = $width + $innerBevel + $outerBevel;
    $height = $height + $innerBevel + $outerBevel;

    if ($blendOption === null) {
        $imagick->frameimage(
            $color,
            $width,
            $height,
            $innerBevel,
            $outerBevel
        );
    }
    else {
        $imagick->frameImageWithComposite(
                $color,
                $width,
                $height,
                $innerBevel,
                $outerBevel,
                $blendOption
        );
    }

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) {
        echo "Failed to generate image.";
    }

    return $imagick;
}

$blendOptions = [
    "null" => null,
    "COMPOSITE_NO" => Imagick::COMPOSITE_NO,
    "COMPOSITE_BLEND" => Imagick::COMPOSITE_BLEND,
    "COMPOSITE_COPYRED" => Imagick::COMPOSITE_COPYRED,
    "COMPOSITE_ATOP" => Imagick::COMPOSITE_ATOP,
    "COMPOSITE_OVER" => Imagick::COMPOSITE_OVER,
];

foreach ($blendOptions as $name => $blendOption) {
    $imagick = frameImage($color, $width, $height, $innerBevel, $outerBevel, $blendOption) ;
    $filename = "077_frame_" . $name . ".png";
    // $imagick->writeImage($filename);
}

echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�H&__*tests/167_Imagick_vignetteImage_basic.phptnu�[���--TEST--
Test Imagick, vignetteImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$blackPoint = 10;
$whitePoint = 10;
$x = 10;
$y = 10;

function vignetteImage($blackPoint, $whitePoint, $x, $y) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->vignetteImage($blackPoint, $whitePoint, $x, $y);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

vignetteImage($blackPoint, $whitePoint, $x, $y) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�8��tests/246_antialias_image.phptnu�[���--TEST--
Test pseudo formats
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$im = new Imagick();
$im->newPseudoImage(10, 10, "magick:logo");
//On by default
var_export($im->getAntiAlias());
echo PHP_EOL;

//Turn off
$im->setAntiAlias(false);
var_export($im->getAntiAlias());
echo PHP_EOL;

//Turn back on
$im->setAntiAlias(true);
var_export($im->getAntiAlias());
echo PHP_EOL;

?>
--EXPECTF--
true
false
true
PKq9�Z��Y***tests/043_Imagick_colorizeImage_basic.phptnu�[���--TEST--
Test Imagick, colorizeImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$color = 'rgb(127, 127, 127)';
$opacity = 100;

function colorizeImage($color, $opacity) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $opacity = $opacity / 255.0;
    $opacityColor = new \ImagickPixel("rgba(0, 0, 0, $opacity)");
    $imagick->colorizeImage($color, $opacityColor);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

colorizeImage($color, $opacity) ;

$imagick = new \Imagick();
$imagick->newPseudoImage(640, 480, "magick:logo");
$opacity = $opacity / 255.0;
$opacityColor = new \ImagickPixel("rgba(0, 0, 0, $opacity)");
// TODO - legacy mode of setting fraction as transparency needs
// to be removed.
$imagick->colorizeImage($color, 0.5, true);
$bytes = $imagick->getImageBlob();
if (strlen($bytes) <= 0) { echo "Failed to generate image for legacy mode.";}

echo "Ok";
?>
--EXPECTF--
OkPKq9�Zu�<��!tests/064_cropThumbNailImage.phptnu�[���--TEST--
Test for round issues
--SKIPIF--
<?php 
require_once(dirname(__FILE__) . '/skipif.inc'); 
if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
?>
--FILE--
<?php

//Test the the calculated values are actually correct.
$desired_height = 250;
$imageWidth = 1128;

//Test the the calculated values are actually correct.
$desired_height = 250;
$imageWidth = 1128;
$imageHeight = 1128;

$legacySettings = array(0, 1);

foreach($legacySettings as $legacy) {
	for ($desired_width = 245; $desired_width < 255; $desired_width++) {
		$imagick = new Imagick();
		$imagick->newPseudoImage($imageWidth, $imageHeight, 'xc:white');

		$imagick->cropThumbnailImage(
			$desired_width, $desired_height,
			$legacy
		);
		$error = false;

		$thumbnailImageWidth = $imagick->getImageWidth();
		$thumbnailImageHeight = $imagick->getImageHeight();

		if ($thumbnailImageHeight != $desired_height) {
			echo "Incorrect height for desired_width $desired_width imageHeight $imageHeight".PHP_EOL;
			$error = true;
		}

		$expectedWidth = $desired_width;
		$expectedHeight = $desired_height;

		if ($legacy == true && 
			$desired_width == 250 &&
			$desired_height == 250) {
			// Thumbnail size of 249 x 250 does not matched desired size 250 x 250 for source image of 1128 x 1128
			$expectedWidth = 249;
		}

		if ($thumbnailImageWidth != $expectedWidth) {
			echo "Incorrect width for desired_width $desired_width imageHeight $imageHeight".PHP_EOL;
			$error = true;
		}

		if ($thumbnailImageHeight != $expectedHeight) {
			echo "Incorrect width for desired_width $desired_width imageHeight $imageHeight".PHP_EOL;
			$error = true;
		}

		if ($error) {
			printf(
				"Thumbnail size of %d x %d does not matched expected size %d x %d for source image of %d x %d. Legacy is %d\n",
				$thumbnailImageWidth, $thumbnailImageHeight,
				$desired_width, $desired_height,
				$imageWidth, $imageHeight,
				$legacy
			);
		}
	}
}


echo "Done" . PHP_EOL;

?>
--EXPECTF--
DonePKq9�Z�j�N��(tests/176_ImagickDraw_ellipse_basic.phptnu�[���--TEST--
Test ImagickDraw, ellipse
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function ellipse($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);

    $draw->setStrokeWidth(2);
    $draw->setFontSize(72);

    $draw->ellipse(125, 70, 100, 50, 0, 360);
    $draw->ellipse(350, 70, 100, 50, 0, 315);

    $draw->push();
    $draw->translate(125, 250);
    $draw->rotate(30);
    $draw->ellipse(0, 0, 100, 50, 0, 360);
    $draw->pop();

    $draw->push();
    $draw->translate(350, 250);
    $draw->rotate(30);
    $draw->ellipse(0, 0, 100, 50, 0, 315);
    $draw->pop();

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");

    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

ellipse($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�6���$tests/274_imagick_setImageAlpha.phptnu�[���--TEST--
Imagick::setImageAlpha
--SKIPIF--
<?php 
$imageMagickRequiredVersion=0x700;
require_once(dirname(__FILE__) . '/skipif.inc'); 
?>
--FILE--
<?php

require_once __DIR__ . "/../util/functions.php";

$imagick = new Imagick();
$imagick->newPseudoImage(256, 256, 'xc:purple');
$imagick->setImageAlpha(0.5);

$imagick->setImageFormat('png');
$imagick->writeImage(__DIR__ . "/setAlphaTest.png");

$pixelTypes = array(
	Imagick::PIXEL_CHAR => array(128, 0, 128, 128),
	Imagick::PIXEL_FLOAT => array(0.50196081399918, 0, 0.50196081399918, 0.5),
    Imagick::PIXEL_DOUBLE => array(0.50196078431373, 0, 0.50196078431373, 0.5),
	Imagick::PIXEL_SHORT => array(32896, 0, 32896, 32768),
);

function getColorError($type, $expected, $actual) {

    if ($type == Imagick::PIXEL_CHAR ||
        $type == Imagick::PIXEL_SHORT) {
        $string  = "Expected: " . $actual . "\n";
        $string .= "Actual  : " . $actual . "\n";

        return $string;
    }

    if ($type == Imagick::PIXEL_FLOAT) {
        return float_compare_32($expected, $actual);
    }

    if ($type == Imagick::PIXEL_DOUBLE) {
        return float_compare($expected, $actual);
    }

    echo "Unknown type: $type \n";
    exit(-1);
}


foreach ($pixelTypes as $pixelType => $expectedValues) {
	$pixels = $imagick->exportImagePixels(0, 0, 1, 1, "RGBA", $pixelType);
	$channelNames = ['R', 'G', 'B', 'A'];

	// Loop over the colours
	for ($channel = 0; $channel < 4; $channel++) {
		$actual = $pixels[$channel];
		$expected = $expectedValues[$channel];
		if (abs($actual - $expected) > get_epsilon_for_off_by_half_errors()) {
		    $channelName = $channelNames[$channel];

			echo "Pixel values appear incorrect for pixelType $pixelType channel:$channelName\n";
            echo getColorError($pixelType, $expected, $actual);
			break;
		}
	}
}

echo "Ok";

?>
--CLEAN--
<?php
$f = __DIR__ . '/setAlphaTest.png';
if (file_exists($f)) {
    @unlink($f);
}
?>
--EXPECTF--
Ok
PKq9�ZJ
d�~~Ctests/182_ImagickDraw_pathCurveToQuadraticBezierAbsolute_basic.phptnu�[���--TEST--
Test ImagickDraw, pathCurveToQuadraticBezierAbsolute
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function pathCurveToQuadraticBezierAbsolute($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $draw->setStrokeOpacity(1);
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);

    $draw->setStrokeWidth(2);
    $draw->setFontSize(72);

    $draw->pathStart();
    $draw->pathMoveToAbsolute(50,250);

    // This specifies a quadratic bezier curve with the current position as the start
    // point, the control point is the first two params, and the end point is the last two params.
    $draw->pathCurveToQuadraticBezierAbsolute(
        150,50, 
        250,250
    );

    // This specifies a quadratic bezier curve with the current position as the start
    // point, the control point is mirrored from the previous curves control point
    // and the end point is defined by the x, y values.
    $draw->pathCurveToQuadraticBezierSmoothAbsolute(
        450,250
    );

    // This specifies a quadratic bezier curve with the current position as the start
    // point, the control point is mirrored from the previous curves control point
    // and the end point is defined relative from the current position by the x, y values.
    $draw->pathCurveToQuadraticBezierSmoothRelative(
        200,-100
    );

    $draw->pathFinish();

    $imagick = new \Imagick();
    $imagick->newImage(700, 500, $backgroundColor);
    $imagick->setImageFormat("png");

    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 

}

pathCurveToQuadraticBezierAbsolute($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Zd���[[)tests/107_Imagick_recolorImage_basic.phptnu�[���--TEST--
Test Imagick, recolorImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('recolorImage'));
?>
--FILE--
<?php


function recolorImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $remapColor = array(
        1, 0, 0,
        0, 0, 1,
        0, 1, 0,
    );

    @$imagick->recolorImage($remapColor);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

recolorImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Zz�,tests/192_ImagickDraw_setClipPath_basic.phptnu�[���--TEST--
Test ImagickDraw, setClipPath
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setClipPath($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeOpacity(1);
    $draw->setStrokeWidth(2);

    $clipPathName = 'testClipPath';

    $draw->pushClipPath($clipPathName);
    $draw->rectangle(0, 0, 250, 250);
    $draw->popClipPath();
    $draw->setClipPath($clipPathName);
    $draw->rectangle(100, 100, 400, 400);

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");

    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setClipPath($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�ugG%%%tests/191_ImagickDraw_push_basic.phptnu�[���--TEST--
Test ImagickDraw, push
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';
$fillModifiedColor = 'LightCoral';

function push($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor) {

    $draw = new \ImagickDraw();
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillModifiedColor);
    $draw->setStrokeWidth(2);
    $draw->setFontSize(72);
    $draw->push();
    $draw->translate(50, 50);
    $draw->rectangle(200, 200, 300, 300);
    $draw->pop();
    $draw->setFillColor($fillColor);
    $draw->rectangle(200, 200, 300, 300);

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");

    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

push($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z���K��%tests/311_Imagick_channelFxImage.phptnu�[���--TEST--
Test Imagick, channelFxImage
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('channelFxImage'));
?>
--FILE--
<?php

// MagickChannelFxImage() applies a channel expression to the specified image.
// The expression consists of one or more channels, either mnemonic or numeric
// (e.g. red, 1), separated by actions as follows:
//
//   <=>     exchange two channels (e.g. red<=>blue)
//   =>      transfer a channel to another (e.g. red=>green)
//   ,       separate channel operations (e.g. red, green)
//   |       read channels from next input image (e.g. red | green)
//   ;       write channels to next output image (e.g. red; green; blue)

function whiteBalanceImage() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');
    $result = $imagick->channelFxImage("red<=>blue");
    //    $result->writeImage(__DIR__ . '/complexImages_output_image.png');

    $result->getImageBlob();
}

whiteBalanceImage() ;
echo "Ok";
?>
--EXPECTF--
Ok
PKq9�Zӌn��'tests/114_Imagick_scaleImage_basic.phptnu�[���--TEST--
Test Imagick, scaleImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


$tests = array(
    array(200, 200, true, 200, 150),
    array(200, 200, false, 200, 200),
    array(200, 0, false, 200, 150),
);

foreach ($tests as $test) {
    list($width, $height, $bestFit, $expectedWidth, $expectedHeight) = $test;

    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->scaleImage($width, $height, $bestFit);

	$imageWidth = $imagick->getImageWidth();
	$imageHeight = $imagick->getImageHeight();

	$error = false;

	if ($imageWidth != $expectedWidth) {
		echo "Width $imageWidth does not match expected.\n";
		$error = true;
	}

	if ($imageHeight != $expectedHeight) {
		echo "Height $imageHeight does not match expected.\n";
		$error = true;
	}

	if ($error) {
		echo "test was ".var_export($test, true)."\n";
	};
}


echo "Ok";
?>
--EXPECTF--
OkPKq9�ZM�um)tests/184_ImagickDraw_polyline_basic.phptnu�[���--TEST--
Test ImagickDraw, polyline
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function polyline($strokeColor, $fillColor, $backgroundColor) {
    $draw = new \ImagickDraw();

    $draw->setStrokeOpacity(1);
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);

    $draw->setStrokeWidth(5);

    $points = array(
        array('x' => 40 * 5, 'y' => 10 * 5),
        array('x' => 20 * 5, 'y' => 20 * 5),
        array('x' => 70 * 5, 'y' => 50 * 5),
        array('x' => 60 * 5, 'y' => 15 * 5)
    );

    $draw->polyline($points);

    $image = new \Imagick();
    $image->newImage(500, 300, $backgroundColor);
    $image->setImageFormat("png");
    $image->drawImage($draw);

    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

polyline($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�;9�
�
tests/skipif.incnu�[���<?php

if (!extension_loaded("imagick")) die("skip imagick not loaded");

require_once(dirname(__FILE__) . '/functions.inc');

if (isset($imageMagickRequiredVersion)) {
	$versionInfo = \Imagick::getVersion();

	if (array_key_exists("versionNumber", $versionInfo) == false) {
		die("skip unable to determine ImageMagick version.");
	}

	$versionInstalled = $versionInfo["versionNumber"];

	if ($versionInstalled < $imageMagickRequiredVersion) {
		$message = sprintf(
			"skip ImageMagick installed %x <= required %x",
			$versionInstalled,
			$imageMagickRequiredVersion
		);
		die($message);
	}
}


if (isset($imageMagickBelowVersion)) {
	$versionInfo = \Imagick::getVersion();

	if (array_key_exists("versionNumber", $versionInfo) == false) {
		die("skip unable to determine ImageMagick version.");
	}

	$versionInstalled = $versionInfo["versionNumber"];

	if ($versionInstalled >= $imageMagickBelowVersion) {
		$message = sprintf(
			"skip ImageMagick installed %x >= limit check %x",
			$versionInstalled,
			$imageMagickBelowVersion
		);
		die($message);
	}
}


if (isset($imageMagickBelowVersion)) {
	$versionInfo = \Imagick::getVersion();

	if (array_key_exists("versionNumber", $versionInfo) == false) {
		die("skip unable to determine ImageMagick version.");
	}

	$versionInstalled = $versionInfo["versionNumber"];

	if ($versionInstalled >= $imageMagickBelowVersion) {
		$message = sprintf(
			"skip ImageMagick installed %x >= %x",
			$versionInstalled,
			$imageMagickBelowVersion
		);
		die($message);
	}
}

function checkClassMethods($class, $methods)
{
	foreach ($methods as $method) {
		if (method_exists($class, $method) == false) {
			die("skip Class method $class::$method not present");
		}
	}
}

function checkFormatPresent($format)
{
	$result = Imagick::queryFormats(strtoupper($format));
	if (count($result) == false) {
		die("skip format $format not supported by ImageMagick as compiled.");
	}
}

function requirePHP($required)
{
	if (version_compare(PHP_VERSION, $required) < 0) {
		die("skip PHP version $required required, but have ".PHP_VERSION.".");
	}
}

function requireFormat($requiredFormat)
{
	$formats = \Imagick::queryformats();

	foreach ($formats as $format) {
		if (strcasecmp($format, $requiredFormat) === 0) {
			return;
		}
	}

	die("skip test suite requires format $requiredFormat but not available");
}

requireFormat("png");
requireFormat("jpg");

if (isset($minimumVersions) === true) {
    if (isVersionGreaterEqual($minimumVersions[0], $minimumVersions[1]) !== true) {

        $message = sprintf(
            "skip either version '%s' or '%s' is minimum reliable for test.\n",
            $minimumVersions[0],
            $minimumVersions[1]
        );

        die($message);
    }
}

?>
PKq9�ZY�9���9tests/057_Imagick_distortImage_PerspectiveProjection.phptnu�[���--TEST--
Test Imagick, distortImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$distortion = 1;

        //X-of-destination = (sx*xs + ry+ys +tx) / (px*xs + py*ys +1)
        //Y-of-destination = (rx*xs + sy+ys +ty) / (px*xs + py*ys +1)

        // sx   ry   tx
        // rx   sy   ty
        // px   py
        
        $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
        $points = array(
            1.945622, 0.071451, 
            -12.187838, 0.799032, 
            1.276214, -24.470275, 0.006258, 0.000715
        );
        $imagick->setimagebackgroundcolor("#fad888");
        $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_BACKGROUND);
        $imagick->distortImage(\Imagick::DISTORTION_PERSPECTIVEPROJECTION, $points, TRUE);
    $bytes = $imagick;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 

echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�l����*tests/034_Imagick_annotateImage_basic.phptnu�[���--TEST--
Test Imagick, annotateImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

require_once(dirname(__FILE__) . '/functions.inc');

$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'rgb(232, 227, 232)';

function annotateImage($strokeColor, $fillColor) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");

    $draw = new \ImagickDraw();
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);

    $draw->setStrokeWidth(1);
    $draw->setFontSize(36);
    
    $text = "Imagick is a native php \nextension to create and \nmodify images using the\nImageMagick API.";

    setFontForImagick($imagick);
    setFontForImagickDraw($draw);
    $imagick->annotateimage($draw, 40, 40, 0, $text);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

annotateImage($strokeColor, $fillColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z:���1tests/240_Tutorial_imagickCompositeGen_basic.phptnu�[���--TEST--
Test Tutorial, imagickCompositeGen
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$contrast = 10;
$blendMidpoint = 0.5;

function generateBlendImage($height, $overlap, $contrast = 10, $midpoint = 0.5) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage($height, $overlap, 'gradient:black-white');
    $quantum = $imagick->getQuantum();
    $imagick->sigmoidalContrastImage(true, $contrast, $midpoint * $quantum);

    return $imagick;
}


function mergeImages($outputSize, $overlap, $contrast = 10, $blendMidpoint = 0.5, $horizontal = true) {

    $images = array();
    $newImageWidth = 0;
    $newImageHeight = 0;

    if ($horizontal == true) {
        $resizeWidth = 0;
        $resizeHeight = $outputSize;
    }
    else {
        $resizeWidth = $outputSize;
        $resizeHeight = 0;
    }

    $blendWidth = 0;

    $srcImages = array(1, 2, 3);

    foreach ($srcImages as $srcImage) {
        $nextImage = new \Imagick();
        $nextImage->newPseudoImage(640, 480, "magick:logo");
        
        
        $nextImage->resizeImage($resizeWidth, $resizeHeight, \Imagick::FILTER_LANCZOS, 0.5);

        if ($horizontal == true) {
            $newImageWidth += $nextImage->getImageWidth();
            $blendWidth = $nextImage->getImageHeight();
        }
        else {
            //$newImageWidth = $nextImage->getImageWidth();
            $blendWidth = $nextImage->getImageWidth();
            $newImageHeight += $nextImage->getImageHeight();
        }

        $images[] = $nextImage;
    }

    if ($horizontal == true) {
        $newImageWidth -= $overlap * (count($srcImages) - 1);
        $newImageHeight = $outputSize;
    }
    else {
        $newImageWidth = $outputSize;
        $newImageHeight -= $overlap * (count($srcImages) - 1);
    }

    if ($blendWidth == 0) {
        throw new \Exception("Failed to read source images");
    }

    $fadeLeftSide = generateBlendImage($blendWidth, $overlap, $contrast, $blendMidpoint);

    if ($horizontal == true) {
        //We are placing the images horizontally.
        $fadeLeftSide->rotateImage('black', -90);
    }

    //Fade out the left part - need to negate the mask to
    //make math correct
    $fadeRightSide = clone $fadeLeftSide;
    $fadeRightSide->negateimage(false);

    //Create a new canvas to render everything in to.
    $canvas = new \Imagick();
    $canvas->newImage($newImageWidth, $newImageHeight, new \ImagickPixel('black'));

    $count = 0;

    $imagePositionX = 0;
    $imagePositionY = 0;

    /** @var $image \Imagick */
    foreach ($images as $image) {
        $finalBlending = new \Imagick();
        $finalBlending->newImage($image->getImageWidth(), $image->getImageHeight(), 'white');

        if ($count != 0) {
            $finalBlending->compositeImage($fadeLeftSide, \Imagick::COMPOSITE_ATOP, 0, 0);
        }

        $offsetX = 0;
        $offsetY = 0;

        if ($horizontal == true) {
            $offsetX = $image->getImageWidth() - $overlap;
        }
        else {
            $offsetY = $image->getImageHeight() - $overlap;
        }

        if ($count != count($images) - 1) {
            $finalBlending->compositeImage($fadeRightSide, \Imagick::COMPOSITE_ATOP, $offsetX, $offsetY);
        }

        $image->compositeImage($finalBlending, \Imagick::COMPOSITE_COPYOPACITY, 0, 0);
        $canvas->compositeimage($image, \Imagick::COMPOSITE_BLEND, $imagePositionX, $imagePositionY);

        if ($horizontal == true) {
            $imagePositionX = $imagePositionX + $image->getImageWidth() - $overlap;
        }
        else {
            $imagePositionY = $imagePositionY + $image->getImageHeight() - $overlap;
        }
        $count++;
    }

    return $canvas;
}

function imagickCompositeGen($contrast = 10, $blendMidpoint = 0.5) {

    $size = 160;

    //Load the images 
    $output = mergeImages(
        $size,
        0.2 * $size, //overlap
        $contrast,
        $blendMidpoint,
        true);

    //$output = generateBlendImage(200, 200, 5, 0.5);
    $output->setImageFormat('png');

    $bytes = $output->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

imagickCompositeGen($contrast = 10, $blendMidpoint = 0.5) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�����$tests/308_Imagick_levelizeImage.phptnu�[���--TEST--
Test Imagick, levelizeImage
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('levelizeImage'));
?>
--FILE--
<?php


function levelizeImage() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');
    $imagick->levelizeImage(0.1, 2.0, 0.95);
//    $imagick->writeImage(__DIR__ . '/claheImage_output_image.png');
    $imagick->getImageBlob();
}

levelizeImage();
echo "Ok";
?>
--EXPECTF--
Ok
PKq9�Z�����5tests/161_Imagick_transformImageColorspace_basic.phptnu�[���--TEST--
Test Imagick, transformImageColorspace
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$colorSpace = 1;
$channel = Imagick::CHANNEL_DEFAULT;

function transformImageColorspace($colorSpace, $channel) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->transformimagecolorspace($colorSpace);
    $imagick->separateImageChannel($channel);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

transformImageColorspace($colorSpace, $channel) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z���̚�4tests/038_Imagick_brightnessContrastImage_basic.phptnu�[���--TEST--
Test Imagick, brightnessContrastImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$brightness = -20;
$contrast = -20;
$channel = Imagick::CHANNEL_DEFAULT;

function brightnessContrastImage($brightness, $contrast, $channel) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->brightnessContrastImage($brightness, $contrast, $channel);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

brightnessContrastImage($brightness, $contrast, $channel) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z_�-tests/285_ini_settings_set_truthy_string.phptnu�[���--TEST--
OpenMP segfault hacks

--INI--
imagick.shutdown_sleep_count=On
imagick.set_single_thread=On
--SKIPIF--
<?php 


require_once(dirname(__FILE__) . '/skipif.inc');
 
?>
--FILE--
<?php


$sleepCount = intval(ini_get('imagick.shutdown_sleep_count'));
$setSingleThread = ini_get('imagick.set_single_thread');

if ($sleepCount != 1) {
    echo "imagick.shutdown_sleep_count is not set to 1 but instead " . var_export($sleepCount, true) ."\n";
}

if ($setSingleThread != 1) {
    echo "imagick.set_single_thread setting is not true but instead " . var_export($setSingleThread, true) ."\n";
}


echo "Complete".PHP_EOL;
?>
--EXPECTF--
Complete
PKq9�Z��Mx��'tests/087_Imagick_levelImage_basic.phptnu�[���--TEST--
Test Imagick, levelImage
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$blackPoint = 50;
$whitePoint = 100;
$gamma = 2.2;

function levelImage($blackPoint, $gamma, $whitePoint) {
    $imagick = new \Imagick();
    $imagick->newPseudoimage(500, 500, 'gradient:black-white');

    $imagick->setFormat('png');
    $quantum = $imagick->getQuantum();
    $imagick->levelImage($blackPoint / 100 , $gamma, $quantum * $whitePoint / 100);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

levelImage($blackPoint, $gamma, $whitePoint) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�ZB�|���#tests/022-writeimagefileformat.phptnu�[���--TEST--
Test format support in writeImageFile
--SKIPIF--
<?php 
	require_once(dirname(__FILE__) . '/skipif.inc'); 
	checkFormatPresent('png');
	checkFormatPresent('jpg');
?>
--FILE--
<?php

define ("JPEG_FILE", dirname (__FILE__) . "/imagick_test.jpg");
define ("PNG_FILE",dirname (__FILE__) . "/imagick_test.png");

$im = new imagick ('magick:rose');
$im->writeImage (JPEG_FILE);
$im->clear ();

// This is the problematic case, setImageFormat doesn't really
// affect writeImageFile. 
// So in this case we want to write PNG but file should come out
// as JPEG
$fp = fopen (PNG_FILE, "w+");
$im->readImage (JPEG_FILE);
$im->setImageFormat ('png');
$im->writeImageFile ($fp);
$im->clear ();
fclose ($fp);

// Output the format
$identify = new Imagick (PNG_FILE);
echo $identify->getImageFormat () . PHP_EOL;

// Lets try again, setting the filename rather than format
// This should cause PNG image to be written
$fp = fopen (PNG_FILE, "w+");
$im->readImage (JPEG_FILE);
$im->setImageFilename ('png:');
$im->writeImageFile ($fp);
$im->clear ();
fclose ($fp);

// If all goes according to plan, on second time we should get PNG
$identify = new Imagick (PNG_FILE);
echo $identify->getImageFormat () . PHP_EOL;

// Lastly, test the newly added format parameter
$fp = fopen (PNG_FILE, "w+");
$im->readImage (JPEG_FILE);
$im->writeImageFile ($fp, 'png');
$im->clear ();
fclose ($fp);

// If all goes according to plan, on second time we should get PNG
$identify = new Imagick (PNG_FILE);
echo $identify->getImageFormat () . PHP_EOL;

unlink (PNG_FILE);
unlink (JPEG_FILE);

echo 'done' . PHP_EOL;
?>
--CLEAN--
<?php
@unlink(dirname (__FILE__) . "/imagick_test.jpg");
@unlink(dirname (__FILE__) . "/imagick_test.png");
?>
--EXPECT--
JPEG
PNG
PNG
donePKq9�Z96W���tests/253_getHdri.phptnu�[���--TEST--
Test ImagickPixelIterator, construct
--SKIPIF--
<?php

require_once(dirname(__FILE__) . '/skipif.inc');

checkClassMethods('Imagick', array('getHDRIEnabled'));


?>
--FILE--
<?php

$enabled = Imagick::getHDRIEnabled();

if ($enabled === true || $enabled === false) {
    echo "Ok";
}
else {
    echo "Unexpected value for Imagick::getHDRIEnabled:\n";
    var_dump($enabled);
}

?>
--EXPECTF--
OkPKq9�ZV�b�..+tests/226_ImagickDraw_setViewBox_basic.phptnu�[���--TEST--
Test ImagickDraw, setViewBox
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setViewBox($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(2);
    $draw->setFontSize(72);

    /*
     
    Sets the overall canvas size to be recorded with the drawing vector data. Usually this will be specified using the same size as the canvas image. When the vector data is saved to SVG or MVG formats, the viewbox is use to specify the size of the canvas image that a viewer will render the vector data on.
    
     */

    $draw->circle(250, 250, 250, 0);
    $draw->setviewbox(0, 0, 200, 200);
    $draw->circle(125, 250, 250, 250);
    $draw->translate(250, 125);
    $draw->circle(0, 0, 125, 0);


    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");

    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setViewBox($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�ZI%rkk,tests/199_ImagickDraw_setClipRule_basic.phptnu�[���--TEST--
Test ImagickDraw, setClipRule
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setClipRule($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeOpacity(1);
    $draw->setStrokeWidth(2);
    //\Imagick::FILLRULE_EVENODD
    //\Imagick::FILLRULE_NONZERO

    $clipPathName = 'testClipPath';
    $draw->pushClipPath($clipPathName);
    $draw->setClipRule(\Imagick::FILLRULE_EVENODD);

    $draw->rectangle(0, 0, 300, 500);
    $draw->rectangle(200, 0, 500, 500);
    $draw->popClipPath();
    $draw->setClipPath($clipPathName);
    $draw->rectangle(200, 200, 300, 300);
    
    $clipRule = $draw->getClipRule();
    if ($clipRule != \Imagick::FILLRULE_EVENODD) {
        echo "Failed to get correct clipRule $clipRule != \Imagick::FILLRULE_EVENODD \n";
    }

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");

    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setClipRule($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�ZT��WW0tests/166_Imagick_waveImageWithMethod_basic.phptnu�[���--TEST--
Test Imagick, waveImageWithMethod
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x700;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$amplitude = 5;
$length = 20;

function waveImageWithMethod($amplitude, $length) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->waveImageWithMethod($amplitude, $length, Imagick::INTERPOLATE_BILINEAR);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

waveImageWithMethod($amplitude, $length) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�ZH??'tests/137_Imagick_shearImage_basic.phptnu�[���--TEST--
Test Imagick, shearImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$shearX = 15;
$shearY = 5;
$color = 'rgb(127, 127, 127)';

function shearImage($color, $shearX, $shearY) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->shearimage($color, $shearX, $shearY);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

shearImage($color, $shearX, $shearY) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z\�0cc0tests/125_Imagick_setImageOrientation_basic.phptnu�[���--TEST--
Test Imagick, setImageOrientation
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$orientationType = \Imagick::ORIENTATION_LEFTTOP;

//Doesn't appear to do anything
function setImageOrientation($orientationType) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->setImageOrientation($orientationType);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setImageOrientation($orientationType) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z��>�;;#tests/317_Imagick_getImageMean.phptnu�[���--TEST--
Test Imagick, getImageMean
--SKIPIF--
<?php
// mean calculation seems unstable on earlier versions
// lets only check modern versions, and see if it breaks
$imageMagickRequiredVersion=0x710;
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('getImageMean'));
?>
--FILE--
<?php

require_once(__DIR__ . '/functions.inc');

function getImageMean() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');
    $values = $imagick->getImageMean();

    check_value_with_epsilon($values, "mean", 29267.518515000003, 0.2);
    check_value_with_epsilon($values, "standard_deviation", 18075.35838235082, 0.2);
}

getImageMean();
echo "Ok";
?>
--EXPECTF--
Value for 'mean' is %f which is close enough to expected %f
Value for 'standard_deviation' is %f which is close enough to expected %f
Ok
PKq9�Z�N�||tests/026_phpinfo.phptnu�[���--TEST--
Test Imagick module hasn't broken phpinfo
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

ob_start();
phpinfo();
$contents = ob_get_contents();
ob_end_clean();

if (strpos($contents, 'imagick module => enabled') !== false) {
	echo "Ok";
}
else {
	echo "Imagick was not reported as enabled?";
	var_dump($contents);
}

?>
--EXPECTF--
OkPKq9�Z6���'tests/174_ImagickDraw_affine_basic.phptnu�[���--TEST--
Test ImagickDraw, affine
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function affine($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $draw->setStrokeWidth(1);
    $draw->setStrokeOpacity(1);
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);

    $draw->setStrokeWidth(2);

    $PI = 3.141592653589794;
    $angle = 60 * $PI / 360;

    //Scale the drawing co-ordinates.
    $affineScale = array("sx" => 1.75, "sy" => 1.75, "rx" => 0, "ry" => 0, "tx" => 0, "ty" => 0);

    //Shear the drawing co-ordinates.
    $affineShear = array("sx" => 1, "sy" => 1, "rx" => sin($angle), "ry" => -sin($angle), "tx" => 0, "ty" => 0);

    //Rotate the drawing co-ordinates. The shear affine matrix
    //produces incorrectly scaled drawings.
    $affineRotate = array("sx" => cos($angle), "sy" => cos($angle), "rx" => sin($angle), "ry" => -sin($angle), "tx" => 0, "ty" => 0,);

    //Translate (offset) the drawing
    $affineTranslate = array("sx" => 1, "sy" => 1, "rx" => 0, "ry" => 0, "tx" => 30, "ty" => 30);

    //The identiy affine matrix
    $affineIdentity = array("sx" => 1, "sy" => 1, "rx" => 0, "ry" => 0, "tx" => 0, "ty" => 0);

    $examples = array($affineScale, $affineShear, $affineRotate, $affineTranslate, $affineIdentity,);

    $count = 0;

    foreach ($examples as $example) {
        $draw->push();
        $draw->translate(($count % 2) * 250, intval($count / 2) * 250);
        $draw->translate(100, 100);
        $draw->affine($example);
        $draw->rectangle(-50, -50, 50, 50);
        $draw->pop();
        $count++;
    }

    //Create an image object which the draw commands can be rendered into
    $image = new \Imagick();
    $image->newImage(500, 750, $backgroundColor);
    $image->setImageFormat("png");

    //Render the draw commands in the ImagickDraw object 
    //into the image.
    $image->drawImage($draw);

    //Send the image to the browser
    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

affine($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�ZU9uv,tests/102_Imagick_radialBlurImage_basic.phptnu�[���--TEST--
Test Imagick, radialBlurImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('radialBlurImage'));
?>
--FILE--
<?php


function radialBlurImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->radialBlurImage(3);
    $imagick->radialBlurImage(5);
    $imagick->radialBlurImage(7);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

radialBlurImage() ;
echo "Ok";
?>
--EXPECTF--
Deprecated: %s Imagick::radialBlurImage() is deprecated in %s

Deprecated: %s Imagick::radialBlurImage() is deprecated in %s

Deprecated: %s Imagick::radialBlurImage() is deprecated in %s
Ok
PKq9�Z9l����tests/bug20636.phptnu�[���--TEST--
Test PECL bug #20636
--SKIPIF--
<?php

$imageMagickRequiredVersion=0x680;

require_once(dirname(__FILE__) . '/skipif.inc'); 

checkClassMethods('Imagick', array('roundCorners'));

?>
--FILE--
<?php
// This test fails to work as expected on 32bit Ubuntu. Instead of the
// image being created and then roundCorners failing, instead the image
// fails to be created with the error message "unable to acquire cache 
// view `No such file or directory' @ 
// fatal/cache-view.c/AcquireAuthenticCacheView/121"

$image = new Imagick();
$image->newImage(0, 0, '#dddddd', 'png' );

try {
    $image->roundCorners(5, 5);
    echo "fail\n";
} catch (ImagickException $e) {
    echo "success\n";
}

?>
--EXPECTF--
success
PKq9�Z�,o�~~$tests/318_Imagick_getImageRange.phptnu�[���--TEST--
Test Imagick, getImageRange
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('getImageRange'));
?>
--FILE--
<?php

require_once(__DIR__ . '/functions.inc');

function getImageRange() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(320, 240, "gradient:red-blue");
    $values = $imagick->getImageRange();

    check_value($values, "minima", 0);
    check_value($values, "maxima", 65535.0);
}

getImageRange() ;
echo "Ok";
?>
--EXPECTF--
Value for 'minima' is %f which is close enough to expected %f
Value for 'maxima' is %f which is close enough to expected %f
Ok
PKq9�Z���@@tests/005_bestfit.phptnu�[���--TEST--
Test thumbnail bestfit
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$im = new Imagick();
$im->newImage(50, 100, 'white');

$im->thumbnailImage(100, 50, true);
var_dump($im->getImageGeometry());

?>
--EXPECTF--
array(2) {
  ["width"]=>
  int(25)
  ["height"]=>
  int(50)
}PKq9�Z��c���+tests/065_Imagick_despeckleImage_basic.phptnu�[���--TEST--
Test Imagick, despeckleImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function despeckleImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->despeckleImage();
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

despeckleImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Zмx�  %tests/297_Imagick_meanShiftImage.phptnu�[���--TEST--
Test Imagick, meanShiftImage
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('meanShiftImage'));
?>
--FILE--
<?php


function meanShiftImage() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');
    $imagick->meanShiftImage(
		10,
		10,
		5
	);

    $imagick->writeImage(__DIR__ . '/meanShiftImage_output_image.png');
//    $imagick->getImageBlob();
}

meanShiftImage() ;
echo "Ok";
?>
--CLEAN--
<?php
@unlink(__DIR__ . '/meanShiftImage_output_image.png');
?>
--EXPECTF--
Ok
PKq9�Z�E�'��+tests/158_Imagick_transposeImage_basic.phptnu�[���--TEST--
Test Imagick, transposeImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function transposeImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->transposeImage();
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

transposeImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z)�(�>>*tests/270_imagick_restoreErrorHandler.phptnu�[���--TEST--
Imagick don't borg the error handler
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php
error_reporting( E_ALL ); 

ini_set( "display_errors", true );

try {
    $f = new Imagick('http://any/url/here');
}
catch(ImagickException $ie) {
    echo "Normal exception".PHP_EOL;
}

try {
	$x = @file ('non_existent_file');
	echo "Normal warning is suppressed".PHP_EOL;
}
catch(\Exception $e) {
	echo "Abnormal exception of type: ".get_class($e)."\n";
	echo $e->getMessage();
}

?>
--EXPECTF--
Normal exception
Normal warning is suppressed
PKq9�Zcvח��tests/291_reflection.phptnu�[���--TEST--
Test that reflection can get default values
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$class_list = [
    'Imagick',
    'ImagickDraw',
    'ImagickPixel',
    'ImagickPixelIterator',
];

if (class_exists('ImagickKernel') === true) {
    $class_list[] = 'ImagickKernel';
}

foreach ($class_list as $class) {
    $rc = new ReflectionClass($class);
    foreach ($rc->getMethods() as $reflectionMethod) {
        $parameters = $reflectionMethod->getParameters();
        foreach ($parameters as $parameter) {
            if ($parameter->isDefaultValueAvailable() !== true) {
                continue;
            }

            try {
                $value = $parameter->getDefaultValue();
            }
            catch (ReflectionException $re) {
                $method_name = $reflectionMethod->getName();
                echo "Exception for $class::$method_name : " . $re->getMessage() . "\n";
            }
        }
    }
}

echo "Ok";
?>
--EXPECTF--
Ok

PKq9�Zܷr���+tests/319_Imagick_getInterpolateMethod.phptnu�[���--TEST--
Test Imagick, getInterpolateMethod/setInterpolateMethod
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('getInterpolateMethod'));
?>
--FILE--
<?php

function getInterpolateMethod() {
    $imagick = new \Imagick();


    $value = $imagick->getInterpolateMethod();
    echo "Interpolate method is " . $value . "\n";
    $imagick->newPseudoImage(640, 480, "gradient:red-blue");

    $imagick->setInterpolateMethod(Imagick::INTERPOLATE_BILINEAR);

    $value = $imagick->getInterpolateMethod();
    echo "Interpolate method is now " . $value . "\n";
}

getInterpolateMethod() ;
echo "Ok";
?>
--EXPECTF--
Interpolate method is 0
Interpolate method is now 5
Ok
PKq9�ZE�n..3tests/216_ImagickDraw_setStrokeDashArray_basic.phptnu�[���--TEST--
Test ImagickDraw, setStrokeDashArray
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setStrokeDashArray($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(4);

    $draw->setStrokeDashArray(array(10, 10));
    $draw->rectangle(100, 50, 225, 175);

    $draw->setStrokeDashArray(array(20, 5, 20, 5, 5, 5,));
    $draw->rectangle(275, 50, 400, 175);

    $draw->setStrokeDashArray(array(20, 5, 20, 5, 5));
    $draw->rectangle(100, 200, 225, 350);

    $draw->setStrokeDashArray(array(1, 1, 1, 1, 2, 2, 3, 3, 5, 5, 8, 8, 13, 13, 21, 21, 34, 34, 55, 55, 89, 89, 144, 144, 233, 233, 377, 377, 610, 610, 987, 987, 1597, 1597, 2584, 2584, 4181, 4181,));

    $draw->rectangle(275, 200, 400, 350);

    $image = new \Imagick();
    $image->newImage(500, 400, $backgroundColor);
    $image->setImageFormat("png");
    $image->drawImage($draw);

    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setStrokeDashArray($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�m7�>>tests/255_getFeatures.phptnu�[���--TEST--
Test Imagick::getfeatures
--SKIPIF--
<?php

require_once(dirname(__FILE__) . '/skipif.inc');

checkClassMethods('Imagick', array('getfeatures'));


?>
--FILE--
<?php

$features = Imagick::getFeatures();

if (!is_string($features)) {
	echo "Features failed to return a string";
}

echo "Ok";

?>
--EXPECTF--
OkPKq9�Z����&tests/109_Imagick_rollImage_basic.phptnu�[���--TEST--
Test Imagick, rollImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$rollX = 100;
$rollY = 100;

function rollImage($rollX, $rollY) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->rollimage($rollX, $rollY);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

rollImage($rollX, $rollY) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z���1*tests/099_Imagick_oilPaintImage_sigma.phptnu�[���--TEST--
Test Imagick, oilPaintImageWithSigma
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x700;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$radius = 5;

function oilPaintImage($radius) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->oilPaintImageWithSigma($radius, 2.0);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";}
}

oilPaintImage($radius) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z��:l��,tests/094_Imagick_motionBlurImage_basic.phptnu�[���--TEST--
Test Imagick, motionBlurImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$radius = 20;
$sigma = 20;
$angle = 45;
$channel = Imagick::CHANNEL_DEFAULT;

function motionBlurImage($radius, $sigma, $angle, $channel) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->motionBlurImage($radius, $sigma, $angle, $channel);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

motionBlurImage($radius, $sigma, $angle, $channel) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z�'�L#tests/290_imagick_profileimage.phptnu�[���--TEST--
Imagick::profileImage test
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$imagick = new Imagick();
$imagick->newPseudoImage(640, 480, "magick:logo");
$imagick->profileImage('*', null);

echo "Ok";
?>
--EXPECTF--
OkPKq9�Zl�^S""1tests/116_Imagick_separateImageChannel_basic.phptnu�[���--TEST--
Test Imagick, separateImageChannel
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$channel = Imagick::CHANNEL_DEFAULT;

function separateImageChannel($channel) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->separateimagechannel($channel);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

separateImageChannel($channel) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Zu
"C))tests/002_thumbnail.phptnu�[���--TEST--
Different types of thumbnailing
--SKIPIF--
<?php require_once dirname(__FILE__) . '/skipif.inc'; ?>
--FILE--
<?php
echo "--- Source Image: 400x200, Imagick::thumbnailImage( 100, null, false )\n";
$imagick = new Imagick();
$imagick->newImage( 400, 200, "white" );
$imagick->thumbnailImage( 100, null, false );
$g = $imagick->getImageGeometry();
echo "{$g['width']}x{$g['height']}\n";

echo "--- Source Image: 400x200, Imagick::thumbnailImage( null, 100, false )\n";
$imagick = new Imagick();
$imagick->newImage( 400, 200, "white" );
$imagick->thumbnailImage( null, 100, false );
$g = $imagick->getImageGeometry();
echo "{$g['width']}x{$g['height']}\n";

echo "--- Source Image: 400x200, Imagick::thumbnailImage( 100, 100, false )\n";
$imagick = new Imagick();
$imagick->newImage( 400, 200, "white" );
$imagick->thumbnailImage( 100, 100, false);
$g = $imagick->getImageGeometry();
echo "{$g['width']}x{$g['height']}\n";

echo "--- Source Image: 400x200, Imagick::thumbnailImage( null, null, false )\n";
$imagick = new Imagick();
$imagick->newImage( 400, 200, "white" );
try
{
	$imagick->thumbnailImage( null, null, false );
	echo "FAILED TEST\n";
}
catch ( ImagickException $e )
{
	echo $e->getMessage() . "\n";
}

echo "--- Source Image: 400x200, Imagick::thumbnailImage( 100, 100, true )\n";
$imagick = new Imagick();
$imagick->newImage( 400, 200, "white" );
$imagick->thumbnailImage( 100, 100, true );
$g = $imagick->getImageGeometry();
echo "{$g['width']}x{$g['height']}\n";

echo "--- Source Image: 400x200, Imagick::thumbnailImage( 100, null, true )\n";
$imagick = new Imagick();
$imagick->newImage( 400, 200, "white" );
try
{
	$imagick->thumbnailImage( 100, null, true );
	echo "FAILED TEST\n";
}
catch ( ImagickException $e )
{
	echo $e->getMessage() . "\n";
}

echo "--- Source Image: 400x200, Imagick::thumbnailImage( null, 100, true )\n";
$imagick = new Imagick();
$imagick->newImage( 400, 200, "white" );
try
{
	$imagick->thumbnailImage( null, 100, true );
	echo "FAILED TEST\n";
}
catch ( ImagickException $e )
{
	echo $e->getMessage() . "\n";
}

echo "--- Source Image: 400x200, Imagick::thumbnailImage( null, null, true )\n";
$imagick = new Imagick();
$imagick->newImage( 400, 200, "white" );
try
{
	$imagick->thumbnailImage( null, null, true );
	echo "FAILED TEST\n";
}
catch ( ImagickException $e )
{
	echo $e->getMessage() . "\n";
}

// Legacy version
$imagick = new Imagick();
$imagick->newImage(2961, 2592, "white" );
$imagick->thumbnailImage(300, 0, false, false, true);

if ($imagick->getImageWidth() != 300) {
	echo "Error in height for 2961, 2592: actual is ".$image->getImageWidth()." not 300.".PHP_EOL;
}
if ($imagick->getImageHeight() != 262) {
	echo "Error in height for 2961, 2592: actual is ".$image->getImageHeight()." not 262.".PHP_EOL;
}

// Correct version
$imagick = new Imagick();
$imagick->newImage(2961, 2592, "white" );
$imagick->thumbnailImage(300, 0);

if ($imagick->getImageWidth() != 300) {
	echo "Error in height for 2961, 2592: actual is ".$image->getImageWidth()." not 300.".PHP_EOL;
}
if ($imagick->getImageHeight() != 263) {
	echo "Error in height for 2961, 2592: actual is ".$image->getImageHeight()." not 263.".PHP_EOL;
}

?>
--EXPECTF--
--- Source Image: 400x200, Imagick::thumbnailImage( 100, null, false )
100x50
--- Source Image: 400x200, Imagick::thumbnailImage( null, 100, false )
200x100
--- Source Image: 400x200, Imagick::thumbnailImage( 100, 100, false )
100x100
--- Source Image: 400x200, Imagick::thumbnailImage( null, null, false )
Invalid image geometry
--- Source Image: 400x200, Imagick::thumbnailImage( 100, 100, true )
100x50
--- Source Image: 400x200, Imagick::thumbnailImage( 100, null, true )
Invalid image geometry
--- Source Image: 400x200, Imagick::thumbnailImage( null, 100, true )
Invalid image geometry
--- Source Image: 400x200, Imagick::thumbnailImage( null, null, true )
Invalid image geometry
PKq9�Z7]���+tests/212_ImagickDraw_setGravity_basic.phptnu�[���--TEST--
Test ImagickDraw, setGravity
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

require_once(dirname(__FILE__) . '/functions.inc');

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setGravity($fillColor, $strokeColor, $backgroundColor) {

    $draw = new \ImagickDraw();
    setFontForImagickDraw($draw);
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(1);
    $draw->setFontSize(24);

    $gravitySettings = array(\Imagick::GRAVITY_NORTHWEST => 'NorthWest', \Imagick::GRAVITY_NORTH => 'North', \Imagick::GRAVITY_NORTHEAST => 'NorthEast', \Imagick::GRAVITY_WEST => 'West', \Imagick::GRAVITY_CENTER => 'Centre', \Imagick::GRAVITY_SOUTHWEST => 'SouthWest', \Imagick::GRAVITY_SOUTH => 'South', \Imagick::GRAVITY_SOUTHEAST => 'SouthEast', \Imagick::GRAVITY_EAST => 'East');


    foreach ($gravitySettings as $type => $description) {
        $draw->setGravity($type);
        $draw->annotation(50, 50, '"' . $description . '"');
    }

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");
    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setGravity($fillColor, $strokeColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Zkv)ABB*tests/103_Imagick_readImageBlob_basic.phptnu�[���--TEST--
Test Imagick, readImageBlob
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php


function readImageBlob() {

    // Image blob borrowed from:
    // http://www.techerator.com/2011/12/how-to-embed-images-directly-into-your-html/
    $base64 = "iVBORw0KGgoAAAANSUhEUgAAAM0AAAD
 NCAMAAAAsYgRbAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5c
 cllPAAAABJQTFRF3NSmzMewPxIG//ncJEJsldTou1jHgAAAARBJREFUeNrs2EEK
 gCAQBVDLuv+V20dENbMY831wKz4Y/VHb/5RGQ0NDQ0NDQ0NDQ0NDQ0NDQ
 0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0PzMWtyaGhoaGhoaGhoaGhoaGhoxtb0QGho
 aGhoaGhoaGhoaGhoaMbRLEvv50VTQ9OTQ5OpyZ01GpM2g0bfmDQaL7S+ofFC6x
 v3ZpxJiywakzbvd9r3RWPS9I2+MWk0+kbf0Hih9Y17U0nTHibrDDQ0NDQ0NDQ0
 NDQ0NDQ0NTXbRSL/AK72o6GhoaGhoRlL8951vwsNDQ0NDQ1NDc0WyHtDTEhD
 Q0NDQ0NTS5MdGhoaGhoaGhoaGhoaGhoaGhoaGhoaGposzSHAAErMwwQ2HwRQ
 AAAAAElFTkSuQmCC";

    $imageBlob = base64_decode($base64);

    $imagick = new Imagick();
    $imagick->readImageBlob($imageBlob);

    $bytes = $imageBlob;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

readImageBlob() ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Ztaj%%3tests/269_ImagickPixel_setColorFromPixel_basic.phptnu�[���--TEST--
Test ImagickPixel, setColor
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('ImagickPixel', array('setColorFromPixel'));
?>
--FILE--
<?php


$backgroundColor = new \ImagickPixel('green');

$red = new \ImagickPixel('red');

$backgroundColor->setColorFromPixel($red);

$expected = array(
  "r" => 255,
  "g" => 0,
  "b" => 0,
  "a" => 1
);

$actualColor = $backgroundColor->getColor();

if ($actualColor != $expected) {
	echo "Not as expected :\n";
	var_dump($actualColor);
}


echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�{v##'tests/015-imagickdrawsetresolution.phptnu�[���--TEST--
Test ImagickDraw->setResolution
--SKIPIF--
<?php 
	require_once(dirname(__FILE__) . '/skipif.inc');
	checkFormatPresent('png');
?>
--FILE--
<?php

$im = new Imagick();
$im->newImage(1000,1000, "white","png");

$draw = new ImagickDraw();
$draw->setFont (dirname (__FILE__) . '/anonymous_pro_minus.ttf');
$draw->setFontSize(72);

$draw->setResolution(10, 10);
$small = $im->queryFontMetrics($draw, "Hello World");

$draw->setResolution(300, 300);
$large = $im->queryFontMetrics($draw, "Hello World");

if ($small['textWidth'] < $large['textWidth']) {
	echo "Small font _is_ smaller than big font.".PHP_EOL;
}

//These will both be one line.
$oneLine = $im->queryFontMetrics($draw, "Hello Hello");
$forceOneLine = $im->queryFontMetrics($draw, "Hello \nHello", false);

//These will both be multiline
$forceMultiLine = $im->queryFontMetrics($draw, "Hello \nHello", true);
$guessLine = $im->queryFontMetrics($draw, "Hello\nHello");

if (abs($oneLine["textHeight"] - $forceOneLine["textHeight"]) > 0.1) {
	//Reaching this is bad
	echo "One line and forced one line are not the same height.".PHP_EOL;
	echo $oneLine["textHeight"]." ".$forceOneLine["textHeight"].PHP_EOL;
}

if ($forceMultiLine["textHeight"] - (2 * $forceOneLine["textHeight"]) + 2 > 0) {
	echo "Two lines are 2 times one line.".PHP_EOL;
}

if ($guessLine["textHeight"] - (2 * $forceOneLine["textHeight"]) + 2 > 0) {
	echo "Two lines are 2 times one line.".PHP_EOL;
}

echo "OK\n";

?>
--EXPECT--
Small font _is_ smaller than big font.
Two lines are 2 times one line.
Two lines are 2 times one line.
OK
PKr9�Z�]MPP&tests/324_Imagick_polynomialImage.phptnu�[���--TEST--
Test Imagick, polynomialImage
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('polynomialImage'));
?>
--FILE--
<?php

function polynomialImage() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');
    $imagick_gradient = new \Imagick();
    $imagick_gradient->newPseudoImage(
        $imagick->getImageWidth(),
        $imagick->getImageHeight(),
        "gradient:black-white"
    );

    $imagick->addImage($imagick_gradient);

    $terms = [1, 1, 0.1, 0.1];

    // is 2 x (number_terms + 1 (the constant).
    $imagick->polynomialImage($terms);
    $imagick->writeImage(__DIR__ . '/polynomialImage_output_image.png');
    $imagick->getImageBlob();
}

polynomialImage() ;
echo "Ok";
?>
--CLEAN--
<?php
@unlink(__DIR__ . '/polynomialImage_output_image.png');
?>
--EXPECTF--
Ok
PKr9�Z����NN%tests/145_imagickkernel_coverage.phptnu�[���--TEST--
ImagickKernel::fromMatrix test
--SKIPIF--
<?php 

$imageMagickRequiredVersion = 0x680;
require_once(dirname(__FILE__) . '/skipif.inc');
 
?>
--FILE--
<?php


$kernel = array(
	array(1, 0, -1),
	array(1, 0, -1),
	array(1, 0, -1),
);

$kernel = ImagickKernel::fromMatrix($kernel);
$kernel->scale(1, \Imagick::NORMALIZE_KERNEL_VALUE);
$kernel->addUnityKernel(0.50);
$imagick = new \Imagick();
$imagick->newPseudoImage(640, 480, "magick:logo");
$imagick->morphology(
	\Imagick::MORPHOLOGY_CONVOLVE,
	1,
	$kernel
);


$tests = array();

$tests[] = array( 
	"Cannot create kernel, matrix is empty.",
	array()
);

$tests[] = array(
	"Values must be matrix, with the same number of columns in each row.",
	array(0, 1, 1)
);

//Should fail, matrix needs to have same number columns in each row
$tests[] = array(
	"Values must be matrix, with the same number of columns in each row.",
	array(
		array(1, 0, 1),
		array(1, 0, 1),
		array(1, 0),
	)
);

//Should fail, value instead of second row
$tests[] = array(
	"Values must be matrix, with the same number of columns in each row.",
	array(
		array(0, 1),
		1
	)
);

//Should fail, value instead of second row
$tests[] = array( 
	"Only numbers or false are valid values in a kernel matrix.",
	array(
		array(0, 1),
		array(0, new StdClass),
	)
);

$tests[] = array(
	"For kernels with even numbered rows or columns, the origin position must be specified.",
	array(
		array(1, 0),
	),
);


foreach ($tests as $test) {

	list($expectedMessage, $testValue) = $test;

	try {
		$kernel = ImagickKernel::fromMatrix($testValue);
		echo "Failed to throw exception".PHP_EOL;
	}
	catch(ImagickKernelException $e) {
		if ($e->getMessage() != $expectedMessage) {
			echo "Unexpected message ".$e->getMessage()." for test:".PHP_EOL;
			var_dump($test);
		}
	}
}


try {
	$kernel = ImagickKernel::fromBuiltin(\Imagick::KERNEL_DIAMOND, "CestNestPasUneKernel");
	//echo "builtIn OK".PHP_EOL;
}
catch(Exception $e) {
	echo "Unexpected exception: ".$e->getMessage().PHP_EOL;
}


//Test adding unity kernel works.
$matrix1 = array(
	array(1, 1, 1),
	array(0, 0, 0),
	array(-1, -1, -1),
);
$kernel = ImagickKernel::fromMatrix($matrix1);
$kernel->addUnityKernel(0.5);
$matrix = $kernel->getMatrix();

if ($matrix[1][1] != 0.5) {
	echo "center point should be 0.5 but is actually ".$matrix[1][1].PHP_EOL;
	var_dump($matrix);
}
//echo "Adding unity kernel ok".PHP_EOL;

// Test adding kernel works and you can get the values back
$matrix1 = array(
	array(1, 1),
	array(0, 0),
);
$matrix2 = array(
	array(0, 0),
	array(1, 1),
);
$kernel1 = ImagickKernel::fromMatrix($matrix1, array(0, 0));
$kernel2 = ImagickKernel::fromMatrix($matrix2, array(0, 0));
$kernel1->addKernel($kernel2);

$kernelList = $kernel1->separate();
if (count($kernelList) != 2) {
	echo "Incorrect number of matrixes returned.";
}
else {
	if ($kernelList[0]->getMatrix() != $matrix1) {
		echo "Matrix 1 does not match".PHP_EOL;
		var_dump($kernelList[0]);
	}
	if ($kernelList[1]->getMatrix() != $matrix2) {
		echo "Matrix 2 does not match".PHP_EOL;
		var_dump($kernelList[1]);
	}
}

//Test Scaling
$matrixIn = array(
	array(-1, 0, -1),
	array( 0, 8,  0),
	array(-1, 0, -1),
);
$kernel = ImagickKernel::fromMatrix($matrixIn);
$kernel->scale(1, \Imagick::NORMALIZE_KERNEL_VALUE);
$matrixOut = $kernel->getMatrix();

if ($matrixOut[1][1] != 2) {
	echo "Matrix was not normalised correctly.";
	var_dump($matrixOut);
}



//Test single line kernel works
$matrixIn = array(
	array(1, 0),
);
$kernel = ImagickKernel::fromMatrix($matrixIn, array(1, 0));
if ($kernel->getMatrix() != $matrixIn) {
	echo "Values do not match for 'Test single line kernel works'".PHP_EOL;
}

//Test even sized kernel works
$matrixIn = array(
	array(-1, 0),
	array( 0, 1)
);
$kernel = ImagickKernel::fromMatrix($matrixIn, array(0, 1));
if ($kernel->getMatrix() != $matrixIn) {
	echo "Values do not match for 'Test even sized kernel works'".PHP_EOL;
}

//Test 'wrong' order matrix is converted correctly.
$matrix = array(
	array(0.0, 1.0),
	array(0.5, false)
);
 
$outOfOrderMatrix = array();
$outOfOrderMatrix[1][1] = $matrix[1][1];
$outOfOrderMatrix[1][0] = $matrix[1][0];
$outOfOrderMatrix[0][1] = $matrix[0][1];
$outOfOrderMatrix[0][0] = $matrix[0][0];

$kernel = ImagickKernel::fromMatrix($outOfOrderMatrix, array(0, 0));
$kernelMatrix = $kernel->getMatrix();
if ($kernelMatrix !== $matrix) {
	echo "Kernel generated from 'out of order' matrix is incorrect.".PHP_EOL;
	var_dump($matrix);
	echo "vs".PHP_EOL;
	var_dump($kernelMatrix);
}




//Test Scaling, and with null origin
$matrixIn = array(
	array(-1, 0, -1),
	array( 0, 8,  0),
	array(-1, 0, -1),
);
$kernel = ImagickKernel::fromMatrix($matrixIn, null); // <-- line under test
$kernel->scale(1, \Imagick::NORMALIZE_KERNEL_VALUE);
$matrixOut = $kernel->getMatrix();

if ($matrixOut[1][1] != 2) {
	echo "Matrix was not normalised correctly.";
	var_dump($matrixOut);
}


echo "Complete".PHP_EOL;
?>
--EXPECTF--
Complete
PKr9�Z�ugG%%%tests/187_ImagickDraw_push_basic.phptnu�[���--TEST--
Test ImagickDraw, push
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';
$fillModifiedColor = 'LightCoral';

function push($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor) {

    $draw = new \ImagickDraw();
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillModifiedColor);
    $draw->setStrokeWidth(2);
    $draw->setFontSize(72);
    $draw->push();
    $draw->translate(50, 50);
    $draw->rectangle(200, 200, 300, 300);
    $draw->pop();
    $draw->setFillColor($fillColor);
    $draw->rectangle(200, 200, 300, 300);

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");

    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

push($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�<{��&tests/039_Imagick_borderImage_im7.phptnu�[���--TEST--
Test Imagick, borderImageWithComposite
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x700;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$width = 50;
$height = 20;
$color = 'rgb(200, 64, 127)';

function borderImage($color, $width, $height, $blendOption) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->borderImage($color, $width, $height);

    if ($blendOption === null) {
        $imagick->borderImage($color, $width, $height);
    }
    else {
        $imagick->borderImageWithComposite($color, $width, $height, $blendOption);
    }

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) {
        echo "Failed to generate image.";
    }

    return $imagick;
}

$blendOptions = [
    "null" => null,
//    "COMPOSITE_NO" => Imagick::COMPOSITE_NO,
//    //"COMPOSITE_ADD" => Imagick::COMPOSITE_ADD,
    "COMPOSITE_ATOP" => Imagick::COMPOSITE_ATOP,
//    "COMPOSITE_BLEND" => Imagick::COMPOSITE_BLEND,
//    "COMPOSITE_BUMPMAP" => Imagick::COMPOSITE_BUMPMAP,
//    "COMPOSITE_CLEAR" => Imagick::COMPOSITE_CLEAR,
//    "COMPOSITE_COLORBURN" => Imagick::COMPOSITE_COLORBURN,
//    "COMPOSITE_COLORDODGE" => Imagick::COMPOSITE_COLORDODGE,
//    "COMPOSITE_COLORIZE" => Imagick::COMPOSITE_COLORIZE,
//    "COMPOSITE_COPYBLACK" => Imagick::COMPOSITE_COPYBLACK,
//    "COMPOSITE_COPYBLUE" => Imagick::COMPOSITE_COPYBLUE,
//    "COMPOSITE_COPY" => Imagick::COMPOSITE_COPY,
//    "COMPOSITE_COPYCYAN" => Imagick::COMPOSITE_COPYCYAN,
//    "COMPOSITE_COPYGREEN" => Imagick::COMPOSITE_COPYGREEN,
//    "COMPOSITE_COPYMAGENTA" => Imagick::COMPOSITE_COPYMAGENTA,
//    "COMPOSITE_COPYALPHA" => Imagick::COMPOSITE_COPYALPHA,
//    "COMPOSITE_COPYOPACITY" => Imagick::COMPOSITE_COPYOPACITY,
//    "COMPOSITE_COPYRED" => Imagick::COMPOSITE_COPYRED,
//    "COMPOSITE_COPYYELLOW" => Imagick::COMPOSITE_COPYYELLOW,
//    "COMPOSITE_DARKEN" => Imagick::COMPOSITE_DARKEN,
//    "COMPOSITE_DSTATOP" => Imagick::COMPOSITE_DSTATOP,
//    "COMPOSITE_DST" => Imagick::COMPOSITE_DST,
//    "COMPOSITE_DSTIN" => Imagick::COMPOSITE_DSTIN,
//    "COMPOSITE_DSTOUT" => Imagick::COMPOSITE_DSTOUT,
//    "COMPOSITE_DSTOVER" => Imagick::COMPOSITE_DSTOVER,
//    "COMPOSITE_DIFFERENCE" => Imagick::COMPOSITE_DIFFERENCE,
// "COMPOSITE_DISPLACE" => Imagick::COMPOSITE_DISPLACE,
//    "COMPOSITE_DISSOLVE" => Imagick::COMPOSITE_DISSOLVE,
//    "COMPOSITE_EXCLUSION" => Imagick::COMPOSITE_EXCLUSION,
//    "COMPOSITE_HARDLIGHT" => Imagick::COMPOSITE_HARDLIGHT,
//    "COMPOSITE_HUE" => Imagick::COMPOSITE_HUE,
//    "COMPOSITE_IN" => Imagick::COMPOSITE_IN,
//    "COMPOSITE_LIGHTEN" => Imagick::COMPOSITE_LIGHTEN,
//    "COMPOSITE_LUMINIZE" => Imagick::COMPOSITE_LUMINIZE,
//    //"COMPOSITE_MINUS" => Imagick::COMPOSITE_MINUS,
//    "COMPOSITE_MODULATE" => Imagick::COMPOSITE_MODULATE,
//    "COMPOSITE_MULTIPLY" => Imagick::COMPOSITE_MULTIPLY,
//    "COMPOSITE_OUT" => Imagick::COMPOSITE_OUT,
    "COMPOSITE_OVER" => Imagick::COMPOSITE_OVER,
//    "COMPOSITE_OVERLAY" => Imagick::COMPOSITE_OVERLAY,
//    "COMPOSITE_PLUS" => Imagick::COMPOSITE_PLUS,
//    "COMPOSITE_REPLACE" => Imagick::COMPOSITE_REPLACE,
//    "COMPOSITE_SATURATE" => Imagick::COMPOSITE_SATURATE,
//    "COMPOSITE_SCREEN" => Imagick::COMPOSITE_SCREEN,
//    "COMPOSITE_SOFTLIGHT" => Imagick::COMPOSITE_SOFTLIGHT,
//    "COMPOSITE_SRCATOP" => Imagick::COMPOSITE_SRCATOP,
//    "COMPOSITE_SRC" => Imagick::COMPOSITE_SRC,
//    "COMPOSITE_SRCIN" => Imagick::COMPOSITE_SRCIN,
//    "COMPOSITE_SRCOUT" => Imagick::COMPOSITE_SRCOUT,
//    "COMPOSITE_SRCOVER" => Imagick::COMPOSITE_SRCOVER,
//    // "COMPOSITE_SUBTRACT" => Imagick::COMPOSITE_SUBTRACT,
//    "COMPOSITE_THRESHOLD" => Imagick::COMPOSITE_THRESHOLD,
//    "COMPOSITE_XOR" => Imagick::COMPOSITE_XOR,
//    "COMPOSITE_CHANGEMASK" => Imagick::COMPOSITE_CHANGEMASK,
//    "COMPOSITE_LINEARLIGHT" => Imagick::COMPOSITE_LINEARLIGHT,
    // "COMPOSITE_DIVIDE" => Imagick::COMPOSITE_DIVIDE,
//     "COMPOSITE_DISTORT" => Imagick::COMPOSITE_DISTORT,
//    //"COMPOSITE_BLUR" => Imagick::COMPOSITE_BLUR,
//    "COMPOSITE_PEGTOPLIGHT" => Imagick::COMPOSITE_PEGTOPLIGHT,
//    "COMPOSITE_VIVIDLIGHT" => Imagick::COMPOSITE_VIVIDLIGHT,
//    "COMPOSITE_PINLIGHT" => Imagick::COMPOSITE_PINLIGHT,
//    "COMPOSITE_LINEARDODGE" => Imagick::COMPOSITE_LINEARDODGE,
//    "COMPOSITE_LINEARBURN" => Imagick::COMPOSITE_LINEARBURN,
//    "COMPOSITE_MATHEMATICS" => Imagick::COMPOSITE_MATHEMATICS,
//    "COMPOSITE_MODULUSADD" => Imagick::COMPOSITE_MODULUSADD,
//    "COMPOSITE_MODULUSSUBTRACT" => Imagick::COMPOSITE_MODULUSSUBTRACT,
//    "COMPOSITE_MINUSDST" => Imagick::COMPOSITE_MINUSDST,
//    "COMPOSITE_DIVIDEDST" => Imagick::COMPOSITE_DIVIDEDST,
//    "COMPOSITE_DIVIDESRC" => Imagick::COMPOSITE_DIVIDESRC,
//    "COMPOSITE_MINUSSRC" => Imagick::COMPOSITE_MINUSSRC,
//    "COMPOSITE_DARKENINTENSITY" => Imagick::COMPOSITE_DARKENINTENSITY,
//    "COMPOSITE_LIGHTENINTENSITY" => Imagick::COMPOSITE_LIGHTENINTENSITY,
//    "COMPOSITE_HARDMIX" => Imagick::COMPOSITE_HARDMIX,
//    "COMPOSITE_STEREO" => Imagick::COMPOSITE_STEREO,
//    "COMPOSITE_FREEZE" => Imagick::COMPOSITE_FREEZE,
//    "COMPOSITE_INTERPOLATE" => Imagick::COMPOSITE_INTERPOLATE,
//    "COMPOSITE_NEGATE" => Imagick::COMPOSITE_NEGATE,
//    "COMPOSITE_REFLECT" => Imagick::COMPOSITE_REFLECT,
//    "COMPOSITE_SOFTBURN" => Imagick::COMPOSITE_SOFTBURN,
//    "COMPOSITE_SOFTDODGE" => Imagick::COMPOSITE_SOFTDODGE,
//    "COMPOSITE_STAMP" => Imagick::COMPOSITE_STAMP,
//    "COMPOSITE_RMSE" => Imagick::COMPOSITE_RMSE,
];

foreach ($blendOptions as $name => $blendOption) {
    // echo "name: $name \n";
    $imagick = borderImage($color, $width, $height, $blendOption);
    $filename = "039_border_" . $name . ".png";
    // $imagick->writeImage($filename);
}

echo "Ok";
?>
--EXPECTF--
OkPKr9�Z��i��&tests/156_Imagick_tintImage_basic.phptnu�[���--TEST--
Test Imagick, tintImage
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$r = 100;
$g = 50;
$b = 100;
$a = 100;

function tintImage($r, $g, $b, $a) {
    $a = $a / 100;

    $imagick = new \Imagick();
    $imagick->newPseudoImage(400, 400, 'gradient:black-white');

    $tint = new \ImagickPixel("rgb($r, $g, $b)");
    $opacity = new \ImagickPixel("rgb(128, 128, 128, $a)");
    $imagick->tintImage($tint, $opacity);
    $imagick->setImageFormat('png');
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

tintImage($r, $g, $b, $a) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�ZW趺PPtests/263_autoGammaImage.phptnu�[���--TEST--
Test autoGammaImage
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('autoGammaImage'));
?>
--FILE--
<?php

$im = new Imagick("magick:logo");
$im->autoGammaImage();


$im = new Imagick("magick:logo");
$im->autoGammaImage(\Imagick::CHANNEL_RED);

echo "Ok";

?>
--EXPECT--
Ok
PKr9�Z��ޑ��tests/bug_71742.phptnu�[���--TEST--
Bug #71742	polyline touched by array_walk
--SKIPIF--
<?php 
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$coordinates = array();

foreach (range (0, 100) as $index) {
	$coordinates[] = array(
		'x' => 2 * $index,
		'y' => pow($index, 2)
	);
}

$callback = function (&$coordinate) {
	$coordinate['y'] = 200 - $coordinate['y'] / 50;
};

array_walk($coordinates, $callback);

$imagick = new Imagick();
$imagick->newImage(200, 200, "white");

$draw = new ImagickDraw ();
$draw->setFillColor("none");
$draw->setStrokeColor("black");

//Fatal error in PHP 7, but not in PHP <= 5.6
$draw->polyline($coordinates);

$draw->translate(0, -20);
////Works in PHP 7
$draw->polyline (array_values($coordinates));
$imagick->drawImage($draw);
//$imagick->writeImage(getcwd()."/test.png");
$imagick->setImageFormat('png');
$bytes = $imagick->getImageBlob();

if (strlen($bytes) <= 0) { 
	echo "Failed to generate image.";
}

//$imagick->writeImage("./bugTest.png");

echo "Ok";

?>
--EXPECT--
OkPKr9�Z,$�5��*tests/177_ImagickDraw_composite_basic.phptnu�[���--TEST--
Test ImagickDraw, composite
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

require_once(dirname(__FILE__) . '/functions.inc');

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function composite($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    setFontForImagickDraw($draw);

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setFillOpacity(1);
    $draw->setStrokeWidth(2);
    $draw->setFontSize(72);
    $draw->setStrokeOpacity(1);
    $draw->setStrokeColor($strokeColor);
    $draw->setStrokeWidth(2);
    $draw->setFontSize(140);
    $draw->rectangle(0, 0, 1000, 300);
    $draw->setFillColor('white');
    $draw->setfillopacity(1);
    $draw->annotation(50, 180, "Lorem Ipsum!");

//    $imagick = new \Imagick(realpath("../images/TestImage.jpg"));
//    $draw->composite(\Imagick::COMPOSITE_MULTIPLY, -500, -200, 2000, 600, $imagick);

    //$imagick->compositeImage($draw, 0, 0, 1000, 500);
    //$draw->composite(Imagick::COMPOSITE_COLORBURN, -500, -200, 2000, 600, $imagick);

    //Create an image object which the draw commands can be rendered into
    $imagick = new \Imagick();
    $imagick->newImage(1000, 302, $backgroundColor);
    $imagick->setImageFormat("png");

    //Render the draw commands in the ImagickDraw object 
    //into the image.
    $imagick->drawImage($draw);

    //Send the image to the browser
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

composite($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z���ltests/012-clone-separation.phptnu�[���--TEST--
Testing that cloned object does not affect the original
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php
$im = new Imagick();
$im->newImage(100, 100, new ImagickPixel("white"));

$new = clone $im;
$new->thumbnailImage(200, null);
var_dump($im->width, $new->width);

$new2 = $im->clone();
$new2->thumbnailImage(200, null);
var_dump($im->width, $new2->width);

?>
--EXPECTF--
int(100)
int(200)

%s: Imagick::clone method is deprecated and it's use should be avoided in %s on line %d
int(100)
int(200)PKr9�ZS�<��2tests/224_ImagickDraw_setTextUnderColor_basic.phptnu�[���--TEST--
Test ImagickDraw, setTextUnderColor
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

require_once(dirname(__FILE__) . '/functions.inc');

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';
$textUnderColor = 'DeepPink2';

function setTextUnderColor($strokeColor, $fillColor, $backgroundColor, $textUnderColor) {
    $draw = new \ImagickDraw();
    setFontForImagickDraw($draw);

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(2);
    $draw->setFontSize(72);
    $draw->annotation(50, 75, "Lorem Ipsum!");
    $draw->setTextUnderColor($textUnderColor);
    $draw->annotation(50, 175, "Lorem Ipsum!");

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");

    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setTextUnderColor($strokeColor, $fillColor, $backgroundColor, $textUnderColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z`\�^^tests/bug59378.phptnu�[���--TEST--
Test PHP bug #59378 writing to php://memory is incomplete
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
<?php if (substr(PHP_OS, 0, 3) == 'WIN') {  die("skip php://memory can't be used as filehandle on Windows"); } ?>
--FILE--
<?php

$imagick = new Imagick();
$imagick->newPseudoImage(640, 480, "LOGO:");
$imagick->setFormat("png");

$fp = fopen("php://memory", 'r+');
$imagick->writeImageFile($fp);
rewind($fp);
$memoryBlob = stream_get_contents($fp);
fclose($fp);

//This test depends on getImageBlob working correctly.
$imageBlob = $imagick->getImageBlob();

//Read the images from the data blobs.
$imageReopened = new Imagick();
$imageReopened->readImageBlob($imageBlob);
$memoryReopened = new Imagick();
$memoryReopened->readImageBlob($memoryBlob);

//Compare to see if they are identical.
$result = $imageReopened->compareImages($memoryReopened, \Imagick::METRIC_MEANABSOLUTEERROR);

if ($result[1] == 0) {
    echo "Reopened images are identical.";
}
else {
    echo "Error, reopened images have changed.";
    var_dump($result);
}

?>
--EXPECTF--
Reopened images are identical.
PKr9�Z�K$&tests/042_Imagick_clutImage_basic.phptnu�[���--TEST--
Test Imagick, clutImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc'); 
?>
--FILE--
<?php

$draw = new \ImagickDraw();
$draw->setStrokeOpacity(0);
$draw->setFillColor('black');
$points = [
	['x' => 40 * 3, 'y' => 10 * 5],
	['x' => 20 * 3, 'y' => 20 * 5],
	['x' => 70 * 3, 'y' => 50 * 5],
	['x' => 80 * 3, 'y' => 15 * 5],
];
$draw->polygon($points);
$imagick = new \Imagick();

$imagick->setColorspace(\Imagick::COLORSPACE_GRAY);

$imagick->newPseudoImage(
	300, 300,
	"xc:white"
);

$imagick->drawImage($draw);
$imagick->blurImage(0, 10);

$draw = new \ImagickDraw();
$draw->setStrokeOpacity(1);
$draw->setFillColor('red');
$draw->point(0, 2);
$draw->setFillColor('yellow');
$draw->rectangle(0, 0, 1, 1);
$gradient = new Imagick();
$gradient->newPseudoImage(1, 5, 'xc:black');
$gradient->drawImage($draw);
$gradient->setImageFormat('png');



$imagick->setImageFormat('png');

// This test is for IM < 7 so setInterpolate not available
// Which probably means the clutImage method isn't usuable...
//$imagick->setInterpolateMethod(Imagick::INTERPOLATE_BILINEAR);
$imagick->clutImage($gradient);

$bytes = $imagick->getImageBlob();
if (strlen($bytes) <= 0) { echo "Failed to generate image.";}


echo "Ok";
?>
--EXPECTF--
OkPKr9�Z����pp2tests/219_ImagickDraw_setStrokeLineJoin_basic.phptnu�[���--TEST--
Test ImagickDraw, setStrokeLineJoin
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setStrokeLineJoin($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();
    $draw->setStrokeWidth(1);
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);

    $draw->setStrokeWidth(20);

    $offset = 220;

    $lineJoinStyle = array(\Imagick::LINEJOIN_MITER, \Imagick::LINEJOIN_ROUND, \Imagick::LINEJOIN_BEVEL,);

    for ($x = 0; $x < count($lineJoinStyle); $x++) {
        $draw->setStrokeLineJoin($lineJoinStyle[$x]);
        $points = array(
            array('x' => 40 * 5, 'y' => 10 * 5 + $x * $offset),
            array('x' => 20 * 5, 'y' => 20 * 5 + $x * $offset),
            array('x' => 70 * 5, 'y' => 50 * 5 + $x * $offset),
            array('x' => 40 * 5, 'y' => 10 * 5 + $x * $offset),
        );

        $draw->polyline($points);
    }

    $image = new \Imagick();
    $image->newImage(500, 700, $backgroundColor);
    $image->setImageFormat("png");

    $image->drawImage($draw);

    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setStrokeLineJoin($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�ZD.�kkk&tests/047_Imagick_convolveImage_6.phptnu�[���--TEST--
Test Imagick, convolveImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
$imageMagickBelowVersion=0x700;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$bias = 0.5;
$kernelMatrix = array (
  0 => -1,
  1 => -1,
  2 => -1,
  3 => -1,
  4 => 8,
  5 => -1,
  6 => -1,
  7 => -1,
  8 => -1,
);

function convolveImage($bias, $kernelMatrix) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    
    //$edgeFindingKernel = [-1, -1, -1, -1, 8, -1, -1, -1, -1,];
    
    $imagick->setImageBias($bias * \Imagick::getQuantum());
    $imagick->convolveImage($kernelMatrix);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

convolveImage($bias, $kernelMatrix) ;
echo "Ok";
?>
--EXPECTF--
Deprecated: %s Imagick::setImageBias() is deprecated in %s
Ok
PKr9�Z�'�5,,(tests/141_Imagick_sketchImage_basic.phptnu�[���--TEST--
Test Imagick, sketchImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$radius = 5;
$sigma = 1;
$angle = 45;

function sketchImage($radius, $sigma, $angle) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->sketchimage($radius, $sigma, $angle);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

sketchImage($radius, $sigma, $angle) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�4E�BB&tests/037_Imagick_blurImage_basic.phptnu�[���--TEST--
Test Imagick, blurImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$radius = 5;
$sigma = 1;
$channel = Imagick::CHANNEL_DEFAULT;

function blurImage($radius, $sigma, $channel) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->blurImage($radius, $sigma, $channel);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

blurImage($radius, $sigma, $channel) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z{�s��3tests/252_ImagickPixelIterator_construct_basic.phptnu�[���--TEST--
Test ImagickPixelIterator, construct
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function construct() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imageIterator = new \ImagickPixelIterator($imagick);

    /* Loop through pixel rows */
    foreach ($imageIterator as $pixels) { 
        /* Loop through the pixels in the row (columns) */
        foreach ($pixels as $column => $pixel) { 
            /** @var $pixel \ImagickPixel */
            if ($column % 2) {
                /* Paint every second pixel black*/
                $pixel->setColor("rgba(0, 0, 0, 0)");
            }
        }
        /* Sync the iterator, this is important to do on each iteration */
        $imageIterator->syncIterator();
    }

    $bytes = $imagick;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

construct() ;
echo "Ok";
?>
--EXPECTF--
Ok
PKr9�Z�G�00(tests/110_Imagick_resizeImage_basic.phptnu�[���--TEST--
Test Imagick, resizeImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$filterType = 22;
$width = 200;
$height = 200;
$blur = 1;
$bestFitSettings = array(0, 1);
$cropZoom = 1;

function resizeImage($width, $height, $filterType, $blur, $bestFit, $cropZoom) {
    //The blur factor where &gt; 1 is blurry, &lt; 1 is sharp.
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");

    $imagick->resizeImage($width, $height, $filterType, $blur, $bestFit);

    $cropWidth = $imagick->getImageWidth();
    $cropHeight = $imagick->getImageHeight();

    if ($cropZoom) {
        $newWidth = $cropWidth / 2;
        $newHeight = $cropHeight / 2;

        $imagick->cropimage(
            $newWidth,
            $newHeight,
            (int)(($cropWidth - $newWidth) / 2),
            (int)(($cropHeight - $newHeight) / 2)
        );

        $imagick->scaleimage(
            $imagick->getImageWidth() * 4,
            $imagick->getImageHeight() * 4
        );
    }


    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

foreach ($bestFitSettings as $bestFit) {
	resizeImage($width, $height, $filterType, $blur, $bestFit, $cropZoom);
}
echo "Ok";
?>
--EXPECTF--
OkPKr9�ZJ����-tests/201_ImagickDraw_setFillAlpha_basic.phptnu�[���--TEST--
Test ImagickDraw, setFillAlpha
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setFillAlpha($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeOpacity(1);
    $draw->setStrokeWidth(2);
    $draw->rectangle(100, 200, 200, 300);
    @$draw->setFillAlpha(0.4);
    $draw->rectangle(300, 200, 400, 300);

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");
    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setFillAlpha($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�[-���,tests/162_Imagick_transverseImage_basic.phptnu�[���--TEST--
Test Imagick, transverseImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function transverseImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->transverseImage();
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

transverseImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z\����)tests/309_Imagick_orderedDitherImage.phptnu�[���--TEST--
Test Imagick, orderedDitherImage
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('orderedDitherImage'));
?>
--FILE--
<?php


function orderedDitherImage() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');
    $imagick->orderedDitherImage("o3x3,6");
//    $imagick->writeImage(__DIR__ . '/claheImage_output_image.png');
    $imagick->getImageBlob();
}

orderedDitherImage() ;
echo "Ok";
?>
--EXPECTF--
Ok
PKr9�ZC���*tests/170_ImagickPixel_setColor_basic.phptnu�[���--TEST--
Test ImagickPixel, setColor
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php


function setColor() {
    $draw = new \ImagickDraw();

    $strokeColor = new \ImagickPixel('green');
    $fillColor = new \ImagickPixel();
    $fillColor->setColor('rgba(100%, 75%, 0%, 1.0)');

    $draw->setstrokewidth(3.0);
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->rectangle(200, 200, 300, 300);

    $image = new \Imagick();
    $image->newImage(500, 500, "SteelBlue2");
    $image->setImageFormat("png");

    $image->drawImage($draw);

    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setColor() ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z|�"��.tests/207_ImagickDraw_setFontFamily_basic.phptnu�[���--TEST--
Test ImagickDraw, setFontFamily
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

require_once(dirname(__FILE__) . '/functions.inc');

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setFontFamily($fillColor, $strokeColor, $backgroundColor) {

    $draw = new \ImagickDraw();
    setFontForImagickDraw($draw);

    $strokeColor = new \ImagickPixel($strokeColor);
    $fillColor = new \ImagickPixel($fillColor);

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    //TODO - actually use setFontFamily
    $draw->setStrokeWidth(2);

    $draw->setFontSize(24);
    $draw->annotation(50, 50, "Lorem Ipsum!");

    $draw->setFontSize(36);
    $draw->annotation(50, 100, "Lorem Ipsum!");

    $draw->setFontSize(48);
    $draw->annotation(50, 150, "Lorem Ipsum!");

    $draw->setFontSize(60);
    $draw->annotation(50, 200, "Lorem Ipsum!");

    $draw->setFontSize(72);
    $draw->annotation(50, 250, "Lorem Ipsum!");

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");
    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setFontFamily($fillColor, $strokeColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z��H%%*tests/061_Imagick_distortImage_Barrel.phptnu�[���--TEST--
Test Imagick, distortImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$distortion = 1;


// The arguments needed for the 'Barrel' distort method. Generally you supply
// 3 or 4 values only...
// A   B   C   [ D   [ X , Y ] ]
// The optional X,Y arguments provide an optional 'center' for the radial distortion,
// otherwise it defaults to the exact center of the image given (regardless of its virtual offset).
// The coefficients are designed so that if all four A to D values, add up to '1.0', the minimal
// width/height of the image will not change. For this reason if D (which controls the overall
// scaling of the image) is not supplied it will be set so all four values do add up to '1.0'.
    
        $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
     
        $points = array(
            //0.2, 0.0, 0.0, 1.0
            0.4, 0.6, 0.0, 1.0
        );

        $imagick->setimagebackgroundcolor("#fad888");
        $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_EDGE);
        $imagick->distortImage(\Imagick::DISTORTION_BARREL, $points, TRUE);
    $bytes = $imagick;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 

echo "Ok";
?>
--EXPECTF--
OkPKr9�Zd�[$tests/303_Imagick_averageImages.phptnu�[���--TEST--
Test Imagick, averageImages
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('averageImages'));
?>
--FILE--
<?php


function averageImages() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:LOGO");
    $imagick2 = new \Imagick();
    $imagick2->newPseudoImage(640, 480, "gradient:black-white");


    $imagick->addImage($imagick2);
    $imagick->setIteratorIndex(0);

    $result_imagick = $imagick->averageImages();
    $result_imagick->setImageFormat('png');
    $result_imagick->writeImage(__DIR__ . '/averageImages_output_image.png');
    $result_imagick->getImageBlob();
}

averageImages() ;
echo "Ok";
?>
--CLEAN--
<?php
@unlink(__DIR__ . '/averageImages_output_image.png');
?>
--EXPECTF--
Ok
PKr9�Z�!��LL2tests/225_ImagickDraw_setTextDecoration_basic.phptnu�[���--TEST--
Test ImagickDraw, setTextDecoration
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

require_once(dirname(__FILE__) . '/functions.inc');

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';
$textDecoration = 2;

function setTextDecoration($strokeColor, $fillColor, $backgroundColor, $textDecoration) {

    $draw = new \ImagickDraw();
    setFontForImagickDraw($draw);

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(2);
    $draw->setFontSize(72);
    $draw->setTextDecoration($textDecoration);
    $draw->annotation(50, 75, "Lorem Ipsum!");

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");
    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setTextDecoration($strokeColor, $fillColor, $backgroundColor, $textDecoration) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�ZW�õtests/bug81235.phptnu�[���--TEST--
Bug #81235 (Imagick::newPseudoImage gives open_basedir restriction error)
--SKIPIF--
<?php require_once(__DIR__ . '/skipif.inc'); ?>
--FILE--
<?php
ini_set('open_basedir', __DIR__);
$imagick = new \Imagick();
$imagick->newPseudoImage(10, 10, "canvas:white");
?>
--EXPECT--
PKr9�Z��g��tests/skipprobefourier.incnu�[���<?php

$canCallFourier = false;

ob_start();

echo("skip failed to probe fourier functions");

try {
	$imagick = new \Imagick();
	$imagick->newPseudoImage(640, 480, "magick:logo");
	$imagick->resizeimage(512, 512, \Imagick::FILTER_LANCZOS, 1);
	$imagick->forwardFourierTransformImage(true);
	$canCallFourier = true;
}
catch(\Exception $e) {
	//fftw probably not available.
}

ob_end_clean();

if ($canCallFourier == false) {
	die("skip fourier function seems unavailable");
}

?>PKr9�Z,	 ;��'tests/149_Imagick_sparseColorImage.phptnu�[���--TEST--
Test Imagick, sparseColorImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x653;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php




function createGradientImage($width, $height, $colorPoints, $sparseMethod, $absolute = false) {

    $imagick = new \Imagick();
    $imagick->newImage($width, $height, "rgba(255, 255, 255, 1)");
    $imagick->setImageFormat("png");

    $barycentricPoints = array();

    foreach ($colorPoints as $colorPoint) {

        if ($absolute == true) {
            $barycentricPoints[] = $colorPoint[0];
            $barycentricPoints[] = $colorPoint[1];
        }
        else {
            $barycentricPoints[] = $colorPoint[0] * $width;
            $barycentricPoints[] = $colorPoint[1] * $height;
        }

        if (is_string($colorPoint[2])) {
            $imagickPixel = new \ImagickPixel($colorPoint[2]);
        }
        else if ($colorPoint[2] instanceof \ImagickPixel) {
            $imagickPixel = $colorPoint[2];
        }
        else{
            $errorMessage = sprintf(
                "Value %s is neither a string nor an ImagickPixel class. Cannot use as a color.",
                $colorPoint[2]
            );

            throw new \InvalidArgumentException(
                $errorMessage
            );
        }

        $red = $imagickPixel->getColorValue(\Imagick::COLOR_RED);
        $green = $imagickPixel->getColorValue(\Imagick::COLOR_GREEN);
        $blue = $imagickPixel->getColorValue(\Imagick::COLOR_BLUE);
        $alpha = $imagickPixel->getColorValue(\Imagick::COLOR_ALPHA);

        $barycentricPoints[] = $red;
        $barycentricPoints[] = $green;
        $barycentricPoints[] = $blue;
        $barycentricPoints[] = $alpha;
    }

    $imagick->sparseColorImage($sparseMethod, $barycentricPoints);

    return $imagick;
}

function renderImageBarycentric() {
    $points = array(
        array(0, 0, 'skyblue'),
        array(-1, 1, 'skyblue'),
        array(1, 1, 'black'),
    );
    $imagick = createGradientImage(600, 200, $points, \Imagick::SPARSECOLORMETHOD_BARYCENTRIC);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
    echo "Ok".PHP_EOL;
}
function renderImageVoronoi() {
    $points = array(
        array(0.30, 0.10, 'red'),
        array(0.10, 0.80, 'blue'),
        array(0.70, 0.60, 'lime'),
        array(0.80, 0.20, 'yellow'),
    );
    $imagick = createGradientImage(500, 500, $points, \Imagick::SPARSECOLORMETHOD_VORONOI);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
    echo "Ok".PHP_EOL;
}
function renderImageShepards() {
    $points = array(
            array(0.30, 0.10, 'red'),
            array(0.10, 0.80, "RGBA(0, 255, 0, 0.5)"),
            array(0.70, 0.60, "RGBA(0, 255, 0, 1)"),
            array(0.80, 0.20, 'yellow'),
        );
    $imagick = createGradientImage(600, 600, $points, \Imagick::SPARSECOLORMETHOD_SPEPARDS);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";}
    echo "Ok".PHP_EOL;
}

function renderImageBilinear() {
    $points = array(
        array(0.30, 0.10, 'red'),
        array(0.10, 0.80, 'blue'),
        array(0.70, 0.60, 'lime'),
        array(0.80, 0.20, 'yellow'),
    );
    $imagick = createGradientImage(500, 500, $points, \Imagick::SPARSECOLORMETHOD_BILINEAR);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";}
    echo "Ok".PHP_EOL;
}

try {
	renderImageBilinear() ;
}
catch (\Exception $e) {
	echo "renderImageBilinear failed ".$e->getMessage().PHP_EOL;
}
try {
	renderImageShepards();
}
catch (\Exception $e) {
	echo "renderImageShepards failed ".$e->getMessage().PHP_EOL;
}
try {
	renderImageVoronoi();
}
catch (\Exception $e) {
	echo "renderImageVoronoi failed ".$e->getMessage().PHP_EOL;
}
try {
	renderImageBarycentric();
}
catch (\Exception $e) {
	echo "renderImageBarycentric failed ".$e->getMessage().PHP_EOL;
}

?>
--EXPECTF--
Ok
Ok
Ok
OkPKr9�Z�O�3tests/084_Imagick_getPixelRegionIterator_basic.phptnu�[���--TEST--
Test Imagick, getPixelRegionIterator
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function getPixelRegionIterator() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imageIterator = $imagick->getPixelRegionIterator(100, 100, 200, 200);

    /** @noinspection PhpUnusedLocalVariableInspection */
    foreach ($imageIterator as $row => $pixels) { /* Loop trough pixel rows */
        foreach ($pixels as $column => $pixel) { /* Loop through the pixels in the row (columns) */
            /** @var $pixel \ImagickPixel */
            if ($column % 2) {
                $pixel->setColor("rgba(0, 0, 0, 0)"); /* Paint every second pixel black*/
            }
        }
        $imageIterator->syncIterator(); /* Sync the iterator, this is important to do on each iteration */
    }

    $bytes = $imagick;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

getPixelRegionIterator() ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z*�Z���2tests/098_Imagick_orderedPosterizeImage_basic.phptnu�[���--TEST--
Test Imagick, orderedPosterizeImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');

checkClassMethods('Imagick', array('orderedPosterizeImage'));
?>
--FILE--
<?php

$orderedPosterizeType = "o8x8";

function orderedPosterizeImage($orderedPosterizeType) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    
  
    $imagick->orderedPosterizeImage($orderedPosterizeType);
    $imagick->setImageFormat('png');
    
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

orderedPosterizeImage($orderedPosterizeType) ;
echo "Ok";
?>
--EXPECTF--
Deprecated: %s Imagick::orderedPosterizeImage() is deprecated in %S
Ok
PKr9�Z��v���/tests/171_ImagickPixel_setColorValue_basic.phptnu�[���--TEST--
Test ImagickPixel, setColorValue
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php


function setColorValue() {
    $image = new \Imagick();
    $draw = new \ImagickDraw();

    $color = new \ImagickPixel('blue');
    $color->setcolorValue(\Imagick::COLOR_RED, 128);

    $draw->setstrokewidth(1.0);
    $draw->setStrokeColor($color);
    $draw->setFillColor($color);
    $draw->rectangle(200, 200, 300, 300);

    $image->newImage(500, 500, "SteelBlue2");
    $image->setImageFormat("png");
    $image->drawImage($draw);

    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setColorValue() ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�x��22*tests/142_Imagick_solarizeImage_basic.phptnu�[���--TEST--
Test Imagick, solarizeImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$solarizeThreshold = 0.2;

function solarizeImage($solarizeThreshold) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->solarizeImage($solarizeThreshold * \Imagick::getQuantum());
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

solarizeImage($solarizeThreshold) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�ZRq�SMM&tests/164_Imagick_trimImage_basic.phptnu�[���--TEST--
Test Imagick, trimImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$color = 'rgb(39, 194, 255)';
$fuzz = 0.1;

function trimImage($color, $fuzz) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    
    $imagick->borderImage($color, 10, 10);
    $imagick->trimImage($fuzz * \Imagick::getQuantum());

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

trimImage($color, $fuzz) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Zf���+tests/258_Imagick_evaluateImages_basic.phptnu�[���--TEST--
Test Imagick, Imagick::evaluateImages
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x687;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$imagick = new \Imagick();
$imagick->newPseudoImage(256, 256, "gradient:black-white");

$imagick2 = new \Imagick();
$imagick2->newPseudoImage(256, 256, "gradient:red-white");

$imagick->addImage($imagick2);
$imagick->setImageFormat('png');

$imagick->setIteratorIndex(0);

$evaluated = $imagick->evaluateImages(\Imagick::EVALUATE_MEAN);

$evaluated->setImageFormat('png');
// $evaluated->writeImage("./evaluateTest.png");
$data = $evaluated->getImageBlob();

if (strlen($data) < 50) {
	echo "Image data seems too short.";
}

echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�� ���tests/262_autoOrient.phptnu�[���--TEST--
Test autoOrient
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc');

$v = Imagick::getVersion();
if ($v['versionNumber'] < 0x693)
	die ('skip too old ImageMagick');

// if ($v ['versionNumber'] >= 0x660 && $v ['versionNumber'] < 0x670)
//	die ('skip seems to be broken in this version of ImageMagick');
?>
--FILE--
<?php

$im = new Imagick("magick:logo");
$im->autoOrient();

echo "Ok";

?>
--EXPECT--
OkPKr9�Z[��mmtests/006_cropthumbnail.phptnu�[���--TEST--
Test cropthumbnail
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$im = new Imagick("magick:rose");
$im->cropThumbnailImage(200, 200);
var_dump($im->getImageGeometry());

$im = new Imagick("magick:rose");
$im->cropThumbnailImage(170, 120);
var_dump($im->getImageGeometry());

$im = new Imagick("magick:rose");
$im->cropThumbnailImage(50, 50);
var_dump($im->getImageGeometry());

$im = new Imagick("magick:rose");
$im->cropThumbnailImage(60, 120);
var_dump($im->getImageGeometry());

$im = new Imagick("magick:logo");
$im->cropThumbnailImage(100, 100);
var_dump($im->getImageGeometry());

$im = new Imagick("magick:rose");
$im->cropThumbnailImage(200, 10);
var_dump($im->getImageGeometry());

?>
--EXPECTF--
array(2) {
  ["width"]=>
  int(200)
  ["height"]=>
  int(200)
}
array(2) {
  ["width"]=>
  int(170)
  ["height"]=>
  int(120)
}
array(2) {
  ["width"]=>
  int(50)
  ["height"]=>
  int(50)
}
array(2) {
  ["width"]=>
  int(60)
  ["height"]=>
  int(120)
}
array(2) {
  ["width"]=>
  int(100)
  ["height"]=>
  int(100)
}
array(2) {
  ["width"]=>
  int(200)
  ["height"]=>
  int(10)
}PKr9�Z��+���tests/functions.incnu�[���<?php

/**
 *
 * Gets the installed version of ImageMagick and compares the
 * appropriate version to the installed version. *
 *
 * @param $testIm6Version
 * @param $im7Version
 * @return int
 */
function version_compare_imagemagick($testIm6Version, $im7Version)
{
    $versionInfo = \Imagick::getVersion();

    if (array_key_exists("versionString", $versionInfo) == false) {
        die("skip unable to determine ImageMagick version.");
    }

    $versionInstalledStringComplete = $versionInfo["versionString"];

    $firstSpace = strpos($versionInstalledStringComplete, ' ');
    if ($firstSpace === false) {
        die("Failed to understand version string [$versionInstalledStringComplete] - finding first space");
    }

    $secondSpace = strpos($versionInstalledStringComplete, ' ', $firstSpace + 1);
    if ($secondSpace === false) {
        die("Failed to understand version string [$versionInstalledStringComplete] - finding second space");
    }

    $versionInstalledString = substr($versionInstalledStringComplete, $firstSpace + 1, $secondSpace - $firstSpace - 1);
    // echo "versionInstalledString is $versionInstalledString \n";

    $versionToCompare = $im7Version;
    if (substr($versionInstalledString, 0, 1) === '6') {
        $versionToCompare = $testIm6Version;
    }

    return version_compare($versionInstalledString, $versionToCompare);
}

/**
 *
 * Compares the installed version of ImageMagick and returns true if the appropriate
 * version is greater
 *
 * @param $testIm6Version
 * @param $im7Version
 * @return bool
 */
function isVersionGreaterEqual($testIm6Version, $im7Version)
{
    $versionCompare = version_compare_imagemagick($testIm6Version, $im7Version);
    // echo "version compare for $testIm6Version, $im7Version is $versionCompare \n";

    if ($versionCompare >= 0) {
        return true;
    }

    return false;
}

/**
 * On some systems, where the standard fonts aren't available, trying
 * to draw any text fails as the ImageMagick default font is null.
 *
 * This function just find a 'sensible' font to use, either from the
 * preferred list, or just the first one from queryFonts(). That 'probably'
 * is the right thing to do, as it makes the tests more stable.
 */
function findDefaultFont()
{
    $knownFonts = [
        'Courier',
        'Helvetica',
        'Times-Roman',
        'Liberation-Mono',
        'Utopia',
    ];

    $fontList = \Imagick::queryFonts();

    foreach ($knownFonts as $knownFont) {

        if (in_array($knownFont, $fontList, true) === true) {
            return $knownFont;
        }
    }

    if (count($fontList) !== 0) {
        return $fontList[0];
    }

    throw new \Exception("No fonts available on system, apparently.");
}

// Find and set a font for the Imagick object
function setFontForImagick(\Imagick $imagick)
{
    $font = findDefaultFont();

    $imagick->setFont($font);
}

// Find and set a font for the ImagickDraw object
function setFontForImagickDraw(\ImagickDraw $imagickDraw)
{
    $font = findDefaultFont();

    $imagickDraw->setFont($font);
}

/**
 * Checks that a named value exists in an array and it matches
 * an expected value.
 */
function check_value(array $values, $name, $expected_value)
{
	if (array_key_exists($name, $values) !== true) {

		$message = "Expected key '$name' not set. Array contains:\n";
		$message .= var_export($values, true);

		throw new \Exception($message);
	}


	$value = $values[$name];

	$epsilon = 0.01;

	if (($value < $expected_value - $epsilon) || ($value > $expected_value + $epsilon)) {
		$message = "Value for $name doesn't match expected. Expected: $expected_value, actual: $value";
		throw new \Exception($message);
	}

	echo "Value for '$name' is $value which is close enough to expected $expected_value\n";
}


/**
 * Checks that a named value exists in an array and it matches
 * one of a number of expected values.
 * This function exists because the expected values for Kurtosis can
 * change when the underlying maths changes: https://github.com/ImageMagick/ImageMagick/issues/6924
 */
function check_value_posibilities(array $values, $name, array $expected_values)
{
    if (array_key_exists($name, $values) !== true) {

        $message = "Expected key '$name' not set. Array contains:\n";
        $message .= var_export($values, true);

        throw new \Exception($message);
    }


    $value = $values[$name];

    $epsilon = 0.01;

    foreach ($expected_values as $expected_value) {
        if (($value > $expected_value - $epsilon) && ($value < $expected_value + $epsilon)) {
            echo "Value for '$name' is $value which is close enough to expected $expected_value\n";
            return;
        }
    }

    $expected_string = implode(", ", $expected_values);

    $message = "Value for $name doesn't match expected possibilities. Expected one of: $expected_string, actual: $value";
    throw new \Exception($message);
}


function check_value_with_epsilon(array $values, $name, $expected_value, $epsilon)
{
	if (array_key_exists($name, $values) !== true) {

		$message = "Expected key '$name' not set. Array contains:\n";
		$message .= var_export($values, true);

		throw new \Exception($message);
	}


	$value = $values[$name];

	if (($value < $expected_value - $epsilon) || ($value > $expected_value + $epsilon)) {
		$message = "Value for $name doesn't match expected. Expected: $expected_value, actual: $value, epsilon = $epsilon";
		throw new \Exception($message);
	}

	echo "Value for '$name' is $value which is close enough to expected $expected_value\n";
}PKr9�Z�J����)tests/117_Imagick_segmentImage_basic.phptnu�[���--TEST--
Test Imagick, segmentImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$clusterThreshold = 5;
$smoothThreshold = 5;
$colorSpace = 1;

function segmentImage($colorSpace, $clusterThreshold, $smoothThreshold) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->segmentImage($colorSpace, $clusterThreshold, $smoothThreshold);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

segmentImage($colorSpace, $clusterThreshold, $smoothThreshold) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�)�R��2tests/120_Imagick_setCompressionQuality_basic.phptnu�[���--TEST--
Test Imagick, setCompressionQuality
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$quality = 15;

function setCompressionQuality($quality) {

    $backgroundImagick = new \Imagick();
    $backgroundImagick->newPseudoImage(640, 480, "magick:logo");
    
    $imagick = new \Imagick();
    $imagick->setCompressionQuality($quality);
    $imagick->newPseudoImage(
        $backgroundImagick->getImageWidth(),
        $backgroundImagick->getImageHeight(),
        'canvas:white'
    );

    $imagick->compositeImage(
        $backgroundImagick,
        \Imagick::COMPOSITE_ATOP,
        0,
        0
    );
    
    $imagick->setFormat("jpg");    
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setCompressionQuality($quality) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z���))1tests/126_Imagick_getImageChannelStats_basic.phptnu�[���--TEST--
Test Imagick, getImageChannelStatistics
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php


$imagick = new \Imagick();
$imagick->newPseudoImage(640, 480, "magick:logo");
$identifyInfo = $imagick->getImageChannelStatistics();

echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�k2;tests/328_Imagick_polaroidImageWithTextAndMethod_basic.phptnu�[���--TEST--
Test Imagick, polaroidWithTextAndMethod
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x700;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

require_once(dirname(__FILE__) . '/functions.inc');

function polaroidWithTextAndMethod() {
    $src1 = new \Imagick();
    $src1->newPseudoImage(640, 480, "magick:logo");

    $imagickDraw = new \ImagickDraw();
    $font = findDefaultFont();
    $imagickDraw->setFont($font);

    $src1->polaroidWithTextAndMethod(
        $imagickDraw,
        15,
        "Hello world!",
        Imagick::INTERPOLATE_SPLINE
    );

    $src1->setImageFormat('png');
    $bytes = $src1->getImagesBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

polaroidWithTextAndMethod() ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z`��tests/bug_73840.phptnu�[���--TEST--
ImagickPixel iterator
--SKIPIF--
<?php 
require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--XFAIL--
This needs a significant amount of work to fix. The issue is the iterator object is going out of scope and being freed, but the row object still has a reference to that pixel iterator,  internally in ImageMagick. We need to stop the pixeliterator being freed while the row is still active.
--FILE--
<?php

//$im = new Imagick();
//$im->newImage(1, 1, 'black');
//
//// This works fine
//$it = $im->getPixelIterator();
//$row = $it->getCurrentIteratorRow();
//$rgb = $row[0]->getColor();
//
//$expected = array (
//  "r" => 0,
//  "g" => 0,
//  "b" => 0,
//  "a" => 1,
//);
//
//if ($rgb !== $expected) {
//	echo "values are incorrect:\n";
//	var_dump($rgb);
//}
//
//// This crashes with SIGABRT
//$row = $im->getPixelIterator()->getCurrentIteratorRow();
//$rgb = $row[0]->getColor();
//
//if ($rgb !== $expected) {
//    echo "values are incorrect:\n";
//    var_dump($rgb);
//}

echo "Not ok";

?>
--EXPECTF--
Not okPKr9�Z�
vtests/bug64015.phptnu�[���--TEST--
Test PHP bug #64015
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php
$im = new Imagick(dirname(__FILE__) . '/php.gif');
var_dump($im->getImageLength());

// Both should return filesize in bytes.

var_dump($im->getImageLength());
var_dump($im->getImageSize());

// All cases below now return 0;
$cloned_im = clone $im;
var_dump($im->getImageLength());
var_dump($im->getImageSize());
echo "OK" , PHP_EOL;


?>
--EXPECTF--
int(2523)
int(2523)
int(2523)
int(2523)
int(2523)
OKPKr9�Z����tests/019-readimages.phptnu�[���--TEST--
Imagick::readImages
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

try {
	$imagick = new Imagick(array (
							'magick:rose',
							'magick:rose',
							'fail_this_does_not_exist.jpg',
							'magick:rose',
	));
	echo 'Fail'. PHP_EOL;
} catch (ImagickException $e) {
	echo 'OK construct exception' . PHP_EOL;
}

$imagick = new Imagick();
$imagick = new Imagick(array (
						'magick:rose',
						'magick:rose',
						'magick:rose',
));
echo 'OK construct' . PHP_EOL;
$imagick->readImages (array (
						'magick:rose',
						'magick:rose',
						'magick:rose',
));
echo 'OK readImages' . PHP_EOL;
try{
	$imagick->readImages (array (
							'magick:rose',
							'fail_this_does_not_exist.jpg',
	));	
	echo 'Fail' . PHP_EOL;
} catch (ImagickException $e) {
	echo 'OK readImages exception'. PHP_EOL;
}

?>
--EXPECT--
OK construct exception
OK construct
OK readImages
OK readImages exceptionPKr9�Z�%88#tests/281_ini_settings_default.phptnu�[���--TEST--
OpenMP segfault hacks
--SKIPIF--
<?php 


require_once(dirname(__FILE__) . '/skipif.inc');
 
?>
--FILE--
<?php


$sleepCount = ini_get('imagick.shutdown_sleep_count');
$setSingleThread = ini_get('imagick.set_single_thread');

if ($sleepCount != 10) {
    echo "imagick.shutdown_sleep_count is not set to 10 but instead " . var_export($sleepCount, true) ."\n";
}

if ($setSingleThread != 1) {
    echo "imagick.set_single_thread setting is not true but instead " . var_export($setSingleThread, true) ."\n";
}


echo "Complete".PHP_EOL;
?>
--EXPECTF--
Complete
PKr9�Z�=���'tests/077_Imagick_frameImage_basic.phptnu�[���--TEST--
Test Imagick, frameImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

//$color = 'rgb(127, 127, 127)';

$color = 'rgba(255,0,255,50)';
//$color = 'rgb(255,0,255)';
$width = 40;
$height = 40;
$innerBevel = 10;
$outerBevel = 10;

function frameImage($color, $width, $height, $innerBevel, $outerBevel) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->setImageFormat('png');

    $width = $width + $innerBevel + $outerBevel;
    $height = $height + $innerBevel + $outerBevel;

    $imagick->frameimage(
        $color,
        $width,
        $height,
        $innerBevel,
        $outerBevel
    );
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) {
        echo "Failed to generate image.";
    }
    return $imagick;
}

$imagick = frameImage($color, $width, $height, $innerBevel, $outerBevel) ;
// $imagick->writeImage("frame_image.png");

echo "Ok";
?>
--EXPECTF--
OkPKr9�Zg�>r��-tests/210_ImagickDraw_setFontStyle_basic.phptnu�[���--TEST--
Test ImagickDraw, setFontStyle
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

require_once(dirname(__FILE__) . '/functions.inc');

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setFontStyle($fillColor, $strokeColor, $backgroundColor) {
    $draw = new \ImagickDraw();
    setFontForImagickDraw($draw);

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(1);
    $draw->setFontSize(36);
    $draw->setFontStyle(\Imagick::STYLE_NORMAL);
    $draw->annotation(50, 50, "Lorem Ipsum!");

    $draw->setFontStyle(\Imagick::STYLE_ITALIC);
    $draw->annotation(50, 100, "Lorem Ipsum!");

    $draw->setFontStyle(\Imagick::STYLE_OBLIQUE);
    $draw->annotation(50, 150, "Lorem Ipsum!");

    $imagick = new \Imagick();
    $imagick->newImage(350, 300, $backgroundColor);
    $imagick->setImageFormat("png");
    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setFontStyle($fillColor, $strokeColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z��^��+tests/036_Imagick_blueShiftImage_basic.phptnu�[���--TEST--
Test Imagick, blueShiftImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$blueShift = 1.5;

function blueShiftImage($blueShift) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->blueShiftImage($blueShift);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

blueShiftImage($blueShift) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z/�'
��0tests/257_Imagick_setImageChannelMask_basic.phptnu�[���--TEST--
Test Imagick, Imagick::exportImagePixels
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x700;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$imagick = new \Imagick();
$imagick->newPseudoImage(256, 256, "gradient:black-white");

$initialMask = $imagick->setImageChannelMask(\Imagick::CHANNEL_RED);
$imagick->brightnessContrastImage(-20, 20);
$imagick->setImageFormat("png");
$imagick->writeImage(__DIR__ . "/maskTest.png");

$redMask = $imagick->setImageChannelMask(\Imagick::CHANNEL_DEFAULT);

if ($initialMask != \Imagick::CHANNEL_DEFAULT) {
	echo "initialMask is not equal to \Imagick::CHANNEL_DEFAULT but instead is $initialMask\n";
}

if ($redMask != \Imagick::CHANNEL_RED) {
	echo "redMask is not equal to \Imagick::CHANNEL_RED but instead is $redMask\n";
}

echo "Ok";
?>
--CLEAN--
<?php
$f = __DIR__ . '/maskTest.png';
if (file_exists($f)) {
    unlink($f);
}
?>
--EXPECTF--
Ok
PKr9�ZV����'tests/152_Imagick_swirlImage_basic.phptnu�[���--TEST--
Test Imagick, swirlImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$swirl = 100;

function swirlImage($swirl) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->swirlImage($swirl);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

swirlImage($swirl) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z_
��-tests/277_Imagick_colorDecisionListImage.phptnu�[���--TEST--
Test Imagick::colorDecisionListImage
--SKIPIF--
<?php

$imageMagickRequiredVersion = 0x676;

require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('colorDecisionListImage'));

?>
--FILE--
<?php

$im = new Imagick("magick:logo");

$ccc = <<< CCC
<ColorCorrectionCollection xmlns="urn:ASC:CDL:v1.2">
    <ColorCorrection id="cc03345">
          <SOPNode>
               <Slope> 0.9 1.2 0.5 </Slope>
               <Offset> 0.4 -0.5 0.6 </Offset>
               <Power> 1.0 0.8 1.5 </Power>
          </SOPNode>
          <SATNode>
               <Saturation> 0.85 </Saturation>
          </SATNode>
    </ColorCorrection>
</ColorCorrectionCollection>
CCC;

$im->colorDecisionListImage($ccc);

echo "Ok"
?>
--EXPECT--
OkPKr9�Zj���/tests/056_Imagick_distortImage_Perspective.phptnu�[���--TEST--
Test Imagick, distortImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
checkFormatPresent('png');
?>
--FILE--
<?php

$distortion = 1;

        //$imagick = new \Imagick(realpath($this->rsiControl->getImagePath()));
        $imagick = new \Imagick();

        /* Create new checkerboard pattern */
        $imagick->newPseudoImage(100, 100, "pattern:checkerboard");

        /* Set the image format to png */
        $imagick->setImageFormat('png');

        /* Fill new visible areas with transparent */
        $imagick->setImageVirtualPixelMethod(\Imagick::VIRTUALPIXELMETHOD_TRANSPARENT);

        /* Activate matte */
        $imagick->setImageMatte(true);

        /* Control points for the distortion */
        $controlPoints = array( 10, 10,
            10, 5,

            10, $imagick->getImageHeight() - 20,
            10, $imagick->getImageHeight() - 5,

            $imagick->getImageWidth() - 10, 10,
            $imagick->getImageWidth() - 10, 20,

            $imagick->getImageWidth() - 10, $imagick->getImageHeight() - 10,
            $imagick->getImageWidth() - 10, $imagick->getImageHeight() - 30);

        /* Perform the distortion */
        $imagick->distortImage(\Imagick::DISTORTION_PERSPECTIVE, $controlPoints, true);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 

echo "Ok";
?>
--EXPECTF--
OkPKr9�ZmDD+��tests/016-static-methods.phptnu�[���--TEST--
Test static methods
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

echo gettype (Imagick::queryFormats ()) . PHP_EOL;

$im = new Imagick ();
echo gettype ($im->queryFormats ()) . PHP_EOL;

echo gettype (Imagick::queryFonts ()) . PHP_EOL;
echo gettype ($im->queryFonts ()) . PHP_EOL;

echo 'success';

?>
--EXPECT--
array
array
array
array
successPKr9�ZJ���ll1tests/062_Imagick_distortImage_BarrelInverse.phptnu�[���--TEST--
Test Imagick, distortImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$distortion = 1;

//  Rsrc = r / ( A*r3 + B*r2 + C*r + D )
// This equation does NOT produce the 'reverse' the 'Barrel' distortion.
// You can NOT use it to 'undo' the previous distortion.

        $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");

        $points = array(
            //0.2, 0.0, 0.0, 1.0
            0.2, 0.1, 0.0, 1.0
        );

        $imagick->setimagebackgroundcolor("#fad888");
        $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_EDGE);
        $imagick->distortImage(\Imagick::DISTORTION_BARRELINVERSE, $points, TRUE);
    $bytes = $imagick;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 

echo "Ok";
?>
--EXPECTF--
OkPKr9�Z����RR+tests/169_ImagickPixel_construct_basic.phptnu�[���--TEST--
Test ImagickPixel, construct
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php


function construct() {

    $columns = 4;
    
    $exampleColors = array(
        "rgba(100%, 0%, 0%, 0.5)",
        "hsb(33.3333%, 100%,  75%)", // medium green
        "hsl(120, 255,   191.25)", //medium green
        "graya(50%, 0.5)", //  semi-transparent mid gray
        "LightCoral", "none", //"cmyk(0.9, 0.48, 0.83, 0.50)",
        "#f00", //  #rgb
        "#ff0000", //  #rrggbb
        "#ff0000ff", //  #rrggbbaa
        "#ffff00000000", //  #rrrrggggbbbb
        "#ffff00000000ffff", //  #rrrrggggbbbbaaaa
        "rgb(255, 0, 0)", //  an integer in the range 0—255 for each component
        "rgb(100.0%, 0.0%, 0.0%)", //  a float in the range 0—100% for each component
        "rgb(255, 0, 0)", //  range 0 - 255
        "rgba(255, 0, 0, 1.0)", //  the same, with an explicit alpha value
        "rgb(100%, 0%, 0%)", //  range 0.0% - 100.0%
        "rgba(100%, 0%, 0%, 1.0)", //  the same, with an explicit alpha value
    );

    $draw = new \ImagickDraw();
    $count = 0;
    $black = new \ImagickPixel('rgb(0, 0, 0)');

    foreach ($exampleColors as $exampleColor) {
        $color = new \ImagickPixel($exampleColor);

        $draw->setstrokewidth(1.0);
        $draw->setStrokeColor($black);
        $draw->setFillColor($color);
        $offsetX = ($count % $columns) * 50 + 5;
        $offsetY = intval($count / $columns) * 50 + 5;
        $draw->rectangle(0 + $offsetX, 0 + $offsetY, 40 + $offsetX, 40 + $offsetY);
        $count++;
    }

    $image = new \Imagick();
    $image->newImage(350, 350, "blue");
    $image->setImageFormat("png");
    $image->drawImage($draw);
    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

construct() ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Zj�;`��0tests/244_Tutorial_psychedelicFontGif_basic.phptnu�[���--TEST--
Test Tutorial, psychedelicFontGif
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

require_once(dirname(__FILE__) . '/functions.inc');

function psychedelicFontGif($name = 'Danack') {

    set_time_limit(3000);

    $aniGif = new \Imagick();
    $aniGif->setFormat("gif");

    $maxFrames = 11;
    $scale = 0.25;

    for ($frame = 0; $frame < $maxFrames; $frame++) {

        $draw = new \ImagickDraw();
        setFontForImagickDraw($draw);

        $draw->setStrokeOpacity(1);
        $draw->setfontsize(150 * $scale);

        for ($strokeWidth = 25; $strokeWidth > 0; $strokeWidth--) {
            $hue = intval(fmod(($frame * 360 / $maxFrames) + 170 + $strokeWidth * 360 / 25, 360));
            $color = "hsl($hue, 255, 128)";
            $draw->setStrokeColor($color);
            $draw->setFillColor($color);
            $draw->setStrokeWidth($strokeWidth * 3 * $scale);
            $draw->annotation((int)(60 * $scale), (int)(165 * $scale), $name);
        }

        $draw->setStrokeColor('none');
        $draw->setFillColor('black');
        $draw->setStrokeWidth(0);
        $draw->annotation(60 * $scale, 165 * $scale, $name);

        //Create an image object which the draw commands can be rendered into
        $imagick = new \Imagick();
        $imagick->newImage((int)(650 * $scale), (int)(230 * $scale), "#eee");
        $imagick->setImageFormat("png");

        //Render the draw commands in the ImagickDraw object
        //into the image.
        $imagick->drawImage($draw);

        $imagick->setImageDelay(5);
        $aniGif->addImage($imagick);

        $imagick->destroy();
    }

    $aniGif->setImageIterations(0); //loop forever
    $aniGif->deconstructImages();

    $bytes = $aniGif->getImagesBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

psychedelicFontGif($name = 'Danack') ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Ze����/tests/267_ImagickDraw_getBorderColor_basic.phptnu�[���--TEST--
Test ImagickDraw, getBorderColor
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('ImagickDraw', array('getBorderColor', 'setBorderColor'));
?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';



$draw = new \ImagickDraw();

$draw->setStrokeColor($strokeColor);
$draw->setFillColor($fillColor);

$draw->setStrokeWidth(2);
$draw->setFontSize(72);

$opacityToSet = 0.1;

$borderColor = $draw->getBorderColor();
//var_dump($borderColor->getColor());

$draw->setBorderColor("red");
$borderColor = $draw->getBorderColor();

$borderColorElements = $borderColor->getColor();
if ($borderColorElements["r"] != 255 ||
	$borderColorElements["g"] != 0 ||
	$borderColorElements["b"] != 0) {
	echo "Wrong colors after set.";
}

$draw->line(125, 70, 100, 50);
$draw->line(350, 170, 100, 150);

$imagick = new \Imagick();
$imagick->newImage(500, 500, $backgroundColor);
$imagick->setImageFormat("png");
$imagick->drawImage($draw);




$bytes = $imagick->getImageBlob();
if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 



echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�����tests/011_polygon.phptnu�[���--TEST--
Test polygon method arguments
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$im = new Imagick();
$draw = new ImagickDraw();

try {
	$draw->polygon(array( 
					array('x' => 1, 'y' => 2),
					array('x' => 'hello', 'y' => array())
			 		));

	echo "pass\n";

} catch (Exception $e) {
	echo "fail\n";
}

try {
	$draw->polygon(array(array()));
	echo "fail\n";
} catch (ImagickDrawException $e) {
	echo "pass\n";
}

?>
--EXPECTF--
pass
passPKr9�Z�5
��9tests/086_Imagick_forwardFourierTransformImage_basic.phptnu�[���--TEST--
Test Imagick, forwardFourierTransformImage
--SKIPIF--
<?php 
require_once(dirname(__FILE__) . '/skipif.inc');
require_once(dirname(__FILE__) . '/skipprobefourier.inc');
?>
--FILE--
<?php


//Utility function for forwardTransformImage
function createMask() {
    $draw = new \ImagickDraw();

    $draw->setStrokeOpacity(0);
    $draw->setStrokeColor('rgb(255, 255, 255)');
    $draw->setFillColor('rgb(255, 255, 255)');

    //Draw a circle on the y-axis, with it's centre
    //at x, y that touches the origin
    $draw->circle(250, 250, 220, 250);

    $imagick = new \Imagick();
    $imagick->newImage(512, 512, "black");
    $imagick->drawImage($draw);
    $imagick->gaussianBlurImage(20, 20);
    $imagick->autoLevelImage();

    return $imagick;
}


function forwardFourierTransformImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->resizeimage(512, 512, \Imagick::FILTER_LANCZOS, 1);

    $mask = createMask();
    $imagick->forwardFourierTransformImage(true);

    $imagick->setIteratorIndex(0);
    $magnitude = $imagick->getimage();

    $imagick->setIteratorIndex(1);
    $imagickPhase = $imagick->getimage();

    if (true) {
        $imagickPhase->compositeImage($mask, \Imagick::COMPOSITE_MULTIPLY, 0, 0);
    }

    if (false) {
        $output = clone $imagickPhase;
        $output->setimageformat('png');
    $bytes = $output->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
    }

    $magnitude->inverseFourierTransformImage($imagickPhase, true);

    $magnitude->setimageformat('png');
    $bytes = $magnitude->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

forwardFourierTransformImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z{�u&&7tests/122_Imagick_setImageCompressionQuality_basic.phptnu�[���--TEST--
Test Imagick, setImageCompressionQuality
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$quality = 15;

function setImageCompressionQuality($quality) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    //$imagick->setImageCompressionQuality($quality);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setImageCompressionQuality($quality) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z���""2tests/160_Imagick_transparentPaintImage_basic.phptnu�[���--TEST--
Test Imagick, transparentPaintImage
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$color = 'rgb(39, 194, 255)';
$alpha = 0;
$fuzz = 0.1;

function transparentPaintImage($color, $alpha, $fuzz) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");

    //Need to be in a format that supports transparency
    $imagick->setimageformat('png');

    $imagick->transparentPaintImage(
        $color, $alpha, $fuzz * \Imagick::getQuantum(), false
    );

    //Not required, but helps tidy up left over pixels
    $imagick->despeckleimage();

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

transparentPaintImage($color, $alpha, $fuzz) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Zz�"tests/150_Imagick_setregistry.phptnu�[���--TEST--
Test Imagick, setRegistry and getRegistry
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

require_once(dirname(__FILE__) . '/functions.inc');

$tmpPath = Imagick::getRegistry("temporary-path");
if ($tmpPath == null) {
	//I am unsure if this is guaranteed - it might be set via policy.xml
	echo "Temporary-path was empty at start.".PHP_EOL;
}

$currentPath = realpath(dirname(__FILE__));

Imagick::setRegistry("temporary-path", $currentPath);

$tmpPath = Imagick::getRegistry("temporary-path");
if ($tmpPath === false) {
	echo "Failed to set temporary-path".PHP_EOL;
}
else if ($tmpPath == $currentPath) {
	echo "Temporary path was set correctly.".PHP_EOL;
}

$registry = Imagick::listRegistry();

if (array_key_exists("temporary-path", $registry) == true) {

	if ($registry["temporary-path"] === $currentPath) {
		echo "Temporary path was listed correctly.".PHP_EOL;
	}
}

// Since 6.9.9-26, no exception raised
$exceptionExpected = true;

if (isVersionGreaterEqual('6.9.9-26', '7.0.7-15')) {
    $exceptionExpected = false;
}

try {
	$tmpPath = Imagick::getRegistry("non-existent string");

	if ($exceptionExpected === true) {
		echo "Expected exception not thrown.\n";
	}
	else {
		echo "This is fine.";
	}
}
catch (\ImagickException $ie) {
	if ($exceptionExpected === true) {
		echo "This is fine.";
	}
	else {
		echo "Unexpected exception" . $ie->getMessage() . "\n";
	}
}


?>
--EXPECTF--
Temporary-path was empty at start.
Temporary path was set correctly.
Temporary path was listed correctly.
This is fine.
PKr9�Z�l�η�*tests/194_ImagickDraw_rectangle_basic.phptnu�[���--TEST--
Test ImagickDraw, rectangle
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function rectangle($strokeColor, $fillColor, $backgroundColor) {
    $draw = new \ImagickDraw();
    $strokeColor = new \ImagickPixel($strokeColor);
    $fillColor = new \ImagickPixel($fillColor);

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeOpacity(1);
    $draw->setStrokeWidth(2);

    $draw->rectangle(200, 200, 300, 300);
    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");

    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

rectangle($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z��1���/tests/115_Imagick_selectiveBlurImage_basic.phptnu�[���--TEST--
Test Imagick, selectiveBlurImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$radius = 5;
$sigma = 1;
$threshold = 0.5;
$channel = Imagick::CHANNEL_DEFAULT;

function selectiveBlurImage($radius, $sigma, $threshold, $channel) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->selectiveBlurImage($radius, $sigma, $threshold, $channel);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

selectiveBlurImage($radius, $sigma, $threshold, $channel) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�����1tests/223_ImagickDraw_setTextAntialias_basic.phptnu�[���--TEST--
Test ImagickDraw, setTextAntialias
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

require_once(dirname(__FILE__) . '/functions.inc');

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setTextAntialias($fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();
    setFontForImagickDraw($draw);
    $draw->setStrokeColor('none');
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(1);
    $draw->setFontSize(32);
    $draw->setTextAntialias(false);
    $draw->annotation(5, 30, "Lorem Ipsum!");
    $draw->setTextAntialias(true);
    $draw->annotation(5, 65, "Lorem Ipsum!");

    $imagick = new \Imagick();
    $imagick->newImage(220, 80, $backgroundColor);
    $imagick->setImageFormat("png");
    $imagick->drawImage($draw);

    //Scale the image so that people can see the aliasing.
    $imagick->scaleImage(220 * 6, 80 * 6);
    $imagick->cropImage(640, 480, 0, 0);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setTextAntialias($fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�����&tests/071_Imagick_flipImage_basic.phptnu�[���--TEST--
Test Imagick, flipImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function flipImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->flipImage();
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

flipImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z��M66.tests/089_Imagick_medianFilterImage_basic.phptnu�[���--TEST--
Test Imagick, medianFilterImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('medianFilterImage'));
?>
--FILE--
<?php

$radius = 5;

function medianFilterImage($radius) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    @$imagick->medianFilterImage($radius);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

medianFilterImage($radius) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Za����/tests/091_Imagick_linearStretchImage_basic.phptnu�[���--TEST--
Test Imagick, linearStretchImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$blackThreshold = 0.2;
$whiteThreshold = 0.2;

function linearStretchImage($blackThreshold, $whiteThreshold) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $pixels = $imagick->getImageWidth() * $imagick->getImageHeight();
    $imagick->linearStretchImage($blackThreshold * $pixels, $whiteThreshold * $pixels);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

linearStretchImage($blackThreshold, $whiteThreshold) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z� F,tests/304_Imagick_is_imagemagick_borked.phptnu�[���--TEST--
Test whether ImageMagick is producing valid images.
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
//checkClassMethods('Imagick', array('averageImages'));
?>
--FILE--
<?php

function testOpacity() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:LOGO");

    $transparency = new Imagick();
    $transparency->newPseudoImage(640, 480, "xc:rgba(0,0,0,0)");

    $draw = new \ImagickDraw();
    $draw->setFillColor('white');
    $draw->setStrokeColor('white');

    $draw->circle(
        320,
        240,
        500,
        240
    );

    $transparency->drawImage($draw);

    $transparency->blurImage(50, 15);
    $transparency->writeImage(__DIR__ . "/304_output_trans.png");

    $checkerboard = new Imagick();
    $checkerboard->newPseudoImage(640, 480, "pattern:checkerboard");
    $checkerboard->setImageFormat('png');

    $output = clone $checkerboard;
    $canvas = clone $imagick;
    $canvas->compositeImage($transparency, \Imagick::COMPOSITE_COPYOPACITY, 0, 0);
    $output->compositeImage($canvas, \Imagick::COMPOSITE_ATOP, 0, 0);
    $output->writeImage(__DIR__ . "/304_output_before_softlight.png");

    $output = clone $checkerboard;
    $gradient = new Imagick();
    $gradient->newPseudoImage(640, 480, 'gradient:#979797-#373737');
    $canvas->compositeImage($gradient, Imagick::COMPOSITE_SOFTLIGHT, 0, 0);

    $output->compositeImage($canvas, \Imagick::COMPOSITE_ATOP, 0, 0);
    // TODO - we need to store a known good output and compare
    // the result image against that.
//    $output->writeImage(__DIR__ . "/304_output_with_softlight.png");
}

testOpacity() ;
echo "Ok";
?>
--CLEAN--
<?php
@unlink(__DIR__ . "/304_output_trans.png");
@unlink(__DIR__ . "/304_output_before_softlight.png");
?>
--EXPECTF--
Ok
PKr9�Z�e!�"tests/298_Imagick_kmeansImage.phptnu�[���--TEST--
Test Imagick, kmeansImage
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('kmeansImage'));
?>
--FILE--
<?php


function kmeansImage() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');
    $imagick->kmeansImage(
		128,
		10,
		5
	);

    $imagick->writeImage(__DIR__ . '/kmeansImage_output_image.png');
//    $imagick->getImageBlob();
}

kmeansImage() ;
echo "Ok";
?>
--CLEAN--
<?php
@unlink(__DIR__ . '/kmeansImage_output_image.png');
?>
--EXPECTF--
Ok
PKr9�ZEN��..(tests/096_Imagick_negateImage_basic.phptnu�[���--TEST--
Test Imagick, negateImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$grayOnly = 0;
$channel = Imagick::CHANNEL_DEFAULT;

function negateImage($grayOnly, $channel) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->negateImage($grayOnly, $channel);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

negateImage($grayOnly, $channel) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z��d��8tests/055_Imagick_distortImage_ScaleRotateTransform.phptnu�[���--TEST--
Test Imagick, distortImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$distortion = 1;

        $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
        $points = array(
            1.5, # scale 150%
            150 # rotate
        );
        $imagick->setimagebackgroundcolor("#fad888");
        $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_BACKGROUND );
        $imagick->distortImage( \Imagick::DISTORTION_SCALEROTATETRANSLATE, $points, TRUE );
    $bytes = $imagick;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 

echo "Ok";
?>
--EXPECTF--
OkPKr9�Z��ULLtests/020-pixeliterator.phptnu�[���--TEST--
Pixel Iterator tests
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

function count_rows ($pix)
{
	$rows = 0;

	foreach ($pix as $r)
		$rows++;

	return $rows;
}

function count_objects ($pix)
{
	$objects = 0;

	foreach ($pix as $r)
		foreach ($r as $o)
			$objects++;

	return $objects;
}

function count_objects_with_iterator ($pixelRegion)
{
	$objects = 0;
	$row = 0;

	$pixelRegion->rewind();
	$pixelRegion->resetIterator();

	while($pixelRow = $pixelRegion->current()) {
		$row++;
		foreach ($pixelRow as $pixel) {
			$objects++;
		}

		$pixelRegion->syncIterator();
		$pixelRegion->next();
		if (!$pixelRegion->valid()) {
			break;
		}
	}

	return $objects;
}

$im = new Imagick ('magick:rose');
$it1 = new ImagickPixelIterator ($im);
$it2 = ImagickPixelIterator::getPixelIterator ($im);
$it3 = $im->getPixelIterator();


$count1 = count_rows ($it1);
$count2 = count_rows ($it2);
$count3 = count_rows ($it3);

if ($count1 != $count2 || 
    $count1 != $count3) {
    printf(
        "Row counts do not match %d %d %d",
        $count1,
        $count2,
        $count3
    );
}

if ($count1 != $count2 || 
    $count1 != $count3) {
    printf(
        "Object counts do not match %d %d %d",
        $count1,
        $count2,
        $count3
    );
}

$objects = array($it1, $it2, $it3);

foreach ($objects as $object) {
	$loop = 0;
	$count = count_objects($object);
	$countIterator = count_objects_with_iterator($object);
	if ($countIterator != $count) {
    	echo "Counting with iterator doesn't match counting with foreach $loop, $count != $countIterator.";
    	$loop++;
	}
}


$it1->newPixelIterator (new Imagick ('magick:rose'));

echo 'done' . PHP_EOL;
?>
--EXPECTF--

%s: ImagickPixelIterator::newPixelIterator is deprecated. ImagickPixelIterator::getPixelIterator should be used instead in %s on line %d
donePKr9�ZU��+tests/157_Imagick_thumbnailImage_basic.phptnu�[���--TEST--
Test Imagick, thumbnailImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function thumbnailImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->setbackgroundcolor('rgb(64, 64, 64)');
    $imagick->thumbnailImage(100, 100, true, true);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

thumbnailImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z؅,���/tests/215_ImagickDraw_setStrokeColor_basic.phptnu�[���--TEST--
Test ImagickDraw, setStrokeColor
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setStrokeColor($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);

    $draw->setStrokeWidth(5);

    $draw->line(100, 100, 400, 145);
    $draw->rectangle(100, 200, 225, 350);

    $draw->setStrokeOpacity(0.1);
    $draw->line(100, 120, 400, 165);
    $draw->rectangle(275, 200, 400, 350);

    $image = new \Imagick();
    $image->newImage(500, 400, $backgroundColor);
    $image->setImageFormat("png");

    $image->drawImage($draw);

    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setStrokeColor($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�P�h�h�tests/anonymous_pro_minus.ttfnu�[���LTSHj*p��tOS/2Jb���`VDMXj�r<	P�cmap�L��cvt �
�!.fpgm�A��agasp	�Xglyfe�G& I|hdmxydM�0	�head���6hhea
g�T$hmtx4j5���locaq>"<!<�maxp�ax name�l��o�Y�postZ`�v�Tprep0��h `��$6�_<��E��o�[�u{>	���^�^��{paX
�^��3%�3�{�	��p��mlss@�����u �� ^1���u��#�u)��
��1����u�������1��111��1���1111��1��11������1u���1�������1�1�1��1��1�����/���������11��1������������1������1111�1�1���������1��+��������/������������7�������H�u.���1��11���������111��N��u�����u�7���������b��1���1���������������1����1��1��1��1��1����������11�w�wNN���������1111�1�1�1��^�11111111�������111��������111111111111������1/1/1/������������_�_�[�[�[��11��111���1��11��11+����1����1')�1��1��1��1��1���1��1��1�w1�������u1�w1��1��1111��111��11��11������111��1��11����111��11��11����111#1���1�����u1��1��111111��1�111��������������D��J���H�������������������HJ
J��p

















����	��
	��	��
��
����
���������������������������������� ��!��"��#��$��%��& ��' ��(!��)"��*#��+$��,$��-%��.&��/'��0(��1)��2)��3*��4+��5,��6-��7-��8.��9/��:0��;1��<2��=2��>3��?4��@5��A6��B6��C7��D8��E9��F:��G;��H;��I<��J=��K>��L?��M?��N@��OA��PB��QC��RD��SD��TE��UF��VG��WH��XH��YI��ZJ��[K��\L��]M��^M��_N��`O��aP��bQ��cQ��dR��eS��fT��gU��hV��iV��jW��kX��lY��mZ��nZ��o[��p\��q]��r^��s_��t_��u`��va��wb��xc��yc��zd��{e��|f��}g��~h��h���i���j���k���l���l���m���n���o���p���q���q���r���s���t���u���u���v���w���x���y���z���z���{���|���}���~���~�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������t

����2
"~�01QSwx�������������O\_�AWak��    " & 0 : D �!!"!&"""""""+"H"`"e###&#}#�#�$#%%%%%%%%$%,%4%<%l%�%�'������
 #�12RTxy�������������Q^�
@V`j��      & 0 9 D �!!"!&"""""""+"H"`"d###$#}#�#�$#%%%%%%%%$%,%4%<%P%�%�'��������������\��A���s�[������������������������������<����v���h�wޔޠމމ�r�o�]�-�.�0��޻ޱ�l��<�;�2�/�,�)�&����
�ܞ���R"f
���Z\8<@D2���������������������������������������`a�b�c�������d����e�����f���hgikjl�monpqsrtu�vxwy{z��}|~�������������0����������2�n
��	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_���������P��l���������Q��m�������������������������������������`a�b�c�������d����e�����f���hgikjl�monpqsrtu�vxwy{z��}|~����,K�	PX��Y����D�	_^-�,  EiD�`-�,�*!-�, F�%FRX#Y � �Id� F had�%F hadRX#e�Y/ �SXi �TX!�@Yi �TX!�@eYY:-�, F�%FRX#�Y F jad�%F jadRX#�Y/�-�,K �&PXQX��D�@DY!! E��PX��D!YY-�,  EiD�`  E}iD�`-�,�*-�,K �&SX�@�Y�� �&SX#!�����#Y �&SX#!�����#Y �&SX#!����#Y �&SX#!�@���#Y �&SX�%E��PX#!��#!�%E#!#!Y!YD-�	,KSXED!!Y-�+�+�+�B?0%+�	S?=%+�
gR=/+�L?0%+�S?0%+�
aR=%+�!	+�S?=%+�gR=/+�M?0%+�L?0%+�B?0%+�aR=%+�S?0%+�+� E}iD*oZy{�u��oZ{�u\���8888�x�Xp��H|������6�8���	�
�
�
�
�,���
z$�����X��V`6�n�"P�b���8J^$�x&��>��H�N�� X �!z!�"P"~"�#2#j#�$$ $z$�$�%0%�%�&&&&$&0&<&H&T&`''&'2'>'J'V'b'n'z'�'�'�'�'�'�'�'�'�'�((�))�*R*|*�+�,|-B-�-�-�.&.x/V/�00$0F0�11�1�2@2�2�3�4B4�5�6�7&7Z7r7�88P8v8�8�8�8�9999�:p:�:�:�;R;�;�;�<< <,<F<�<�==�>>h>z>�?@J@V@b@n@z@�@�@�@�@�@�@�A&A2A>AJAVA�A�A�A�A�BBfB�B�B�B�CCDC\C�DD"D~D�E*E�FPG*G�G�G�H2H�H�I�I�I�I�I�J0K
KK"K.K:KFKRK^KjKvL$L,L�L�M
MM"M.M:M�NHNTN`NlNxN�N�N�N�N�O�O�O�PP�P�P�P�P�P�P�QJQ�Q�R4R�R�SS&S2SrS~S�S�S�S�S�S�S�TTxT�T�T�T�T�T�T�U$U�U�U�U�U�U�U�U�VVVV*V6VBVNVZVfW W�W�W�W�W�XXXzYYYY$Y0Y<YHYTY`YlYxZZ�Z�Z�Z�Z�Z�Z�Z�Z�Z�Z�[n[z[�[�[�[�[�[�[�[�\\&\2\>\J\V\b\n\z\�].]T]z]�]�^B^�_,_l_�_�`4`�aDa|a�bbrb�cXc�dd*d6dBdNdZdfdree�f(gg�h(h�i4i�i�jj�j�k�l4l�mnnnbn�ozo�pp�p�p�p�p�qqq�q�rbs"sVsbs�t>t�u2u>uJu�u�v"v�v�wwVw�x�x�x�yy�y�z z�{{b||`|�}@}�}�~@~�~�L�����Z�Ђ��n��(�z��X���F�R�����L���@�x�&�̊ �X�6����0���ލ>����z������"�.���T������t��r�~���̔�4�@�L�X�d�p�|�����������ĔДܔ�����$�0�<�N���B�R������B�Ι�8�J�d�������ҙ���B�`�������X���Ȝ�>�p���؝�8�h���؞$�T���ڟ�H������$�`����0�J���¢�f���̣�<���1sE�/�	/�ܰ�а/�����EX�/�>Y�EX�/�>Y����01!!!!!s��B�G/���\/���� /�!/�ܱ
� �а/�
��а�а�а�а�а�а�а���EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�+�+��а�а�
а�а�а�а�а��01%##5!#5#53#5353!533#3!!��u�u����uu����������nm����m�����F��+2;��3+�$,+�)+��	а�а)�а$�а/��,�,]@	,,),9,I,Y,i,y,�,�,�,�,�,
]�,�а/�)� а)�/�@33&363F3V3f3v3�3�3�3�3�3
]��3�3]��6а$�=��/�*/�/*9�6*901.'7.54>753&&'#4&'66�T�d@��tT�\/1Z�T�K\8�
h`��1^�V�amjta��sb7R3
?_zD!e�ATmI@p[9
��
Dbw=X��)C��Dx_A�Vy/�"}�Mg'�+9B����7+7CE�2

+�	,+�	8+@&6FVfv�����
]���]�",9�"/��"�"]@	"")"9"I"Y"i"y"�"�"�"�"�"
]@f2v2�2�2�2�2�2]@
22&262F2V2]��2�2]��8�8]@	88)898I8Y8i8y8�8�8�8�8�8
]�>	��E��/�/�EX�/�>Y�EX�/�>Y�';+�5+��/��/�/]@//(/8/H/X/h/x/�/�/�/�/�/
]��A�@AA'A7AGAWAgAwA�A�A�A�A�A
]��A�A]01#".54>32%'#".54>324&#"3264&#"326�'E\43\D&&D\34\E'��^Fy)D^34\C))C\43\F)��V@?VV?@V�X?@VV@?X13\D))D\33_C))C_���<��5ZF''D\54\C''C\@XX@?XX��@VV@?XX����/'2B�0+�;+@00&060F0V0f0v0�0�0�0�0�0
]��0�0]�09�/�3��;�;]@	;;);9;I;Y;i;y;�;�;�;�;�;
]�EX�/�>Y�EX�/�>Y�EX�	/�	>Y�(�@(('(7(G(W(g(w(�(�(�(�(�(
]��(�(]��>��>�>]@>>(>8>H>X>h>x>�>�>�>�>�>
]01'#".54>7&&54632667267'>54&#"�P;�^�J�iL�d</@%>D��DwX1>^w9h0=�!N�5��4?}V#93eM/hN+E25V�N�k�BT8`�L?iTCN�N��)LlFNnTD%��B�F�;1P-uV`�r/wK:AP5NZ#;NuD/�/�EX�/�>Y01#/+f)�+������>�
+@&6FVfv�����
]���]�
/�EX�/�>Y01.54667yk�p<<p�kH_�g55g�a��T������TZL���y{���L���>�
+���]@	)9IYiy�����
]�/�EX�/�>Y01'>54.'7�<s�kH_�i55i�_Hk�s<5�����TZL���yy��LZT��#��G�EX�/�>Y�EX�/�>Y�9�9�9�
9�
9�901%#'%%73%���V7��t��7V��7LtL���^�}��^��`���z�
��7�
+��а�	��/�EX�/�>Y�+��а��01!#!5!3!��ht�h�t���i�u��i�b��/�EX�/�>Y01%#b��`����/��	�+01!5!��\��uu/��/�EX�/�>Y01!#53/���)��J	�/�/01'��b���4����/%��&/�'/�&�а/��@&6FVfv�����
]���]�'�ܲ9����]@	)9IYiy�����
]�9�EX�/�>Y�EX�!/�!>Y�!9�����]@(8HXhx�����
]�!��@'7GWgw�����
]���]�!901&&#"324&'4>32#".h#c0�^��Rc�����8v����x66v����w5���Z`��}�+H�;����qq���qq���:�+����EX�/�>Y�EX�/�>Y��9�а�01!!53#52>533���NjD=�vN��u{)]M4�Lv�J�\
w/ r�/�+�	+�	�а/�	�
�	�"��EX�/�>Y�EX�
/�
>Y������]@(8HXhx�����
]01!3!5>54&#"#4632s1P=�9'u���'G8 �u����T�sB�6VXb?�3��y'NPV/x{���1\����/6Գ$%+�/+�/�	��$�а/���]@	)9IYiy�����
]�2%9�/�8��EX�*/�*>Y�EX�/�>Y�+���@'7GWgw�����
]���]�*�!��!�!]@!!(!8!H!X!h!x!�!�!�!�!�!
]�2901#".'732>54.#52>54&#"#4>32�Fu�T_�}N���;hN-3`�]Dd>�t���Bv�eT�m=�{FhF%hV�d84d�b��'H`;Pe9u5XDn���f�o;1\�Vo�
;[n�Q�
+�
�а���EX�/�>Y�EX�/�>Y�+����	а�а�
а�01!!53!533#3�����#������Iuw-��w�w��u���*��+/�,/�ܱ���]@	)9IYiy�����
]�+�а/��"в#9�EX�/�>Y�EX�/�>Y�&+���@'7GWgw�����
]���]��!�#901#".'732>54.#"#!!6632�H}�h^�yJ�4TrDP}X//V}LP�6�1�X<�Pe�zD�`�}H8h�bDuR/5_}GJ\5C@�u�h:?Aw������/"6߳
+�#+@&6FVfv�����
]���]��#�#]@	##)#9#I#Y#i#y#�#�#�#�#�#
]�
�-��EX�/�>Y�EX�/�>Y�(+�����]@(8HXhx�����
]�9��2�@22'272G2W2g2w2�2�2�2�2�2
]��2�2]01#".54>32&#">324.#"32>�G�e��s3E�ϋZZ�i�k5Nfw<f�{E�-T{MLZ1(T}VJ{Z1�l�yBq���n�PbP��x3ZA'E{�gJ�^62Z{KJ�d:1Z�1�K�/�/�ܱ��а/�

��EX�
/�
>Y�EX�/�>Y�EX�/�>Y���01
#67!#!�{�P�#X�t��ug��������B%
}�u�����/'3G1�>
+�(+��(�(]@	(()(9(I(Y(i(y(�(�(�(�(�(
]�4(9�4/��4�4]@	44)494I4Y4i4y4�4�4�4�4�4
]��
9@>>&>6>F>V>f>v>�>�>�>�>�>
]��>�>]�
>9�/�#
9�.��EX�/�>Y�EX�/�>Y�19+�919�#919��+��+�+]@(+8+H+X+h+x+�+�+�+�+�+]�++]��C�@CC'C7CGCWCgCwC�C�C�C�C�C
]��C�C]01#".54>7.54>324&#"3264.#"32>�J��bd��J'Ii?7V;!Fv�TT�vF!;X8@hJ)���������/7_xDDx_77_xDDx_7og�`..`�g5l]=<P^+X�X--X�X+^P<=]l)nngzz�	Ge??eGFfD!!Df����/#7�$+�
.+�
��@$$&$6$F$V$f$v$�$�$�$�$�$
]��$�$]��.�.]@	..).9.I.Y.i.y.�.�.�.�.�.
]�
�9��EX�/�>Y�EX�/�>Y�)+���@'7GWgw�����
]���]�9��3��3�3]@33(383H3X3h3x3�3�3�3�3�3
]014>32#"'732>5#".732>54.#"H�e��s3F�щZ-wEi�m5Lfy:f�{F�-T{MLZ1)S}VJ{Z1\m�yAq���o�P21P��y3ZB'F{�fJ�^51X}LJ�d91Z�u/�/�+��а���EX�/�>Y�EX�/�>Y01#53#53/�����\��b�*�+�EX�/�>Y�EX�/�>Y�901#53#/��3��`����/���	�/�/01%M�M�P-OP�P����+�+01!5!!5!��\��\�w��u�����	�/�/01'7�N��PN�O��P��/!��+�+��а/�����]@	)9IYiy�����
]��#��EX�/�>Y�EX�/�>Y�����]@(8HXhx�����
]01!#53#4>54&#"'6632/��^9VfV:�;ViV;lg?_A'{ð���DNubV\mENzk^\c9Xd)E`:�ª����/O`@�2	D+�X+�+�	&+��ж�&�&�&]��&�&]@
I&Y&i&y&�&�&]@		&&)&9&]@V2f2v2�2�2�2�2�2]@22&262F2]��2�2]��P�@XX&X6XFXVXfXvX]@�X�X�X�X�X]��X�X]�EX�K/�K>Y�EX�=/�=>Y�[+�S+��в=K9�S9�[�!а!/�K�-��-�-]@--(-8-H-X-h-x-�-�-�-�-�-
]�=�7�@77'777G7W7g7w7�7�7�7�7�7
]��7�7]01#".55#".54>325332>54.#"3267#".54>32%&&#"32>5�6ZC6*^>BX5"DeC#N�('>YuJq�]((]�pR�5;��\�oO22Op�[��x6��?&&7$94%<*�D�qH&3 K^:`z@J�g=#%5�� 6Sd/E�{iM+`��usӢ`:1D�3\~��WY��~[3o��1'-K_1mn-I[-���
0�EX�/�>Y�EX�/�>Y�EX�/�>Y�+01!#!#3�{��y���}��u������_1�$��!+�+��
��
9���]@	)9IYiy�����
]�!�а�&��EX�/�>Y�EX�/�>Y�+�
9����!�01#!!24.#!!2>4&#!!26���`�R�}N��:Zl2�8lV8-������u��J�j�JLaEX/�E1V��{�������/%�&/�'/�ܰа/�&�а/��
�а��@&6FVfv�����
]���]��%а%/�EX�/�>Y�EX�
/�
>Y�EX�/�>Y�
9�
����]�(]@8HXhx�����
]��#�@##'#7#G#W#g#w#�#�#�#�#�#
]��#�#]01#".54>3253#4.#"32�3谉�y55y��y�)uu5Z{Dj�T##T�j�`V��q���qVX��TE{Z3d��cbǟe'1�p�/�/�ܰ�а/��
��
�
]@	

)
9
I
Y
i
y
�
�
�
�
�

]����EX�/�>Y�EX�/�>Y�����01#!!2#!!2�7y���X���y9����������hk����1s=�
+�
���EX�/�>Y�EX�/�>Y�+����
�01!!!!!!!s��B�G���u�-u�1s	6�+����EX�/�>Y�EX�/�>Y�+���01!!!#!s�G���B��-u������/+ӳ 
+�
+���@  & 6 F V f v � � � � � 
]�� � ]��+��-��EX�/�>Y�EX�/�>Y�EX�/�>Y�+(+�9�����]@(8HXhx�����
]��%�@%%'%7%G%W%g%w%�%�%�%�%�%
]��%�%]01#".54>3253#4.#"3267!5!�7y����y55y��y�)uu5Z{Dj�T##T�j��������oq���qVX��TG{X3d��cbǟe��u1s`�/�
/�ܱ��а/��а�	��EX�/�>Y�EX�
/�
>Y�EX�/�>Y�EX�/�>Y�	+01!#!#3!3s��щ�/�\����H��=�
+�EX�/�>Y�EX�/�>Y����а	а�
а�01!!53#5!#3����/��u/uu������sL�+�EX�/�>Y�EX�/�>Y�
�@

'
7
G
W
g
w
�
�
�
�
�

]��
�
]01#"&'732>53s�ٮ�/w+�}\s=��ﷶ-��Js�H'1�J�+����EX�/�>Y�EX�	/�	>Y�EX�/�>Y�EX�/�>Y�901!##33���N���/������{��1s'�+�EX�/�>Y�EX�/�>Y��01!!3!s�����\1sm�
/�/�ܱ�
�а/��
9�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�9�9�
901!###33s��b扲��?�_����V�1s	b�
/�/�ܰ
�а/�����EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�9�901!##33s�����P��������/'�(/�)/�ܰ(�
а
/�����]@	)9IYiy�����
]�
��@&6FVfv���]���]���]�EX�/�>Y�EX�/�>Y�����]@(8HXhx�����
]��#�@##'#7#G#W#g#w#�#�#�#�#�#
]��#�#]01#".54>324.#"32>�6v����w55y����v8�1\�Vk�T!!T�kj�T ���qq���qq��ϒMd��cbǟee��1�
r�/�/�ܰ�а/������]@	)9IYiy�����
]����EX�/�>Y�EX�/�>Y�+���01#!#!24&#!!26���ى��쉪���'����������y�y����/ 0�1/�2/�ܱ!��!�!]@	!!)!9!I!Y!i!y!�!�!�!�!�!
]�а/�!�а/�1�а/�+�@++&+6+F+V+f+v+�+�+�+�+�+
]��+�+]�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y���@'7GWgw�����
]���]�а/��&��&�&]@&&(&8&H&X&h&x&�&�&�&�&�&
]��.�013267#"&'.54>324.#"32�/i�w��#15��n�g15y����v8�"R�hk�T!�����}�w�fu��s�灃�qq��cƢdd��c����)1���/�/�
ܰа/��а/��
����]@	)9IYiy�����
]����EX�/�>Y�EX�/�>Y�EX�/�>Y�+��а/���01!###!24&#!!26����ˉ���:d�R���%��/����R�\8o�{�y���/?ܳ
 +�*)+�)���а)�,а �6�*�A��EX�)/�)>Y�EX�+/�+>Y�EX�%/�%>Y�EX�	/�	>Y�EX�/�>Y�;+�%9���@'7GWgw�����
]���]�(%9�%�1��1�1]@11(181H1X1h1x1�1�1�1�1�1
]01#"&'#332>54.'.54>3253#4.#"�Dr�Pn�6tt>`}A:bJ+7]t<G�pFDn�M_�-yy1Tl<5`H+3Vq;J�tJTR�`4RP��CoP-!=X8?Z@-7TyZP}V-NP���;gI+5T:3H7-@Z��k�/�
а
/�	ܲ@	]�ܲ@]�
�	��
�
����EX�/�>Y�EX�/�>Y�����а	а�
а�01#!3!53!#!�u������u�`D��uu/���1��sp�/�/�ܰ�
а
/�
����EX�/�>Y�EX�/�>Y�EX�/�>Y��@'7GWgw�����
]���]01#".5332>53s1g�lm�e1�=mXXo=��o�FF�oF��;�lHHl�;H���1�EX�/�>Y�EX�/�>Y�EX�/�>Y�901#3�L��P�}{���r����Y�EX�/�>Y�EX�/�>Y�EX�	/�	>Y�EX�/�>Y�EX�/�>Y�9�9�901##33�뢅��鑸������}������C2���z�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y��в9�аа	а
а��ав9�аааа
�а�01!!533!53#5!##5!#3���X��X����mum��iuq��u��Tuuuu�^�uu������g�+�9�EX�/�>Y�EX�/�>Y�EX�/�>Y�����аа�
ааав9�а�01#3!53#5!##5!�j������jpl��lp����Buu�quu��u1w
U�/�/�ܰ�а/�в9��
��
��EX�/�>Y�EX�/�>Y����
�01!!5!#!!3w�����u1�w)uu/���u��Eu����-�	+�����EX�/�>Y�+���01!!!!�t����Ho�����J	�/�/017�b�b�43���/�0�+��	����EX�/�>Y�+���01!5!!5!/����u��qho/��/�/�EX�/�>Y�901##3����ǘu�/e����F���	�+01!5!��\��u���T	�/�/01%7�)�RB5A�m����s�&7�8/�9/�8�а/�9�ܱ�в9��,а�5�@55&565F5V5f5v5�5�5�5�5�5
]��5�5]�EX�/�>Y�EX�/�>Y�EX�$/�$>Y�0+�����]@(8HXhx�����
]�$9�$�'�@''''7'G'W'g'w'�'�'�'�'�'
]��'�']�0�-а-/01'4>3254.#"'6632#5#"&2>55&&#"X��`%;56 ;V^!h�L>T�}L�uF�$[dd-��wV�`5C{-J�f>s�XwECDX38/g3A'Q�\���-D+�3LV#X
-H5;c1���$�%/�&/�ܰ%�
а
/�	�в
9�����]@	)9IYiy�����
]�	���EX�/�>Y�EX�/�>Y�EX�	/�	>Y�EX�/�>Y� �@  ' 7 G W g w � � � � � 
]�� � ]� 9�����]@(8HXhx�����
]�
901#"&'#366324.#"32>�B{�lL�<��<�Ll�{B�)T}R�u<�NR{T+�k��H65T�539I��jP�d:}�A8:d�����(װ)/�*/�ܰа/�)�а/���а� �@  & 6 F V f v � � � � � 
]�� � ]�EX�/�>Y�EX�
/�
>Y�EX�/�>Y�
9�
����]@(8HXhx�����
]��%�@%%'%7%G%W%g%w%�%�%�%�%�%
]��%�%]01%#".54>3253#4.#"3267�;͍m��HBz�l+ZP@{{-Nl>T}T+1]�Rh�+�\mH��mj��I)9'���>fJ):d�PP�b:RD����s&�'/�(/�ܱ�'�
а
/��а�а
��@&6FVfv�����
]���]�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�$�@$$'$7$G$W$g$w$�$�$�$�$�$
]��$�$]�$9�������]@(8HXhx�����
]01!#5#".54>32#5!&&#"327s�;�Jo�yAAy�oJ�;�D�;�NR}T++T}R�vV58H��kj��I55Tu��A::d�PP�d:}������"{�EX�/�>Y�EX�
/�
>Y�"+�
��@'7GWgw�����
]���]�����]@(8HXhx�����
]013267#".54>32'&&#"���i�)`FŽl��HA{�mw�w9���BpV:���V@BbgH��mj��IP��wu��+PqC��/��+��а���EX�/�>Y�EX�/�>Y�EX�
/�
>Y�EX�/�>Y�EX�/�>Y�����аа�а	а����]@(8HXhx�����
]01!3!53#534632&&#"!��s�������/A?+���/�Fuu�u��u�����us�.�//�0/�ܰ/�а/�(�@((&(6(F(V(f(v(�(�(�(�(�(
]��(�(]�	а	/���а� ��EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�+��+�@++'+7+G+W+g+w+�+�+�+�+�+
]��+�+]�+9��#��#�#]@##(#8#H#X#h#x#�#�#�#�#�#
]�#901%#"&'732655#"&54>3253&&#"3267sBw�c��G`+�h��z��Ay�mL�;��;�NR}R+��N�;
`�h7hbJAX��dl��j��I55T�A::d�N��;B1s��/�/�ܱ��а/��в9�EX�
/�
>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�����]@(8HXhx�����
]�
901!#4&#"#33 s�lyL{V-��c�X?}�Fu�R�^������
_�+�9�/�����	��EX�/�>Y�EX�
/�
>Y�EX�/�>Y��
���а
�01#53!53#5!3/�������]�^���u�u���u�>�+�9�/���EX�/�>Y�EX�/�>Y�
+���01#53"'732>5#5!麺�s�bi$uVD\5�\�^��\�HLR'HfB/u�\��1�Q�+����EX�/�>Y�EX�	/�	>Y�EX�/�>Y�EX�/�>Y�9�
901!##33�������-��������T��	D�+������EX�/�>Y�EX�/�>Y�����а	�01!!53#5!3����]�u/u�\��!ڰ"/�а/�
ܲ�
]�@
]�ܲ�]�@]��
�	���в
9�
9��#��EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�	/�	>Y�EX�/�>Y�����]@(8HXhx�����
]�в9�901!#4&#"#4&#"#3632632��85NI�951:!
��+��1D|wo�PX�����PX:Zn6���������1s���/�/�ܱ��а/��в9�EX�
/�
>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�����]@(8HXhx�����
]�901!#4&#"#33 s�lyL{V-��c�X?}�Fu�R�^���������'�(/�)/�ܰ(�
а
/�����]@	)9IYiy�����
]�
��@&6FVfv���]���]���]�EX�/�>Y�EX�/�>Y�����]@(8HXhx�����
]��#�@##'#7#G#W#g#w#�#�#�#�#�#
]��#�#]01#".54>324.#"32>�E��om��EE��mo��E�/\�RR�Z//Z�RR�\/�m�HH�mj��II��jP�f::f�PP�b88b�1����$�%/�&/�ܰ%�
а
/�	�в
9�����]@	)9IYiy�����
]�	���EX�/�>Y�EX�/�>Y�EX�	/�	>Y�EX�/�>Y� �@  ' 7 G W g w � � � � � 
]�� � ]� 9�����]@(8HXhx�����
]�
901#"&'#36324.#"32>�D{�lJ�<���l�{D�+V}RN�<<�NR}V+�m��H65�7VlG��jN�d::A�A8:d���s�$�%/�&/�%�а/�&�	ܱ�в	9���@&6FVfv�����
]���]����EX�/�>Y�EX�/�>Y�EX�
/�
>Y�EX�/�>Y�� �� � ]@  ( 8 H X h x � � � � � 
]� 9���@'7GWgw�����
]���]�9014>3253##".73267&&#"Dz�l���;�Jl�zD�+V}RN�;;�NR}V+�j��GlV���56H��mN�d:8A�A::d�����+��
����EX�/�>Y�EX�/�>Y�EX�
/�
>Y�����]@(8HXhx�����
]�
��а
в
901&#"3!53#5!!2qJfT�\1����\^Gi-!%Hu�P��uu�u�������2߰3/�4/�ܱ���]@	)9IYiy�����
]�3�а/�)�@))&)6)F)V)f)v)�)�)�)�)�)
]��)�)]�EX�/�>Y�EX�/�>Y�.+���@'7GWgw�����
]���]��$��$�$]@$$($8$H$X$h$x$�$�$�$�$�$
]01#"&'73 54.'.54>32&&#"�R��L�\=g�k53Vo=N�MGw�V{�N7P�`+iZ=3Vo=L�NRl@J<vAF�'1<dRFfD 95k8-%;-'/:d�����+����EX�
/�
>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y��	�
ааа��@'7GWgw�����
]���]01#".5#533!!3267�ǕR�`5�Ӊ��s!;T6f�
)��6`�P�uu��u�'3ZD'e1��s���/�/��а/���ܱ�в9�EX�/�>Y�EX�/�>Y�EX�
/�
>Y�EX�/�>Y��@'7GWgw�����
]���]�901332>53#5# 1�myLzV-��b������}�Fu�R��\�{����1�EX�/�>Y�EX�/�>Y�EX�/�>Y�901#3�l��j�NL��\���1����Y�EX�/�>Y�EX�/�>Y�EX�	/�	>Y�EX�/�>Y�EX�/�>Y�9�9�901##33ý�������������\��T��������w�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y��9�аа	а
а��ав9�аааа
�а�01!!533!53#5!#7#5!#3��R��K�����V��^����y��yy`P{{��{{������u��#�EX�/�>Y�EX�/�>Y�
+01#"'7326773��'�V``/ZD39�`�PJ��pb=#vB-����//w�
X�/�/�ܰ�а/�а/�9��
��
��EX�/�>Y�EX�/�>Y����
�01!!5!#!!3w��{��u/��uu��uu�F�����&F�#	+��а�&�а#���EX�/�>Y�+�
	+�	
9��%�01#".54#5254>33#"33�\=gI)��)Ig=\\�-@%%>/�\��+Jh>��p��>fJ)o��R"J@/-@I#�X���F��+�/�/01#3���������&F�
+��
	�а
�а�#��EX�/�>Y�+�&+��
�&901"##53254>7.54##5323�)Lf=]]�/@%%B-�]]=fL)����V>fL)q��#K@+-@J"��o+Jf<�R������#2>7#".#"'>32�%3!�+Ff@=T9+)2"%3!�+FdB=T;+)/u/RsAZ�pB/FPE//RpBX�qA/ERF/������&"�s����%h�

 +�� � ]@	  ) 9 I Y i y � � � � � 
]� 
9�EX�/�>Y�EX�/�>Y�EX�/�>Y�#+�+014>32#!#&&32654&#"�">R//R=#?3��{��y��3?���TP77PP77P�/R=##=R/Bf�u���h����_�7PP77PP���/.�'+�
+�
+���@''&'6'F'V'f'v'�'�'�'�'�'
]��'�']��0��EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�	�9��"��"�"]@""("8"H"X"h"x"�"�"�"�"�"
]��,�@,,',7,G,W,g,w,�,�,�,�,�,
]��,�,]01#5255.54>3253#4.#"32�-��RX���n15y��y�)uu5Z{Dj�T##T�j�`V���X_u�t����qVX��TE{Z3d��cbǟe'��1s�&&�s��1ss&/�s�������&0�s��1��s�&6�s����uS&B������uT&BA����uW&B������u&B�����u�&B������u�&B������1�)+�
+�+���@))&)6)F)V)f)v)�)�)�)�)�)
]��)�)]��3��EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�	�9��$��$�$]@$$($8$H$X$h$x$�$�$�$�$�$
]��.�@..'.7.G.W.g.w.�.�.�.�.�.
]��.�.]01%#5255.54>3253#4.#"3267�5�sRX��d�u?Bz�l+ZP@{{-Nl>T}T+1]�Rh�+�Rf�X_u�K�gj��I)9'���>fJ):d�PP�b:RD�������S&F���������T&FA�������W&F���������&F�����S&�������T&�A����W&�������&����1s�&O��������S&P��������T&PA������W&P��������&P��������&P����1��sT&V���1��sV&VA��1��sX&V���1��s&V��u��/�EX�/�>Y01'#5'37��n��n����bp�����'|�(/�)/�(�а/�)�
ܰ�
�@&6FVfv�����
]���]�
�
���]@	)9IYiy�����
]�+�#+014>32#".732>54.#";e�NL�d;;d�LN�e;\+Nd<9fN++Nf9<dN+^L�e;;e�LN�d<<d�N;eM++Me;:fN++Nf�#��$/�%/�ܱ�$�а/��а�
а�а��@&6FVfv�����
]���]�� ��EX�	/�	>Y�EX�/�>Y�+��а/� 	901%&54>753&&'667#���7g�X��9`)�\\�)`9����yy��!�^�}R��kVB>P�N?BVj����!��1�/,��+��в9��*��EX�/�>Y�EX�"/�">Y�+��а����]@(8HXhx�����
]�"��$а%а�+�0134>32&&#"3#3 7#!532>5#1�-TxN3_K8}R<b\��3)�pmB����J>"0
��L�\5#?^<ZI{p��u��Pi�;��u!19;�F��?O��P/�Q/�P�а/�@�@@@&@6@F@V@f@v@�@�@�@�@�@
]��@�@]�а/��аQ� ܰа/� �H��H�H]@	HH)H9HIHYHiHyH�H�H�H�H�H
]�а@�а �&аH�9��4++�+01467&&54>32&&#"#".'732>54.76654.'D?H<K?m�RP�{R���-^L/j���k8;3@Bq�RV��`��7eI+j���j�^��P)1T��LF==L�6(y\P{T-+X�\��3R<IZFB`�sH�5+{XP�^5+X�`!��;V:XlJ>X�pI\B9'!X3NfH9!#^�����/�EX�/�>Y014>32#".�<d�NL�d<<d�LN�d</L�d<<d�LN�d<<d����+�+�+��а�а��@&6FVfv�����
]���]�EX�
/�
>Y�EX�/�>Y�EX�/�>Y�+��а/�
�
��а/01!###$!!#�����y��rq�/��7'Fu�����}f�'1���/;�$%+�5+�0+�+���]@	)9IYiy�����
]���]@	)9IYiy�����
]@55&565F5V5f5v5�5�5�5�5�5
]��5�5]�EX�+/�+>Y�EX�$/�$>Y�EX�/�>Y��@'7GWgw�����
]���]�+����]@(8HXhx�����
]01#"&'732654.54>54&#"#4>32�5_�Kc�BN5mD\y<VhV<BPARdJ^5�P�{LwQ+APA;XfX<=kM.85h1/VZ8K819N9DL?J=Fd;f�H��LL��^-Lh>RbA4"+/9Pou^�'7@��

+�,-+�48+�
+���]@	)9IYiy�����
]@&6FVfv�����
]���]�(
9�7
9��8�8]@	88)898I8Y8i8y8�8�8�8�8�8
]�,�<��EX�=/�=>Y�#+�+�/;+01#".54>324.#"32>#'##!274&##326^T��yl˜^X��uqȚZAL��gf��MM��he��N���#�3^H)b^3:;}}7>�o˙\P��s̘XT��wd��OK��hi��LL������7P7Py
�-?�<�b-Aճ8
$+�+�
.+@&6FVfv�����
]���]��.�.]@	..).9.I.Y.i.y.�.�.�.�.�.
]@88&868F8V8f8v8�8�8�8�8�8
]��8�8]��C��EX�)/�)>Y�=+�+�+�)�3��3�3]@33(383H3X3h3x3�3�3�3�3�3
]01#".54>32&#"327%#".54>324.#"32>b`�P�`53^�T�`j7�fuqj�7jT��yl˜^X��uq˙ZAN��gf��MM��he��N�5`�OL�c9�Hd�id�d�n˚\P��s͚XV��we��PN��ih��LL���^n�	+�	+�	+�
9�/�/�/�EX�/�>Y�EX�/�>Y�EX�/�>Y�9�9�
9��
�а�01###33###5!^n�N�o�yy��s�q������N�v0��Hq�A�q���T	�/�/01'�P%���A�^�0�+�EX�/�>Y�EX�/�>Y���а�01#53#53麺����^�����A�EX�/�>Y�EX�/�>Y�+�+��а�а�а��01%!#7!5!!5!73!!!���ZoZ��J��!ZnZ���컻�pPo��o�����V�+��	а���EX�/�>Y�EX�/�>Y�EX�/�>Y�+�+�����01!!##!!!!!���o��X����o��u��y�7y�s��m����/&2�3/�4/�3�а/�а/�4�ܰ
а
/�����]@	)9IYiy�����
]�
9��'�'�']@''&'6'F'V'f'v'�'�'�']��'�']�*
9�EX�	/�	>Y�EX�/�>Y�	�.��.�.]@..(.8.H.X.h.x.�.�.�.�.�.
]�
	.9��"�@""'"7"G"W"g"w"�"�"�"�"�"
]��"�"]�"9�	9�*	901'7&&54>327#"&'4'32>%&&#"-N#5y����<�R##6v����;�j"��)�kj�T �+e0�^k�T!�TT�h��qj[��VT�i��qgZ�n�y�rN`e��bE�?�V\d�������)3R�/
+@//&/6/F/V/f/v/�/�/�/�/�/
]��/�/]�'+�#+��а�а#�,а'�2�01#"&'#".54>3266324&#"326%&#"32�#?X3Hu55oN1VA%%?V3No55uH1VA%ZV;JJ;T�RF�;VR?��3ZB&CZXE&BZ33[A%FZZF%A[3HT��^A�XDA^�F��-�	+��а�	��+�+��а��01!#!5!3!!5!��fp�f�p��\���Z�q��g�/q��F��	�/�	+01%!5!M�M�P@��-M�N�N�hq��F��	�/�	+01'7!5!��N��PN���M��N�hq�n�+��в9����EX�
/�
>Y�EX�/�>Y�EX�/�>Y�+�	+��а�в
9��а	��01!#!5!5'!533333!!��s��q�l���̙!!����n���h�x#�y���T�jy�#1��s���/�/�ܱ��а/��
��EX�	/�	>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�	9��@'7GWgw�����
]���]�901!#5!"'#332>53s�`�{T��myLzV-��8�j��}�Fu�R�����/%��&/�'/�&�а/�'�ܲ9����]@	)9IYiy�����
]���@&6FVfv�����
]���]�EX�	/�	>Y�EX�/�>Y�	9�!�@!!'!7!G!W!g!w!�!�!�!�!�!
]��!�!]01466$7&$'7#"&4&'32>t��N���-���pG��y�A��b��\�b3bi�zT}�;u5�����ϒN�o7d/Fb}Lt�@t�+sC�+��а�
��EX�/�>Y�EX�/�>Y��	���01!!55!#!!3s��H��Hy��E��+yuu�GD���E�W�/�
/�ܱ��а/���EX�
/�
>Y�EX�/�>Y�EX�/�>Y�
��ааа	�01##!##5!����䊺���\��\�u������/�/�ܱ��а/���EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�	/�	>Y��@'7GWgw�����
]���]�	9���ааа�01%3267#".5##65#5!#�F3#)R-VC)�+�����58	q:V7Z�s�d���{{�u��'�+�	+�+�	�а/��а/01&&#"!"&'53265!2�?)���rC#;-��D#'y����sy�5}���+%48İ9/�:/�9�а/�:�ܱ�в9��+а�2�@22&262F2V2f2v2�2�2�2�2�2
]��2�2]��5а�6а6/�EX�/�>Y�85+�&!+�/+��
а
/�����]@(8HXhx�����
]�/�,а,/014>32254.#"'6632#5#".2>55&&#"!5!Eu�M% '7BV�@7=�s=u\9�u�=fL+DkG'5D%v�H�D��Ec=K%1#-m)/;\B��o�:P2!/6PCL-:�ou���-%)��*/�+/�ܰ*�
а
/�����]@	)9IYiy�����
]�
��@&6FVfv�����
]���]�EX�/�>Y�)&+�!+�����]@(8HXhx�����
]01#".54>324.#"32>!5!�=i�RT�j;;j�TR�i=�)F\56\E'�o7\F't���V�f97f�ZX�i77i�X=gI''Ig=}�'Hf��u���/-dz$+�
+��
�
]@	

)
9
I
Y
i
y
�
�
�
�
�

]@fv�����]@
&6FV]���]�$���EX�)/�)>Y�EX�/�>Y�EX�/�>Y���)����]@(8HXhx�����
]��а �013!>54.#"!535&54>32�n}��CZ8'V�^Z�V)6XC���yn?{�ww�}?��]ru#g{�?R��VV��R?�{g��urV�qբbb�������5<K�L/�M/�<ܱ�<9�L�а/� <9�<�)а�=а�C�@CC&C6CFCVCfCvC�C�C�C�C�C
]��C�C]�EX�/�>Y�EX�#/�#>Y�EX�/�>Y�EX�3/�3>Y�
)+�9�
�а/�����]@(8HXhx�����
]� 9�3�,�@,,',7,G,W,g,w,�,�,�,�,�,
]��,�,]��9а
�@�,�F�01%#"&54>3254&#"'>326632!3267#"&4&#"&&#"32>5�
+=N1u}9]x@0FG)^#VFFANp�E\k3�TNN/Hu#}fLP@GBP�-V{<;!=/�#C8#�wPuI#`LsH;T+='ENNEp��J��:A%lieͣ���e`f6V5H)�����$/��0/�1/�0�а/�1�ܱ���]@	)9IYiy�����
]�а/��%�@%%&%6%F%V%f%v%�%�%�%]��%�%]��%�%]�а/�EX�/�>Y�EX�/�>Y��+��+�+]@++(+8+H+X+h+x+�+�+�+�+�+
]�+9�� �@  ' 7 G W g w � � � � � 
]�� � ]� 901'7&54>327#"&'4'32>%&&#"+\EE��mq�A�^IE��oq�B�^+��/TR�\/�B'9/�RR�Z/wJt�j��IKDywLy�m�HJDw�jT�<1:8b�PkM�1::f������+�+��а/���@&6FVfv�����
]���]�EX�/�>Y�EX�/�>Y�EX�/�>Y��@'7GWgw�����
]���]013#4>533267#"&/����9VgV9�;VhV<mf{ð�����MubW\lFN{j_\b9Xe�r�ê/�?�+��а/����EX�/�>Y�EX�/�>Y�EX�/�>Y01!33#13R3�����V��/�	+�+01!#!5!�q����p�^�EX�/�>Y�+01!#7!����h�j�o��!����u�+ ��+��а� ��EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�+���а�а/��аа����]@(8HXhx�����
]01!!"&'53265#534632&&#"��s�rC#;-�����/A?+���u����sy�?u��u������'#".#"'632327#".#"'632327�r�JXED3�Rdr�JZED1�Rdr�JXED3�Rdr�JZED1�R��-7-�;�/8-��M�-7-�;�/7.����!�EX�/�>Y�EX�/�>Y��01!!3����������\���'�/�	/�/�/01%M��FM�}P��DP��OGJP��OGJP����%�/�/�/�/01'7'7'7'7���N��N/��P��P��M��N����M��N��@�EX�/�>Y�EX�/�>Y�EX�/�>Y���ааа
а�01!#53#53#53����������������������&"Au�����s&"�s������s&0�s����/*��
+�#+@

&
6
F
V
f
v
�
�
�
�
�

]��
�
]�#�	�#�а�'в(#9�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�&/�&>Y�!"+����$�%в(9014.#"32> !25!!!!!!5�
!90/;!!;/09!
��� JH���u�H�{ϓRR��{{̔RR�����LP�u�-u�u�PL�����"*��+/�,/�ܱ#�#9�+�а/�#9��"а�'�@''&'6'F'V'f'v'�'�'�'�'�'
]��'�']�EX�/�>Y�EX�/�>Y�EX�	/�	>Y�EX�
/�
>Y�"+�	9�	9�����]@(8HXhx�����
]�%а
�)�@))')7)G)W)g)w)�)�)�)�)�)
]��)�)]013267#"'# !26632'4&#"#"32NN/BD��1+����/oTdq9�7RR:��������8G)������b`h��Ty����Jw������	�+015!��ll���	�+01!5!��^�l7��t�
+�
+���а�
���EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y������
аа��01!54>3"3!54>3"3���)PwP����'PwP����E{\8u���E{\8u��mk�+�
+��а�

�
�а�
����EX�/�>Y�EX�
/�
>Y�+����а�а�а�01!#5255#%!#5255#?(PwP��/>'PwP���E{\7t���E{\7t����;�
+�����EX�/�>Y�EX�/�>Y�����01!54>3"3�)PwO����E{\8u����0�+��а�

��EX�/�>Y�+���01!#5255#�@)PwP���E{\7t�
��5�+��а���EX�/�>Y�+�+���01#53#53%!5!/����u�\����]��u������EX�/�>Y�EX�/�>Y01	����b����b���b��������u�"Z�������":�s���7�/�EX�/�>Y01'���^F���<���/5��EX�/�>Y�EX�&/�&>Y�+�+��а�
��
�
]@

(
8
H
X
h
x
�
�
�
�
�

]�&��@'7GWgw�����
]���]��+а�-а�4�013>32&&#"!!!!3267#".'#53&45447#�<`�Z��3y�\d�����d\�y3��Z�`>���Zb�J��{���q/-q���{!��J}�bq/1��\'	�/�/01%\N��GN��OGJP�H��%	�/�/01'7'7��P��P��M��N^+��/�/��а/�а��а�ܱ��EX�
/�
>Y�EX�
/�
>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y����а
����]@(8HXhx�����
]��ааа�аа��01!!53#534632&&#"!3!!^�������/B@+��/���Zu�u��u������F^+��/�/��а/�а�ܱ�����EX�
/�
>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y����а�ааа
����]@(8HXhx�����
]��аа��01!!53#5346323!&&#"3#^�������g�;��L>����u�u���m3
��u�F���K�+��
���а�	а�а�
а
/��а���/�EX�/�>Y01'#755'37'7��n����n������n�p��p�'u�/;	�/�/01#53/����.��n�A�+��а�

����EX�/�>Y�EX�/�>Y����01%!#5255#.@)PwP�˻�E{\7t���m�y�+�
+��а�

�
���EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y������
аа��015!#5255#%!#5255#?(PwP��/>'PwP�ɻ�E{\7t���E{\7t����\/'3?K��

+�"
(+�.	+�:
@+�F	4+@

&
6
F
V
f
v
�
�
�
�
�

]��
�
]��"�"]@""&"6"F"V"f"v"�"�"�"]��"�"]�"�а/���]@	)9IYiy�����
]��4�4]@	44)494I4Y4i4y4�4�4�4�4�4
]��@�@]@	@@)@9@I@Y@i@y@�@�@�@�@�@
]�F�M��/�1/�I/�EX�/�>Y�EX�/�>Y�++�
+�����]@(8HXhx�����
]�1�%�@%%'%7%G%W%g%w%�%�%�%�%�%
]��%�%]��7а%�=а+�C�01'4&#"326%4632#"&4&#"326%4632#"&%4&#"326%4632#"&���f=��/311113/��bfgbbgfbb/321123/��bgfbbfgb�/411114/��bfgbbgfb���)#�@VV@?VV?i��ih���@VV@?VV?i��ih��h@VV@?VV?i��ih��������&"�s��1s�&&�s������&"�s��1s�&&�s��1s�&&Au�����&*�s�����&*�s�����&*�s�����&*Au�������&0�s�������&0�sh?0 �/�EX�
/�
>Y�EX�/�>Y01#".#"#".54>3232>323�u;9Pd8:9<965D�g='NyT$F>9 >?@#�m�/E?��

�f+zqR{��\J�vL�{�+XN;�������&0Au��1��s�&6�s��1��s�&6�s��1��s�&6Au���	D�+������EX�/�>Y�EX�/�>Y�����а	�01!!53#5!3����]�u�y�����X�/�/�/01''�5�5)9C��A#N/N�+�+01#".#"'632327NZ�9H76&g?P\�9H75'f@͞%+%o/�%+%q�R��	�+01!5!��/Rq�F�	�/�	/�+01#"'7327�u��uN^qq^�ttL^^u^/�+�/�EX�/�>Y01#53/��^����:�

+���]@	)9IYiy�����
]�+�+014>32#".732654&#"�">R//R=##=R//R>"ZP77PP77P�0Q>##>Q0/R=##=R/7PP78PP�/	#�
+�EX�/�>Y�EX�/�>Y01#52553/RX��s)�X_u�)�dw�/�/�/�/01#3#3�����ы��w��w��'4�	
+@		&	6	F	V	f	v	�	�	�	�	�	
]��	�	]�/�/01"&54673�}�5'%2mP��}f@\#'-LH`���X�/�/�/01	77����5���� D��u/�EX�/�>Y�EX�/�>Y01##53-3R3����V����H�#�/�/�EX�/�>Y�EX�/�>Y01###�(g+�+e+�/�/�7��b���/�EX�/�>Y01#b�Th��
�����!5��6/�7/�ܰ6�а/��"��"�"]@	"")"9"I"Y"i"y"�"�"�"�"�"
]��,�@,,&,6,F,V,f,v,�,�,�,�,�,
]��,�,]�	/�/�/�!/�1
+�'+01'#"&''7&&547'763274.#"32>�u155/sPs=�\^�=sNs/1buNu�\�;uJ/\�RR�Z//Z�RR�\/7t>�\\�=sNq/15/uNu=�\�vNwg6/u�P�g99g�PP�b77b���F��+����/�/01#35#3���������	�+01!5!��\��u��%`�
	+�
�а/��а/����EX�/�>Y�+�����]@(8HXhx�����
]01353!57654&#"#432�!;E-�b�k�/7)sf�T7B7-5?/I�N�/)#%��)1����#!��	+��а/���]@	)9IYiy�����
]��а/� 9�EX�/�>Y�+�������]@(8HXhx�����
]� 901#"'732654'&#5254#"#47632�s\�jl):!CjXpi@?Z\iBL�Ek�{2 8

dBJ{j83\HL#5��(�	+��
��EX�
/�
>Y�+���01!53#52>533���Z`JC8$mZ�["3Jc6K0�+���7#&��'/�(/�"ܰа/�'�а/�а�	�"�	�а/�"�а�$в%"9�&"9�/�EX�/�>Y�EX�/�>Y�EX�/�>Y�$+�+��в9���$�а� а�"а#�01'!53#52>533!535#533#3'5���^F�=��Z`JC8$mZ��\��oZZZ�w���<��["3Jc6K0�+��Z<KN��\<������70��1/�2/�ܰа�а/��	�а/��а1�#а#/�-а#�/	��/�EX�-/�->Y�EX�/�>Y�EX�/�>Y�+�0 +���0�"в$901'353!57654&#"#432!53#52>533���^F^!<F-�b�j�/7)sf�T7B���Z`JC8$mZ���<�_8-5@/J�N�0)"%��)1["3Jc6K0�+�����7!%47�8/�9/�8�а/�	�@&6FVfv�����
]���]�а/��а/� 9�9�3ܰ%а%/�3�)	�-а-/�3�.а)�5в639�739�%/�EX�/�>Y�EX�#/�#>Y�EX�&/�&>Y�5*+�+��ܰ����]@(8HXhx�����
]� 9�&�(�5�/а*�1а(�3а4�01#"'732654'&#5254#"#47632'!535#533#3'5�s\�jl):!CjXpi@?Z\iBL�^F\��\��oZZZ�w�Ek�{2 8

dBJ{j83\HL#5��<��Z<KN��\<��������/�/�ܰ�а/�
а����]@	)9IYiy�����
]�����EX�/�>Y�EX�/�>Y�
+���
�а�а��01#!#53!2#!3#!2�<z���X�����y5����������f^uFk���/u�bmDN�	/�/�/�/01	'7D��#P���N!��N#!���N#��N#"N��#������&:�s1�
t�/�/�ܰ�а/��а����]@	)9IYiy�����
]����EX�/�>Y�EX�/�>Y�+�	
+01!##33 4!#326��������������������\ 0°1/�2/�1�а/�2�ܲ9�9�!��!�!]@	!!)!9!I!Y!i!y!�!�!�!�!�!
]��)�@))&)6)F)V)f)v)�)�)�)�)�)
]��)�)]�/�EX�/�>Y�9�9�,�@,,',7,G,W,g,w,�,�,�,�,�,
]��,�,]017&&'77#"&5466$7&&'4&'32>�)V/-uf�NyP�`7G��y�t��)yG����b��\�b3Ѡ#u-5�P{3��p�ϒN��i�zTFn/���7d/Fb}Lt�@t�����u�T&Z�1���!�"/�#/�ܰ"�	а	/��в	9�����]@	)9IYiy�����
]����EX�
/�
>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y��@'7GWgw�����
]���]�9�����]@(8HXhx�����
]�901#"'#36324.#"32>�Bx�n�}��}�j�{D�+RR�ww�RR+�m��Hc�A��?bE�qR�d:��9g������6&"�s����u�&B�������y&"�s����u&B�����o�
+���]@	)9IYiy�����
]�9����/�EX�/�>Y�EX�/�>Y�EX�
/�
>Y�EX�/�>Y�+�901"&5467#!#33o}�H{��y����1mP�?���}f0Ku����-LH`��_������3D��B+�
+����
а
/��!а�9�@BB&B6BFBVBfBvB�B�B�B�B�B
]��B�B]�/�EX�./�.>Y�EX�/�>Y�EX�
/�
>Y�EX�/�>Y�=+�.9�.�'��'�']@''('8'H'X'h'x'�'�'�'�'�'
]��4�@44'474G4W4g4w4�4�4�4�4�4
]��4�4]�=�:а:/01!3"&5467#5#"&54>3254.#"'66322>55&&#"smP}�<$[dd-��X��`%;56 ;V^!h�L>T�}L�uF�V�`5C{-J�f>s?#H`Z}f0K�-D+��XwECDX38/g3A'Q�\��3LV#X
-H5;c�������&$�s�����S&D���������&$�s�����W&D���������&$�s�����&D��������&$�s�����W&D����1��&%�w��)&*ٰ+/�,/�ܱ�+�
а
/��а�а
��@&6FVfv�����
]���]�/�/�(/�EX�/�>Y�EX�'/�'>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�$�@$$'$7$G$W$g$w$�$�$�$�$�$
]��$�$]�$9����)�01!#5#".54>32#5!&&#"327#�/u;Z�c55c�Z;u/�C�/l<=`B##B`={\�TeV58H��kj��I55Tu��A::d�PP�d:}?�/�����������-,	�-/�./�ܱ�-�а/��а�а�а�а�%�@%%&%6%F%V%f%v%�%�%�%�%�%
]��%�%]�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�+��*�@**'*7*G*W*g*w*�*�*�*�*�*
]��*�*]�*9�� �� � ]@  ( 8 H X h x � � � � � 
]� 9���01##5#".54>325#53533&&#"327-��;�Jo�yAAy�oJ�;������;�NR}T++T}R�v�V58H��kj��I55�u���mA::d�PP�d:}��1s6&&�s��������&F����1sy&&�s�������&F����1s�&&�s�������&F�1��{�+�
+���]@	)9IYiy�����
]����/�EX�/�>Y�EX�/�>Y�EX�/�>Y�
+��
����01"&5467!!!!!!3}��B�G���1lP��}f0Ku�-u�s-LH`������'0��

+��
�
]@	

)
9
I
Y
i
y
�
�
�
�
�

]�
9�/�EX�/�>Y�EX�
/�
>Y�EX�/�>Y�(+��"�@""'"7"G"W"g"w"�"�"�"�"�"
]��"�"]��+��+�+]@++(+8+H+X+h+x+�+�+�+�+�+
]01%3"&5467#".54>32!3267&&#"�mP}�++l��HA{�mw�w9����i�)`^��BpV:B#H`Z}f)BH��mj��IP��w��V@B�虖+PqC��1s�&&�s�������W&F���������&(�s�����usW&H��������y&(�s�����us&H���������&(�s�����us&H������/&(����us�#2�3/�4/�3�а/�4�ܲ9�9��,�@,,&,6,F,V,f,v,�,�,�,�,�,
]��,�,]�
а
/���!а�$��/�/�EX�"/�">Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�	+��/�@//'/7/G/W/g/w/�/�/�/�/�/
]��/�/]�/9��'��'�']@''('8'H'X'h'x'�'�'�'�'�'
]�!'9013#"&'732655#"&54>3253&&#"3267`��Bw�c��G`+�h��z��Ay�mL�;��;�NR}R+��N�;^u����`�h7hbJAX��dl��j��I55T�A::d�N��;B��1s�&)�s��1s�&I�u�w/��/�/�ܰа���	а	/��	�
а�а�а�а���EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�+�+��
а�а�а��013##!##5353!53!s����щ���/����Hq�)\���q�������ws��/�/�ܱ��а/���а�а�в9�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�
+�����]@(8HXhx�����
]��а
�в901!#4&#"##53533#3 s�lyL{V-������c�X?}�Fu�R�^�p��p������NNs&*�s��NN�&�������6&*�s�����&�������y&*�s����&������u��	+�
+���]@	)9IYiy�����
]�9�/�EX�/�>Y�EX�/�>Y�EX�/�>Y����
�аа�а�01"&5467!53#5!#33u}����/��1mP��}f0Ku/uu��u-LH`���u��+�
+���]@	)9IYiy�����
]�9��	��в9�/���/�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y����
��а�01"&5467!53#5!33#53u}����]�1mP������}f0Ku�u��u-LH`������&*�s�u�g�/�/�ܱ��а/���EX�	/�	>Y�EX�/�>Y�EX�/�>Y�+�����аа�а�0132>53#"'!53#5!#31H\s=����{�����/�Ҫ94Js�H��d���
u/uu���u�
$��+�"+����	а"�&��EX�/�>Y�EX�/�>Y�EX�
/�
>Y�EX� /� >Y�EX�/�>Y�EX�/�>Y�EX�"/�">Y�+�����
���а
а�аа�а�01#53!53#5!3#53"'732>5#5!u�������\�u���s�ci%uVC\6�\�^���u�u���\�HLR'HfB/u�\��������s�&+�s�uXX,�+�/�/�/�EX�/�>Y�+���01"'732>5#5!''\�bi$uVD\5�\�D5�5)�u�HLR'HfB/u�\���C��A#��1���&,���1���&L�1��J�+����EX�/�>Y�EX�	/�	>Y�EX�/�>Y�EX�/�>Y�901!##33�������-������
��T��1s�&-�s�����&M�u��1��s&-�������&M���1s&-w����&Mw\��1s&-������^&M�/�^s
O�+��а���EX�/�>Y�EX�/�>Y�9�9�9�	9��01!!5737!s���Ӊ���3EEg��FF�����+�����а�	а�
а�а�в9����EX�/�>Y�EX�/�>Y���9�9��	�
ав9�901#5!73!535��]��������w��FF�ww�E��1s�&/�s��1sS&O����1��s&/���1��s�&O���1s�&/�s��1sW&O����s/&Ow�t1�us^�/�/�ܱ�а/��а/���EX�/�>Y�EX�/�>Y�EX�/�>Y�	+�9�901%#"'732>7#33s���{V1HA^B)
�߉���}���`94'BX1u����1�us� ��!/�"/�ܱ�!�а/��в9�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�+�����]@(8HXhx�����
]�90132>54&#"#33 #"'�CD\5lyL{V-��c�X��ZD�'HfB?}�Fu�R�^��������������6&0�s�������&P��������y&0�s������&P���������&0�s������v&P����1��&3�s���T&S���1���&3�������&S���1��&3�s���X&S�������&4�s�������T&T�������&4�s�������X&T����/H��
)+�

+�32+�2���а2�5а)�?�3�J��EX�2/�2>Y�EX�4/�4>Y�EX�./�.>Y�EX�
/�
>Y�EX�/�>Y�
.9�1
.9�.�:��:�:]@::(:8:H:X:h:x:�:�:�:�:�:
]01#5255&&'#332>54.'.54>3253#4.#"�7\{FRX��`�/tt>`}A:bJ+7]t<G�pFDn�M_�-yy1Tl<5`H+3Vq;J�tJTJy\;
�X_u�PG��CoP-!=X8?Z@-7TyZP}V-NP���;gI+5T:3H7-@Z�������;��2!+�

+�+���]@	)9IYiy�����
]@22&262F2V2f2v2�2�2�2�2�2
]��2�2]�EX�&/�&>Y�EX�
/�
>Y�&�-��-�-]@--(-8-H-X-h-x-�-�-�-�-�-
]01#5255&&'73 54.'.54>32&&#"�;b}BRX��z�Z=g�k53Vo=N�MGw�V{�N7P�`+iZ=3Vo=L�NDbA%�X_u�E<vAF�'1<dRFfD 95k8-%;-'/:d������&4�s�������X&T������&5������&U�����&5�s������&Uw\�����/�а/�ܲ@]���а�
��ܲ@]�
��а���EX�/�>Y�EX�/�>Y�+���аа�а�
а��а�01#3!53#53!#!#!3��������u�u���`�uu�q����GD�-���#��+��а�а�а�!��EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�#+���@'7GWgw�����
]���]��а#�а��а а!�01#3267#".55#53#533!!3/�!;T6f�
sǕR�`5���Ӊ��s��h3ZD'e��6`�Phquu��u���1��ss&6�s��1��s&V���1��s6&6�s��1��s�&V���1��sy&6�s��1��s&V���1��s>&6�s��1��s�&V���1��s�&6�s��1��sw&V�1��s&��+�#
+�+���]@	)9IYiy�����
]�#9��(��/�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�	/�	>Y��@'7GWgw�����
]���]01"&5467#".5332>533�}�!m�e1�=mXXo=��2mP��}f)@F�oF��;�lHHl�;H����+-LH`1������+�
+��а/��а���/�EX�
/�
>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�
/�
>Y�
9��@'7GWgw�����
]���]01"&5467#5# 332>533�}�>b����myLzV-�1lP��}f0K�{@��}�Fu�R��\-LH`������&8�s�����X&X�������&:�s����u�X&Z���1w�&;�u��/wS&[����1w�&;�u��/w&[���1w�&;�u��/wW&[����/��+����а�	��EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y��аа��а����]@(8HXhx�����
]01%3!53#534632&&#"�������/A?+��uuu�u��u��������&��w������V&���������&��w������V&�������/&4���������&T������&5������&U��^F/	�/�/01#FTe/�/�^�/9�	+�/�EX�/�>Y�EX�
/�
>Y���ааа	�01##53#53FTe�����/�/�/��������/"�w�����_s/"�w�����_s/#w������/#w������[���/"�w�����[�/"�w�����[�/"�w�������/&�x���
0�EX�/�>Y�EX�/�>Y�EX�/�>Y�+01!#!#3�{��y���}��u������_1�$��!+�+��
��
9���]@	)9IYiy�����
]�!�а�&��EX�/�>Y�EX�/�>Y�+�
9����!�01#!!24.#!!2>4&#!!26���`�R�}N��:Zl2�8lV8-������u��J�j�JLaEX/�E1V��{���1�*�+�EX�/�>Y�EX�/�>Y���01!!#1s��u�\���!�EX�/�>Y�EX�/�>Y��01!!3����������\��1s=�
+�
���EX�/�>Y�EX�/�>Y�+����
�01!!!!!!!s��B�G���u�-u�1w
U�/�/�ܰ�а/�в9��
��
��EX�/�>Y�EX�/�>Y����
�01!!5!#!!3w�����u1�w)uu/���u��E1s`�/�
/�ܱ��а/��а�	��EX�/�>Y�EX�
/�
>Y�EX�/�>Y�EX�/�>Y�	+01!#!#3!3s��щ�/�\����H����/+�,/�-/�ܰ,�а/�����]@	)9IYiy�����
]��"�@""&"6"F"V"f"v"�"	]@	�"�"�"�"]��"�"]�EX�/�>Y�EX�	/�	>Y�+�����]@(8HXhx�����
]�	�'�@''''7'G'W'g'w'�'�'�'�'�'
]��'�']01!!%#".54>324.#"32>��)�6v����w55y����v8�1\�Vk�T!!T�kj�T �u9��qq���qq��ϒMd��cbǟee����=�
+�EX�/�>Y�EX�/�>Y����а	а�
а�01!!53#5!#3����/��u/uu��1�J�+����EX�/�>Y�EX�	/�	>Y�EX�/�>Y�EX�/�>Y�901!##33���N���/������{�����1�EX�/�>Y�EX�/�>Y�EX�/�>Y�901!#3P����������s��1sm�
/�/�ܱ�
�а/��
9�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�9�9�
901!###33s��b扲��?�_����V�1s	b�
/�/�ܰ
�а/�����EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�9�901!##33s�����P�����~�/�/��а/���ܱ�а�	а�а�
��EX�/�>Y�EX�/�>Y�+��ܰ���аа���
ܰа�013!53!!#!#!!y�y�\+�Ny�y���)-������0���u����/'�(/�)/�ܰ(�
а
/�����]@	)9IYiy�����
]�
��@&6FVfv���]���]���]�EX�/�>Y�EX�/�>Y�����]@(8HXhx�����
]��#�@##'#7#G#W#g#w#�#�#�#�#�#
]��#�#]01#".54>324.#"32>�6v����w55y����v8�1\�Vk�T!!T�kj�T ���qq���qq��ϒMd��cbǟee��1sK�/�	/�ܱ��а/���EX�/�>Y�EX�/�>Y�EX�/�>Y���01!#!#!s��щB��\1�
r�/�/�ܰ�а/������]@	)9IYiy�����
]����EX�/�>Y�EX�/�>Y�+���01#!#!24&#!!26���ى��쉪���'����������y�y+sC�+��а�
��EX�/�>Y�EX�/�>Y��	���01!!55!#!!3s��H��Hy��E��+yuu�GD���E�k�/�
а
/�	ܲ@	]�ܲ@]�
�	��
�
����EX�/�>Y�EX�/�>Y�����а	а�
а�01#!3!53!#!�u������u�`D��uu/������g�+�9�EX�/�>Y�EX�/�>Y�EX�/�>Y�����аа�
ааав9�а�01#3!53#5!##5!�j������jpl��lp����Buu�quu��u���"+��#
+�+�+��а�д��]@	)9IYiy�����
]���@##&#6#F#V#f#v#�#�#�#�#�#
]��#�#]��&��EX�/�>Y�EX�/�>Y01#5.54>7534.'66%�=o�^�^�o;;o�^�^�o=�'GkC���B��CiG%�b�P
��
P}�bc��O
��
R�cF}b@�%Ǎ���B`}���z�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y��в9�аа	а
а��ав9�аааа
�а�01!!533!53#5!##5!#3���X��X����mum��iuq��u��Tuuuu�^�uu���1sU�	+�+�+��а���EX�
/�
>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y01#&533>53s������-RC�AR/�'���D��5ufN_��Nfu5����"��u������#�u������/"�w�����/&�w����s/&�w������/&�w�����/&�x����)̳+@&6FVfv�����
]���]�EX�/�>Y�EX�/�>Y�EX� /� >Y�EX�%/�%>Y��@'7GWgw�����
]���]�����]@(8HXhx�����
]�%9�9�"%90132>7.#"4>323##".�;aC<\G44G\<Ca;�-`�d{�)8����8)�{d�`-�@�lFFj�@?�jFFj�?^��R���/�-��R��1���/4
�+�'+��'�']@	'')'9'I'Y'i'y'�'�'�'�'�'
]�'9�/���]@	)9IYiy�����
]��9��1а�6��EX�/�>Y�EX�/�>Y�EX�/�>Y�$!+���@'7GWgw�����
]���]�9�!$9��,��,�,]@,,(,8,H,X,h,x,�,�,�,�,�,
]01"&'#4>32'2654&##532654.#"�c�@�Bp�Z`�h8um��Bt�b����ZZ��@fJ5gQ2<�01�AT�i9;^}@h�%)�{R�d:u�tu�u�l%PA+ DfF�-A8��{�>�+�9�EX�/�>Y�EX�	/�	>Y�EX�/�>Y�901#367{9VwM��s�=w��w���k��J�����'��y/'7�.+�+�(+@&6FVfv�����
]���]�9��(�(]@	(()(9(I(Y(i(y(�(�(�(�(�(
]@..&.6.F.V.f.v.�.�.�.�.�.
]��.�.]��9��EX�/�>Y�EX�/�>Y�9��%��%�%]@%%(%8%H%X%h%x%�%	]@	�%�%�%�%]��3�33]@'373G3W3g3w3�3�3�3�3�3]��3�3]01#".5467.54>32&&#"4&'32>NR{�{R<n�b`�o;��%@/'KmET�==0j>CX�����CoNNnFD)LRb�fa�s>>s�av�\37B)+TC)!)b!;�r�GG�u9nY58Xn����0��++�+�а/@&6FVfv�����
]���]��а/�EX�/�>Y�EX�&/�&>Y�+�����]@(8HXhx�����
]�&��@'7GWgw�����
]���]�.9014>32&&#"33#"3267#".5467&&Bw�a��=f)�v��@bB��DdD#��{�/`?Ϡd�}Hq\c^�?iG'ddFFTXJ3)t+7PZLHBdc'JkCHww�u�(��)/�*/�"ܱ���]@	)9IYiy�����
]�)�
а
/�
"9��@&6FVfv�����
]���]�%/�EX�/�>Y��014.'.54>7!5!'66!;X7T��fd��;���mHs�JG�b;tu<XDs%+#d��h˴�5uu1���\q�P3XJV�)h!`��s���/�/��а/��9��ܱ��EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�9�����]@(8HXhx�����
]��016632#4&#"#4&#"'6632/�h���VZh��-#"!9GmNf���I�t������+/k
X)��/)��*/�+/�ܰ*�
а
/���
��$а�%��EX�/�>Y�EX�/�>Y�%+���@'7GWgw�����
]���]�����]@(8HXhx�����
]01#".54>322>7!"!.1g�qs�i//i�ss�i/�TNlD��!DjNNjD!@!Dj����cc������dd���?N��ll��N\I��hh��I�����]�
+�EX�/�>Y�EX�/�>Y��	���@'7GWgw�����
]���]�901%#".5#5!327�9+-R>%�]j1
:V7\y�+q1��J�+����EX�/�>Y�EX�	/�	>Y�EX�/�>Y�EX�/�>Y�901!##33�������-������
��T���/]�EX�/�>Y�EX�/�>Y�EX�/�>Y�9�����]@(8HXhx�����
]01!#'&&#"'632������93DZ/``V�'�/����-Av#=c�q1����!��"/�#/�ܱ�9�"�а/��
��EX�	/�	>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�	9�	9���@'7GWgw�����
]���]�в	901%#"&'#332>53327#"&u�b<h��mN/TA%�)11%Hl�Li>9�+��jw)NsG�-/m
Y{�
1�EX�/�>Y�EX�/�>Y�EX�/�>Y�901#367{#������/w��!��������u�/:ó8+�'.+�8'9@&6FVfv�����
]���]�89�/���.�.]@	..).9.I.Y.i.y.�.�.�.�.�.
]�'�<��*/�EX�/�>Y�"3+�+�9�����]@(8HXhx�����
]01&&54>32&&#"33#"'6654.'.546osDq�PN�?+FzFu�����L}X/Fs�LG�b;tu<XD!;X7uÍP��#�`NX1##j#}dqt'H^7N\13XJV�)h!`/%+
#P�ml������'�(/�)/�ܰ(�
а
/�����]@	)9IYiy�����
]�
��@&6FVfv���]���]���]�EX�/�>Y�EX�/�>Y�����]@(8HXhx�����
]��#�@##'#7#G#W#g#w#�#�#�#�#�#
]��#�#]01#".54>324.#"32>�E��om��EE��mo��E�/\�RR�Z//Z�RR�\/�m�HH�mj��II��jP�f::f�PP�b88b�1����&ΰ'/�(/�ܰ'�	а	/������]@	)9IYiy�����
]����EX�/�>Y�EX�/�>Y�EX�/�>Y�"�@""'"7"G"W"g"w"�"�"�"�"�"
]��"�"]�"9�����]@(8HXhx�����
]01#"'#4>324.#"32>�By�n�{�1i�oi�x@�)RyN=kL+<�NT}T+�m��Ha�AF\��TG��jP�d:)Z�d�A8:b��u��+��,/�-/�,�а/�-�ܰа/���@&6FVfv�����
]���]��"��"�"]@	"")"9"I"Y"i"y"�"�"�"�"�"
]�/�EX�/�>Y����]@(8HXhx�����
]014>32&&#"'6654.'.H��m��;`+�hR�[1Hs�JG�b;tu<XD!;X7o��T�l��Gl\BDR:d�P^}N%3XJV�)h!`/%+8j������)Ͱ*/�+/�*�а/�+�ܲ9���@&6FVfv�����
]���]��$��$�$]@	$$)$9$I$Y$i$y$�$�$�$�$�$
]�EX�/�>Y�EX�
/�
>Y���а
��@'7GWgw�����
]���]��)�01#".54>3!!"32>54.'�+TD)By�df�wAI��j#�۪�+RrJJuT+#BZ9/Nix>f�yBH�mj�{Bu��N�b:3X}J<viP����\�+�EX�/�>Y�EX�/�>Y���аа��@'7GWgw�����
]���]01!5!!3267#".5��s��sj#(R-R>%/uu��qk:V71������/�/��а/���ܱ���]@	)9IYiy�����
]�EX�/�>Y�EX�/�>Y�EX�/�>Y�
�@

'
7
G
W
g
w
�
�
�
�
�

]��
�
]01".5332>54&'7�^�n<�-Lg9\}L#%+�)+5q�0`�`>��=bD#N{�Dh�\5`�{^��a����!-��+�+�%+@&6FVfv�����
]���]��а�"д�%�%]@	%%)%9%I%Y%i%y%�%�%�%�%�%
]��/��EX�/�>Y�EX�/�>Y��*��*�*]@**(*8*H*X*h*x*�*�*�*�*�*
]012#.54674>6654.#"TR�^5=o�`�^�o;d\RBG��-L��)?R'#�G��lb�}P
��c
P�b��F^5�l���+N: ��ɍP�d:-2���u��<�/�EX�/�>Y�EX�/�>Y�9�9�9�	901	#73��Ǥ���yJ-���^�u+���iE��'�j��1��s^K�	+�+�+��а���/�EX�
/�
>Y�EX�/�>Y�EX�/�>Y01#&533>53s������-RC�AR/�����c��-5ufN��Nfu5������4ֳ+�+�-"+�9@&6FVfv�����
]���]��"�"]@	"")"9"I"Y"i"y"�"�"�"�"�"
]�-�6��EX�
/�
>Y�EX�(/�(>Y�EX�/�>Y�EX�2/�2>Y�
9���@'7GWgw�����
]���]��01%#".54>73265332654.'7#"&�rPHd@
�9F=V�X=F;
�!@dJPs�RgDw�d>���/5-u}3����Q������3}u-5/���>d�wDg������&����1���&��������/"�w��1���/&�w������/&�w��1s�&��u�w��s#�$/�%/�$�!а!/� �а%�	ܲ!	9�!	9���EX�/�>Y�EX�/�>Y�EX�/�>Y�EX� /� >Y�EX�/�>Y���9�9���@'7GWgw�����
]���]�����]@(8HXhx�����
]��"а#�01!#3 #"'73254&#"##���c�X%>R-T&#jlyL{V-��u�����7V:m	qp}�Fu�R�^���1��&��u����/.��//�0/�ܰа/�/�а/��
�а�$�!а�.а./�EX�/�>Y�EX�/�>Y�"#+�9�����]@(8HXhx�����
]��,�@,,',7,G,W,g,w,�,�,�,�,�,
]��,�,]01#".54>3253#4.#"!!32�3tt�[�pO36w��y�*uu5ZzE`�U+F��#&7GW5�`V�db4[~��X��qVX��TFzZ3T��[uX�G'B0'���/?ӳ
 +�*)+�)���а)�,а �6�*�A��EX�)/�)>Y�EX�+/�+>Y�EX�%/�%>Y�EX�	/�	>Y�EX�/�>Y�%9��@'7GWgw�����
]���]�(%9�%�1��1�1]@11(181H1X1h1x1�1�1�1�1�1
]01#"&'#332>54.'.54>3253#4.#"�Dr�Pn�6tt>`}A:bJ+7]t<G�pFDn�M_�-yy1Tl<5`H+3Vq;J�tJTR�`4RP��CoP-!=X8?Z@-7TyZP}V-NP���;gI+5T:3H7-@Z���=�
+�EX�/�>Y�EX�/�>Y����а	а�
а�01!!53#5!#3����/��u/uu������&*�s����sL�+�EX�/�>Y�EX�/�>Y�
�@

'
7
G
W
g
w
�
�
�
�
�

]��
�
]01#"&'732>53s�ٮ�/w+�}\s=��ﷶ-��Js�H'�u���$��#+�+�+���]@	)9IYiy�����
]��	а�&��EX�	/�	>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�+�	��	9��!�@!!'!7!G!W!g!w!�!�!�!�!�!
]��!�!]014&##32632####"&'7325l\LL\l��J����ѻ :L+(6
 ^q��%�����+7V:	
s	qJ1���	+�
+�+���]@	)9IYiy�����
]��а�а
���EX�
/�
>Y�EX�/�>Y�EX�	/�	>Y�EX�/�>Y�+����а��014&##32633332###l\LL\l����J����ѻq�����0�м���u���ws��/�/��а/��а�	ܲ	9�
��EX�/�>Y�EX�/�>Y�EX�	/�	>Y�EX�/�>Y���	9�����]@(8HXhx�����
]��а�01!#3 #4&#"##���c�X�lyL{V-��u�����?}�Fu�R�^���1��&��u������{&��u1��sS�+�+�	+�/�EX�/�>Y�EX�
/�
>Y�EX�/�>Y�EX�/�>Y��	�01!!#!3!3s������/���?�\����
0�EX�/�>Y�EX�/�>Y�EX�/�>Y�+01!#!#3�{��y���}��u������_1�s�/�/�
ܱ���]@	)9IYiy�����
]��а/��	��EX�/�>Y�EX�/�>Y�
+�����014&#!!26!2#!!!����'����'����RB�Gq�������u1�$��!+�+��
��
9���]@	)9IYiy�����
]�!�а�&��EX�/�>Y�EX�/�>Y�+�
9����!�01#!!24.#!!2>4&#!!26���`�R�}N��:Zl2�8lV8-������u��J�j�JLaEX/�E1V��{���1�*�+�EX�/�>Y�EX�/�>Y���01!!#1s��u�\���R�
+�+�+�
+�
���
/�/�EX�/�>Y�EX�/�>Y��аа��015>5!3#!#!#9X<��{�R{u1P9��u1q�#�B�\�L?�����њ9/1s=�
+�
���EX�/�>Y�EX�/�>Y�+����
�01!!!!!!!s��B�G���u�-u�����+��а�
��EX�/�>Y�EX�	/�	>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�9�9�9�901!'#333#�7���?���7�7���?���7d���8��D��D��jd�����/>�-
++�7+�7�	��-�а/���]@	)9IYiy�����
]�-�)а)/�:+9�7�@��EX�2/�2>Y�EX�/�>Y�+���@'7GWgw�����
]���]�2�#��#�#]@##(#8#H#X#h#x#�#�#�#�#�#
]�-29�:901#".'732>54.#52>54'&#"#3>32�Fu�T^�}N�]\�;hN-2a�\C�d>IItAy*(6}uJX`0T�k>�|EiG$hV�d83f�c�ML(Fb:Pe9u6YCnBC2)&pL��1B)1\�Up�
<Yo1s	b�
/�/�
�а/���ܱ��EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�9�90133##1����������P����1sy&��s1�J�+����EX�/�>Y�EX�	/�	>Y�EX�/�>Y�EX�/�>Y�901!##33���N���/������{�����s��/�/�ܱ��а/���EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�
/�
>Y���
9�
��@'7GWgw�����
]���]01#!#"'7325s��[%>R-T'#j����+7V:m	qJ1sm�
/�/�ܱ�
�а/��
9�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�9�9�
901!###33s��b扲��?�_����V�1s`�/�
/�ܱ��а/��а�	��EX�/�>Y�EX�
/�
>Y�EX�/�>Y�EX�/�>Y�	+01!#!#3!3s��щ�/�\����H����/'�(/�)/�ܰ(�
а
/�����]@	)9IYiy�����
]�
��@&6FVfv���]���]���]�EX�/�>Y�EX�/�>Y�����]@(8HXhx�����
]��#�@##'#7#G#W#g#w#�#�#�#�#�#
]��#�#]01#".54>324.#"32>�6v����w55y����v8�1\�Vk�T!!T�kj�T ���qq���qq��ϒMd��cbǟee��1sK�/�	/�ܱ��а/���EX�/�>Y�EX�/�>Y�EX�/�>Y���01!#!#!s��щB��\1�
r�/�/�ܰ�а/������]@	)9IYiy�����
]����EX�/�>Y�EX�/�>Y�+���01#!#!24&#!!26���ى��쉪���'����������y�y����/%�&/�'/�ܰа/�&�а/��
�а��@&6FVfv�����
]���]��%а%/�EX�/�>Y�EX�
/�
>Y�EX�/�>Y�
9�
����]�(]@8HXhx�����
]��#�@##'#7#G#W#g#w#�#�#�#�#�#
]��#�#]01#".54>3253#4.#"32�3谉�y55y��y�)uu5Z{Dj�T##T�j�`V��n���qVX��TE{Z3d��cbǝe%�k�/�
а
/�	ܲ@	]�ܲ@]�
�	��
�
����EX�/�>Y�EX�/�>Y�����а	а�
а�01#!3!53!#!�u������u�`D��uu/�������Z�EX�/�>Y�EX�/�>Y�EX�/�>Y�
�@

'
7
G
W
g
w
�
�
�
�
�

]��
�
]�901#"'7326773��'�V``/ZD39�`�PJ�pb>#wB-����0���"+��#
+�+�+��а�д��]@	)9IYiy�����
]���@##&#6#F#V#f#v#�#�#�#�#�#
]��#�#]��&��EX�/�>Y�EX�/�>Y01#5.54>7534.'66%�=o�^�^�o;;o�^�^�o=�'GkC���B��CiG%�b�P
��
P}�bc��O
��
R�cF}b@�%Ǎ���B`}���z�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y��в9�аа	а
а��ав9�аааа
�а�01!!533!53#5!##5!#3���X��X����mum��iuq��u��Tuuuu�^�uu���1��O�+�+�+��
��/�EX�/�>Y�EX�	/�	>Y�EX�/�>Y��а�01%#!3!3{���/�u�L?�\��\1s^�/�/��а/���ܱ�в9�EX�/�>Y�EX�/�>Y�EX�
/�
>Y�+�
901332>53## 1�myLzV-��b�����}�Ft�R���^�{�|�/�а/�ܲ�]�@]���ܲ�]�@]���
��
��EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y��
а�013!3!3!����\��\����\��o�+�+�+����а���
/�EX�/�>Y�EX�/�>Y�EX�	/�	>Y�EX�/�>Y��ааа�0113!3!33#���{{�\��\��\�L?�v�/�/��
а
/��а�ܱ
��
�
]@	

)
9
I
Y
i
y
�
�
�
�
�

]�EX�/�>Y�EX�	/�	>Y�+���	��01!32#!#4&##326u���Ƕ����o��o��м���������
��+�+�+���]@	)9IYiy�����
]����EX�/�>Y�EX�/�>Y�EX�	/�	>Y�EX�/�>Y�+�	��01332#!4&##3263#���������l]��]l@�����q��%��1�l�/�/�
ܱ���]@	)9IYiy�����
]��а/��	��EX�/�>Y�EX�/�>Y�
+���014&#!!26!2#!3����'����'����R�q������������/.��//�0/�/�а/�
�а/�0�#ܱ
�
а�а�.а./�.#9�EX�/�>Y�EX�*/�*>Y�

+�*��@'7GWgw�����
]���]�����]@(8HXhx�����
]�*90132>7667!5!.#"#36632#"'&'o`�5WG7&#��F+U�`EzZ5uu*�y��w63Op�[�tt3���0B'G�Xu[��T3ZzF��XVq��X��~[4bd�1���/"޳+�+�+��а�д��]@	)9IYiy�����
]��$��EX�/�>Y�EX�/�>Y�EX�
/�
>Y�EX�	/�	>Y�+�	��@'7GWgw�����
]���]�����]@(8HXhx�����
]0133! ! ##%2>54.#"1��
!���
��V/< 

 <//;!!;��h�\�^i��^R��{{ϓRR��{{̔R��s��/�/��а/��
ܱ��а/���@&6FVfv�����
]���]����EX�/�>Y�EX�
/�
>Y�EX�/�>Y�+��а/���01.5463!###3!!"}R�e9����������$�ܐ�58\�R����/����y{����s�&7�8/�9/�8�а/�9�ܱ�в9��,а�5�@55&565F5V5f5v5�5�5�5�5�5
]��5�5]�EX�/�>Y�EX�/�>Y�EX�$/�$>Y�0+�����]@(8HXhx�����
]�$9�$�'�@''''7'G'W'g'w'�'�'�'�'�'
]��'�']�0�-а-/01'4>3254.#"'6632#5#"&2>55&&#"X��`%;56 ;V^!h�L>T�}L�uF�$[dd-��wV�`5C{-J�f>s�XwECDX38/g3A'Q�\���-D+�3LV#X
-H5;c���/
:
�;/�</�;�а/�)�@))&)6)F)V)f)v)�)�)�)�)�)
]��)�)]�а/�<�3ܱ���]@	)9IYiy�����
]�а/�EX�/�>Y�EX�/�>Y�EX�8/�8>Y�.+�8��@'7GWgw�����
]���]��$��$�$]@$$($8$H$X$h$x$�$�$�$�$�$
]���)890132>54&#"'4>323267#".#">32#"���FwV/�����?s�`->1-)9)G+t3':13#=kP-HXd1b�{FF{�b�����1]�O���/���d!R)7C�q-F1;u�ub�}HH1��&��#+�+���]@	)9IYiy�����
]�9�/���]@	)9IYiy�����
]��9�#���EX�/�>Y�EX�/�>Y�!+�!9����#�01#!!24.#!!2>4&#!!26�Ǻ��D�hBFf}\�.CR'��H)TD)-�t��et�
���5^LHbqJ+5
��
3��RL��N1��*�+�EX�/�>Y�EX�/�>Y���01!!#1s���u������R�
+�+�+�
+�
���
/�/�EX�/�>Y�EX�/�>Y��аа��015>55!3#!#!#/V@'��{�R{u!5D!��u
X�ߑ���L?��"tˠs�������"{�EX�/�>Y�EX�
/�
>Y�"+�
��@'7GWgw�����
]���]�����]@(8HXhx�����
]013267#".54>32'&&#"���i�)`FŽl��HA{�mw�w9���BpV:���V@BbgH��mj��IP��wu��+PqC�����+��
��EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�
/�
>Y�EX�/�>Y�EX�/�>Y�
9�
9�
9�
901333##'#��������1�1ٓ��w��w��h���H��ZH�^�����.ų +��а/�� � ]@	  ) 9 I Y i y � � � � � 
]� �а/��0��EX�*/�*>Y�EX�/�>Y�+�9���@'7GWgw�����
]���]�*�#��#�#]@##(#8#H#X#h#x#�#�#�#�#�#
]01#"&'732654.##532654&#"'6632s_b\qH}�d��?`/�{��#DdD�����v�)f=əa�wB�DwwHCkJ'cdBHLZP7+t]3JXTFFdd'Gi1s�	b�
/�/�
�а/���ܱ��EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�9�90133##1���������\����1s&��1��J�+����EX�/�>Y�EX�	/�	>Y�EX�/�>Y�EX�/�>Y�901!##33�������-������
��T���s���/�/�ܱ��а/���EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�
/�
>Y���
9�
��@'7GWgw�����
]���]01#!#"'7325s��[%>R-T'#j��\/��7V:m	q�1s�m�
/�/�ܱ�
�а/��
9�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�9�9�
901!###33s��b色�������1s�`�/�
/�ܱ��а/��а�	��EX�/�>Y�EX�
/�
>Y�EX�/�>Y�EX�/�>Y�	+01!#!#3!3s��щ�/���^��s������'�(/�)/�ܰ(�
а
/�����]@	)9IYiy�����
]�
��@&6FVfv���]���]���]�EX�/�>Y�EX�/�>Y�����]@(8HXhx�����
]��#�@##'#7#G#W#g#w#�#�#�#�#�#
]��#�#]01#".54>324.#"32>�E��om��EE��mo��E�/\�RR�Z//Z�RR�\/�m�HH�mj��II��jP�f::f�PP�b88b�1s�K�/�	/�ܱ��а/���EX�/�>Y�EX�/�>Y�EX�/�>Y���01!#!#!s��щB/���1����$�%/�&/�ܰ%�
а
/�	�в
9�����]@	)9IYiy�����
]�	���EX�/�>Y�EX�/�>Y�EX�	/�	>Y�EX�/�>Y� �@  ' 7 G W g w � � � � � 
]�� � ]� 9�����]@(8HXhx�����
]�
901#"&'#36324.#"32>�D{�lJ�<���l�{D�+V}RN�<<�NR}V+�m��H65�7VlG��jN�d::A�A8:d�����(װ)/�*/�ܰа/�)�а/���а� �@  & 6 F V f v � � � � � 
]�� � ]�EX�/�>Y�EX�
/�
>Y�EX�/�>Y�
9�
����]@(8HXhx�����
]��%�@%%'%7%G%W%g%w%�%�%�%�%�%
]��%�%]01%#".54>3253#4.#"3267�;͍m��HBz�l+ZP@{{-Nl>T}T+1]�Rh�+�\kH��mj��I)9'���>fJ):d�PP�b:PD��k�/�
а
/�	ܲ@	]�ܲ@]�
�	��
�
����EX�/�>Y�EX�/�>Y�����а	а�
а�01#!3!53!#!�u������u��C�Fuu������u��#�EX�/�>Y�EX�/�>Y�
+01#"'7326773��'�V``/ZD39�`�PJ��pb=#vB-����/���
$/2�0/�а/�ܲ�]��]�0]����а�а�/�а�*ܲ�*]��*]�0*]�*9��/�"а�1��EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�#/�#>Y�EX�
/�
>Y�EX� /� >Y�����]@(8HXhx�����
]�
��@'7GWgw�����
]���]�
9�9�9�"
9�'а�-�01&#"327#"&546323632#"'#32654&#"�9TJIIJT95X����X5�5X����X5��9TJIIJT9�_��ɪ^}V���V��KV���V�L1^��ɬ_����w�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y��9�аа	а
а��ав9�аааа
�а�01!!533!53#5!#7#5!#3��R��K�����V��^����y��yy`P{{��{{����1���O�+�+�+��
��/�EX�/�>Y�EX�	/�	>Y�EX�/�>Y��а�01%#!3!3{���/�y�H?���/��1s�^�/�/��а/���ܱ�в9�EX�/�>Y�EX�/�>Y�EX�
/�
>Y�+�
901332>553## 1�myLzV-��b������}�Eu�R��\�{��|�/�а/�ܲ�]�@]���ܲ�]�@]���
��
��EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y��
а�013!3!3!����\����/�\������u�+�+�+����а���
/�EX�/�>Y�EX�/�>Y�EX�	/�	>Y�EX�/�>Y��ааа/�а/0113!3!33#���{{���/��/��H?��v�/�/��
а
/��а�ܱ
��
�
]@	

)
9
I
Y
i
y
�
�
�
�
�

]�EX�/�>Y�EX�	/�	>Y�+���	��01!32#!#4&##326uݢ������i\��\i�������/��MT��V����+�+�+��д��]@	)9IYiy�����
]����EX�/�>Y�EX�
/�
>Y�EX�/�>Y�EX�/�>Y�+���013#32#!34&##326���n������ՉR\T��T\��\/������uMT��V1��
o�/�/��а/��а�ܱ���]@	)9IYiy�����
]�EX�	/�	>Y�EX�/�>Y�+���01!2#!34&#!!26�e��Ǻ��_�t��et�/������uMT��V#���� {�EX�/�>Y�EX�/�>Y�+�����]@(8HXhx�����
]���@'7GWgw�����
]���]01!&&#"'6632#"&'73267!���h�+`;͍m��HH��m��;`+�h������RDB\lG��lm��Hk\BDP��1����޳+�+�+��а�д��]@	)9IYiy�����
]����EX�/�>Y�EX�/�>Y�EX�
/�
>Y�EX�	/�	>Y�+�	��@'7GWgw�����
]���]�����]@(8HXhx�����
]0133! ! ##%2#"1������\�����h�����hXyw������s�
��/�/��а/��ܱ	��
а
/���@&6FVfv�����
]���]�	���EX�/�>Y�EX�/�>Y�EX�/�>Y�+��
а��01&&5463!###3!!"Z��Ǻ���—�ud��u�u�����\u���NTFV�������&�����us'��(/�)/�(�а/��а)�
ܲ
9�
9���#а�%��EX�/�>Y�EX�
/�
>Y�EX�$/�$>Y�+�+��в$9�
����]@(8HXhx�����
]��&�013533#3 #"'73254&#"##q����c�X%>R-T&#jlyL{V-��^��u�����7V:m	q�}�Fu�R�^���1�T&������ {�EX�/�>Y�EX�
/�
>Y�+�
��@'7GWgw�����
]���]�����]@(8HXhx�����
]013267#".54>32&&#"!���h�+`;͍m��HH��m��;`+�h�����PDB\kH��ml��Gl\BDR��u������2ٰ3/�4/�ܱ���]@	)9IYiy�����
]�3�а/�)�@))&)6)F)V)f)v)�)�)�)]��)�)]��)�)]�EX�/�>Y�EX�/�>Y��@'7GWgw�����
]���]��$��$�$]@$$($8$H$X$h$x$�$�$�$�$�$
]01#"&'73 54.'.54>32&&#"�R��L�\=g�k53Vo=N�MGw�V{�N7P�`+iZ=3Vo=L�NRl@J<vAF�'1<dRFfD 95k8-%;-'/:d��
_�+�9�/�����	��EX�/�>Y�EX�
/�
>Y�EX�/�>Y��
���а
�01#53!53#5!3/�������]�^���u�u�����&���u�>�+�9�/���EX�/�>Y�EX�/�>Y�
+���01#53"'732>5#5!麺�s�bi$uVD\5�\�^��\�HLR'HfB/u�\���u����$��+�!+�+�!�д��]@	)9IYiy�����
]��&��EX�/�>Y�EX�/�>Y�EX�	/�	>Y�EX�/�>Y�+����!�
!901#"&'7325!32#!4&##326� :L+(6
 ^�w�������\TyyT\/��7V:	
s	q������/��MT��V1����+�+�+��а�д��]@	)9IYiy�����
]��а���EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�+��а�а��01333332#!#4&##3261���w�������m\TyyT\���u��������FMT��V��s��/�/��а/��а�
ܲ
9�����EX�/�>Y�EX�
/�
>Y�EX�
/�
>Y�EX�/�>Y�+��в
9�
����]@(8HXhx�����
]���013533#3 #4&#"##q����c�X�lyL{V-��^��u������?}�Fu�R�^���1�T&������u�&��1��s�S�+�+�	+�/�EX�/�>Y�EX�
/�
>Y�EX�/�>Y�EX�/�>Y��	�01!!#!3!3s������/���?���/1��A�/�	/�ܱ
��а/���/�EX�/�>Y�EX�/�>Y���013!#!/u�����\1�^A�/�	/�ܱ
��а/���/�EX�/�>Y�EX�/�>Y���013!#!/u���^������1��&#�u��1����&C�u��1��&%�u������s�&E�u��1s�&'�u�����&G�u��1s�&.�u���&N���1��&1�u��1���&Q�������&4�u�������&T�����&5�u������&U�u������&8Ay�����X&XA������&8�u�����T&X�������&8�u�����&X�������&:Ay����u�X&ZA��	�+01!5!��\��uF	�+�+�+�+���]@	)9IYiy�����
]���]@	)9IYiy�����
]��а/��а���EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�EX�/�>Y�
+�9�
9�����]@(8HXhx�����
]����01!##33254#" ! !!��ˉ���Jttyw�������T�������o//����u��	�+01!5!��\��u���P �/�EX�/�>Y�EX�/�>Y01%'�P�R�NNPN��PNDF/:EIT_"�Y
+�?
F+�I
+�'
0+�'�аF�а/�I�а�а/�I�аF� а?�+а+/��0�0]@	00)090I0Y0i0y0�0�0�0�0�0
]�?�6а6/�0�;а�J�@YY&Y6YFYVYfYvY�Y�Y�Y�Y�Y
]��Y�Y]�Y�PаP/��Uа'�a��C+�$3+�F+�T+��аF�а$�аT�а�*аF�,аT�7а�>а�Gа3�Mа�UаC�\�01#"&55##"&546335#"&54632354632##324&#"3264&##326%5#4&#"33#"3265oNNj�nNNnnNb`NnnNNl�lNNooN``No[9))7`)99)^5))9���Z7))99)`b)99))9NnnN``NnnNNl�lNNooN``NooNNl�l)99)`7��)7`)99����)99))7�f7))99)����
/�EX�	/�	>Y�EX�/�>Y�+��а��01!5!!5!'���+����+�P�R�NNVqqq��N��PN%\��+�	+��а	��01%#"'&##53233!5!\��{�f����{)V+d����p%��q�C�C��qJV	1�	+�EX�/�>Y�EX�/�>Y�����01!!#3''7'77V�s������P}}N}}N}}P}��u�r���M~~M}}P}}P}\/F�/�
/�ܰ�а/�	��		��EX�/�>Y�+��а�а��01%!!5#5!!5!\����m�n���n�����b�(��)/�*/�ܱ
���]@	)9IYiy�����
]�)�$а$/�#	�($9�EX�%/�%>Y�EX�/�>Y��@'7GWgw�����
]���]�"%9�%�'�01#".'732>54.'7#!#bI�cP�uVICcyER�j=(Li?J{\3��P��o���b�}J1X}L;hL+=i�T?yeGIVu�`Np��o���T}�	+�/�+�
+���01#!!2>5!5!TT��u���N��DN�u\�yE�J%pɘX�LBEN�Fx�\oH\/@�/�	/�ܰ�а/�	��	��EX�/�>Y�ܰ���а�01!!3!53\��n6p/��H^�	�+015!^H�������+�/�EX�/�>Y013#��������^��+�EX�/�>Y�+01!!#����щ�C����+�EX�/�>Y�+015!#�H�����H^��+�/�+013!!��G�/��F�H��+�/�+015!3��H�������^�%�+����/�EX�/�>Y�+013!!#��G�����F��C���%�+����/�EX�/�>Y�+01#!5!3��s���������^�"�+�EX�/�>Y�+���015!!#^���H���C�H^��+�/�+���015!3!��GH���F���^�7�+��а�
��/�EX�	/�	>Y�+��а��015!3!!#��G���H���F��C��^��+�+01!5!5^��^�������������@�/�	/��а/��	�ܱ��/�/�EX�/�>Y�EX�/�>Y01#;#\��쉉������^�>�+�+���а�
��EX�/�>Y�	+�+���01!#!!#^���u\�����t����^�I�/�
/�ܱ��а/���
��EX�/�>Y�EX�/�>Y�+�
+01!###!^�s��uщ�CH���u��^�F�/�
/��а/��
�	ܱ
��EX�/�>Y�EX�	/�	>Y�+�+01#!!#\���s����������;�+�	
+������EX�	/�	>Y�+�+���01535#5!3#��\�������t����I�/�
/��а/��а
�ܱ��EX�/�>Y�EX�/�>Y�	+�+01!####5\u������/H��������B�+�+��а���EX�/�>Y�EX�/�>Y�+�	+01!5!###5H��щ������t���^�4�+�	+���а	�
��/�	+�+���01!3!#3���G���u�����H^�5�/�
/�	ܱ��а/�����/�/�	+�+01!333!H�����Ht��E�H���^�2�/�
/��а/��
�	ܱ��/�/�+�	+013!3!Ӊ��������u�����.�+�+����
��	/�/�+���015#5!3!#5�������w���H��5�/�
/��а/��а
�	ܱ��/�/�+�	+0153333!Ӊ��H����E�1�����.�+�	+����
��/�/�	+�+015333!5Ӊ�/��w�t�����^�1�+��а�
��/�EX�	/�	>Y�+�+013!!#��G�����������^�L�/�
/��а/��
�ܱ��	��/�/�EX�/�>Y�EX�
/�
>Y�+01#;!!#\�����s����F��C��^�	X�/�/��а/���ܱ��а���/�/�EX�/�>Y�EX�
/�
>Y�
+�+01#33!!#\�����s����w���������1�+����/�EX�/�>Y�	+�+015!3#!5����s��w�t�����L�/�
/��а/���а
�	ܱ��/�/�EX�/�>Y�EX�
/�
>Y�+01##53;#\��Ӊ쉉����������T�+�
+����а�а�
��/�/�EX�/�>Y�EX�/�>Y�	+�+01533##53#Ӊ��H����w�t�t���^�(�+�EX�/�>Y�	+�+���015!!#!5^���������������^�L�/�
/��а/��
�	ܱ
��EX�/�>Y�EX�	/�	>Y�+���01##5!!#\��^�s�������CF��^�	N�+�
+������EX�/�>Y�EX�
/�
>Y�+�+��
а��01##5!5!#\��^��^�s��t�t���������^��+�/�	+�+���015!3!!5��G�����늊H^�8�/�
/��а/��
�	ܱ��/�/�+��а�	�0153333!Ӊ��H����C�F��^�:�+�	+������/�/�
+�+��а�	�0153333!!5Ӊ������w���늊��^�=�+��
а���/�EX�/�>Y�	+�+��а	�
�015!3!!#!5��G����s��������^�[�/�/�ܱ��а�
а
/�	�
���/�/�EX�/�>Y�EX�	/�	>Y�+��а�
�01!#3##53^�s�������щ�C�F�������^�x�+�+����а�а�
а�а���/�
/�EX�/�>Y�EX�/�>Y�	+�+��а�а�а	��01533##5%3!!#Ӊ��F���q���w�t��������������EX�/�>Y�EX�/�>Y01	���������V�	�/�/01	7V����^���5�;�qs����S�/�/�ܰ�а/�
	��	��EX�/�>Y�EX�/�>Y�	+��а	�а�
�01#!#5	3!����`������k��\k�b����;�����EX�/�>Y�EX�/�>Y01#!#5!�������\��\k������0�	+�/�	+�+�	�
а�а�а��01%!!#5!!5!#53��O��DO�y�+�_��s����LBEN��mmm�doH
g�
	+�	+�

+�	+����EX�/�>Y�EX�/�>Y�+�	+�������01!!!#'!!##5#53533�47���%�����l��l��m�������+��n��J��^�"�		
+�/�/�EX�	/�	>Y�+01!!#3^��yN�N��/�Znn���N�N�����
��{}�	+�
/�+�	+01!!3!'7'7!".5
%�JEy�\u�ND��N���uʖT}o\�xF�N����L�X��pJ��\�0�	+�	/�+�+��а�
а�а��01!5!#53'7!!#!'7\��p������N��+�{�Nm�do9��L��m�@�N���"�	+�/�/�EX�/�>Y�
+01!#3'!5!7nn��P{��1��P��1�Nyn{NhD$HT��U/�V/�U�а/�V�!ܱ'
��'�']@	'')'9'I'Y'i'y'�'�'�'�'�'
]�!�-а-/��9
�@99&969F9V9f9v9�9�9�9�9�9
]��9�9]�!�GаG/�R/�EX�//�/>Y�EX�5/�5>Y�E+��а/�5��а/�E�=а=/01#"'&#"#"'&547632327632&5476677&#"'&#"3276323276%h$Nc^-GJ-)HJ"{wyNZ�9V+7
"VV2�m�13&�1
$ \^��hs>3k\F1\<?Z83N�75L+oum���ťs�
�{�ZPVAv�gZ
')!l[|���#u1VRX
<	���/-dz$+�
+��
�
]@	

)
9
I
Y
i
y
�
�
�
�
�

]@fv�����]@
&6FV]���]�$���EX�)/�)>Y�EX�/�>Y�EX�/�>Y���)����]@(8HXhx�����
]��а �013!>54.#"!535&54>32�n}��CZ8'V�^Z�V)6XC���yn?{�ww�}?��]ru#g{�?R��VV��R?�{g��urV�qբbb��b;;N'U;
|�4�	
���
�;N;	vr	&�		N	&�	j	"�	h�			0(	0(	
8�X	&�	Copyright (c) Mark Simonson 2009-2010. All rights reserved.Anonymous Pro MinusRegularMarkSimonson: Anonymous Pro Minus: 2010Version 1.003AnonymousProMinusAnonymous Pro Minus is a trademark of Mark Simonson.Mark Simonsonhttp://www.ms-studio.comCopyright (c) 2009, Mark Simonson (http://www.ms-studio.com, mark@marksimonson.com), with Reserved Font Name Anonymous Pro Minus.

This Font Software is licensed under the SIL Open Font License, Version 1.1.
Copyright (c) 2009, Mark Simonson (http://www.ms-studio.com, mark@marksimonson.com), with Reserved Font Name Anonymous Pro Minus.

This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL


----------------------------------------------------------- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 -----------------------------------------------------------

PREAMBLE The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.

The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.

DEFINITIONS "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the copyright statement(s).

"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.

"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.

5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.

TERMINATION This license becomes null and void if any of the above conditions are not met.

DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
 part or in whole -- any of the components of the

Original Version, by changing formats or by porting the Font Software to a

new environment.



"Author" refers to any designer, engineer, programmer, technical

writer or other person who contributed to the Font Software.



PERMISSION & CONDITIONS

Permission is hereby granted, free of charge, to any person obtaining

a copy of the Font Software, to use, study, copy, merge, embed, modify,

redistribute, and sell modified and unmodified copies of the Font

Software, subject to the following conditions:



1) Neither the Font Software nor any of its individual components,

in Original or Modified Versions, may be sold by itself.



2) Original or Modified Versions of the Font Software may be bundled,

redistributed and/or sold with any software, provided that each copy

contains the above copyright notice and this license. These can be

included either as stand-alone text files, human-readable headers or

in the appropriate machine-readable metadata fields within text or

binary files as long as those fields can be easily viewed by the user.



3) No Modified Version of the Font Software may use the Reserved Font

Name(s) unless explicit written permission is granted by the corresponding

Copyright Holder. This restriction only applies to the primary font name as

presented to the users.



4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font

Software shall not be used to promote, endorse or advertise any

Modified Version, except to acknowledge the contribution(s) of the

Copyright Holder(s) and the Author(s) or with their explicit written

permission.



5) The Font Software, modified or unmodified, in part or in whole,

must be distributed entirely under this license, and must not be

distributed under any other license. The requirement for fonts to

remain under this license does not apply to any document created

using the Font Software.



TERMINATION

This license becomes null and void if any of the above conditions are

not met.



DISCLAIMER

THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF

MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT

OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE

COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,

INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL

DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM

OTHER DEALINGS IN THE FONT SOFTWARE.Copyright (c) Mark Simonson 2009-2010. All rights reserved.Anonymous Pro MinusRegularMarkSimonson: Anonymous Pro Minus: 2010Version 1.003AnonymousProMinusAnonymous Pro Minus is a trademark of Mark Simonson.Mark Simonsonhttp://www.ms-studio.comCopyright (c) 2009, Mark Simonson (http://www.ms-studio.com, mark@marksimonson.com), with Reserved Font Name Anonymous Pro Minus.

This Font Software is licensed under the SIL Open Font License, Version 1.1.
Copyright (c) 2009, Mark Simonson (http://www.ms-studio.com, mark@marksimonson.com), with Reserved Font Name Anonymous Pro Minus.

This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL


----------------------------------------------------------- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 -----------------------------------------------------------

PREAMBLE The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.

The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.

DEFINITIONS "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the copyright statement(s).

"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.

"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.

5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.

TERMINATION This license becomes null and void if any of the above conditions are not met.

DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
 part or in whole -- any of the components of the

Original Version, by changing formats or by porting the Font Software to a

new environment.



"Author" refers to any designer, engineer, programmer, technical

writer or other person who contributed to the Font Software.



PERMISSION & CONDITIONS

Permission is hereby granted, free of charge, to any person obtaining

a copy of the Font Software, to use, study, copy, merge, embed, modify,

redistribute, and sell modified and unmodified copies of the Font

Software, subject to the following conditions:



1) Neither the Font Software nor any of its individual components,

in Original or Modified Versions, may be sold by itself.



2) Original or Modified Versions of the Font Software may be bundled,

redistributed and/or sold with any software, provided that each copy

contains the above copyright notice and this license. These can be

included either as stand-alone text files, human-readable headers or

in the appropriate machine-readable metadata fields within text or

binary files as long as those fields can be easily viewed by the user.



3) No Modified Version of the Font Software may use the Reserved Font

Name(s) unless explicit written permission is granted by the corresponding

Copyright Holder. This restriction only applies to the primary font name as

presented to the users.



4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font

Software shall not be used to promote, endorse or advertise any

Modified Version, except to acknowledge the contribution(s) of the

Copyright Holder(s) and the Author(s) or with their explicit written

permission.



5) The Font Software, modified or unmodified, in part or in whole,

must be distributed entirely under this license, and must not be

distributed under any other license. The requirement for fonts to

remain under this license does not apply to any document created

using the Font Software.



TERMINATION

This license becomes null and void if any of the above conditions are

not met.



DISCLAIMER

THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF

MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT

OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE

COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,

INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL

DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM

OTHER DEALINGS IN THE FONT SOFTWARE.�E{p	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~�����������������������������������������������������������������������������������������������	�������������

��� !"#��$%&'()*+,-./0123456789:;<=>?@ABC��DEFGHIJKLMNOPQRSTUVWXYZ[\����]^_`abcdefghijklmnopqrstuv��wxyz{|}~��������������������������������������������������������������������������������������������������������������������������������	

 !"#$%&'()*+,-./0123456789:�;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvw.nullDeltauni00A0Europeriodcenteredmacroncommaaccentuni00ADAmacronamacronAbreveabreveAogonekaogonekCcircumflexccircumflex
Cdotaccent
cdotaccentDcarondcaronDcroatdcroatEmacronemacronEbreveebreve
Edotaccent
edotaccentEogonekeogonekEcaronecaronGcircumflexgcircumflex
Gdotaccent
gdotaccentGcommaaccentgcommaaccentHcircumflexhcircumflexHbarhbarItildeitildeImacronimacronIbreveibreveIogonekiogonek
IdotaccentIJijJcircumflexjcircumflexKcommaaccentkcommaaccentkgreenlandicLacutelacuteLcommaaccentlcommaaccentLcaronlcaronLdotldotNacutenacuteNcommaaccentncommaaccentNcaronncaronnapostropheEngengOmacronomacronObreveobreve
Ohungarumlaut
ohungarumlautRacuteracuteRcommaaccentrcommaaccentRcaronrcaronSacutesacuteScircumflexscircumflexTcommaaccenttcommaaccentTcarontcaronTbartbarUtildeutildeUmacronumacronUbreveubreveUringuring
Uhungarumlaut
uhungarumlautUogonekuogonekWcircumflexwcircumflexYcircumflexycircumflexZacutezacute
Zdotaccent
zdotaccentlongsAEacuteaeacuteOslashacuteoslashacuteScommaaccentscommaaccentuni021Auni021Btonos
dieresistonos
AlphatonosEpsilontonosEtatonos	IotatonosOmicrontonosUpsilontonos
OmegatonosiotadieresistonosAlphaBetaGammauni0394EpsilonZetaEtaThetaIotaKappaLambdaMuNuXiOmicronPiRhoSigmaTauUpsilonPhiChiPsiIotadieresisUpsilondieresis
alphatonosepsilontonosetatonos	iotatonosupsilondieresistonosalphabetagammadeltaepsilonzetaetathetaiotakappalambdauni03BCnuxiomicronrhosigma1sigmatauupsilonphichipsiomegaiotadieresisupsilondieresisomicrontonosupsilontonos
omegatonos	afii10023	afii10051	afii10052	afii10053	afii10054	afii10055	afii10056	afii10057	afii10058	afii10059	afii10060	afii10061	afii10062	afii10145	afii10017	afii10018	afii10019	afii10020	afii10021	afii10022	afii10024	afii10025	afii10026	afii10027	afii10028	afii10029	afii10030	afii10031	afii10032	afii10033	afii10034	afii10035	afii10036	afii10037	afii10038	afii10039	afii10040	afii10041	afii10042	afii10043	afii10044	afii10045	afii10046	afii10047	afii10048	afii10049	afii10065	afii10066	afii10067	afii10068	afii10069	afii10070	afii10072	afii10073	afii10074	afii10075	afii10076	afii10077	afii10078	afii10079	afii10080	afii10081	afii10082	afii10083	afii10084	afii10085	afii10086	afii10087	afii10088	afii10089	afii10090	afii10091	afii10092	afii10093	afii10094	afii10095	afii10096	afii10097	afii10071	afii10099	afii10100	afii10101	afii10102	afii10103	afii10104	afii10105	afii10106	afii10107	afii10108	afii10109	afii10110	afii10193	afii10050	afii10098uni1E02uni1E03uni1E0Auni1E0Buni1E1Euni1E1Funi1E40uni1E41uni1E56uni1E57uni1E60uni1E61uni1E6Auni1E6BWgravewgraveWacutewacute	Wdieresis	wdieresisYgraveygrave	afii00208	afii61352uni2303uni2318uni2324	optionkeyerasetotherightuni237duni2388uni23ceuni2423SF100000SF110000SF010000SF030000SF020000SF040000SF080000SF090000SF060000SF070000SF050000SF430000SF240000SF510000SF520000SF390000SF220000SF210000SF250000SF500000SF490000SF380000SF280000SF270000SF260000SF360000SF370000SF420000SF190000SF200000SF230000SF470000SF480000SF410000SF450000SF460000SF400000SF540000SF530000SF440000blackdiamond	checkmarkshift	shiftlockverticaltabcopybackendtabinserttab	appleopenuni03A9	
��PKr9�Z
�k-��!tests/302_Imagick_claheImage.phptnu�[���--TEST--
Test Imagick, claheImage
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('claheImage'));
?>
--FILE--
<?php


function claheImage() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');
    $imagick->claheImage(
		10,
		10,
		8,
		2
	);
//    $imagick->writeImage(__DIR__ . '/claheImage_output_image.png');
    $imagick->getImageBlob();
}

claheImage() ;
echo "Ok";
?>
--EXPECTF--
Ok
PKr9�Z�b5���.tests/209_ImagickDraw_setFontWeight_basic.phptnu�[���--TEST--
Test ImagickDraw, setFontWeight
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

require_once(dirname(__FILE__) . '/functions.inc');

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setFontWeight($fillColor, $strokeColor, $backgroundColor) {

    $draw = new \ImagickDraw();
    setFontForImagickDraw($draw);

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);

    $draw->setStrokeWidth(1);

    $draw->setFontSize(36);

    $draw->setFontWeight(100);
    $draw->annotation(50, 50, "Lorem Ipsum!");

    $draw->setFontWeight(200);
    $draw->annotation(50, 100, "Lorem Ipsum!");

    $draw->setFontWeight(400);
    $draw->annotation(50, 150, "Lorem Ipsum!");

    $draw->setFontWeight(800);
    $draw->annotation(50, 200, "Lorem Ipsum!");

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");
    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setFontWeight($fillColor, $strokeColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�i_h��-tests/079_Imagick_getImageGeometry_basic.phptnu�[���--TEST--
Test Imagick, getImageGeometry
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function getImageGeometry() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

getImageGeometry() ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z$͏���-tests/202_ImagickDraw_setFillColor_basic.phptnu�[���--TEST--
Test ImagickDraw, setFillColor
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setFillColor($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $draw->setStrokeOpacity(1);
    $draw->setStrokeWidth(1.5);
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->rectangle(50, 50, 150, 150);

    $draw->setFillColor("rgb(200, 32, 32)");
    $draw->rectangle(200, 50, 300, 150);

    $image = new \Imagick();
    $image->newImage(500, 500, $backgroundColor);
    $image->setImageFormat("png");

    $image->drawImage($draw);

    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setFillColor($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�ZZ� ���$tests/286_Imagick_setMask_basic.phptnu�[���--TEST--
Test Imagick, setImageMask basic
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('getImageMask', 'setImageMask'));
?>
--FILE--
<?php

// TODO - this doesn't really test that it works...

$imagick = new \Imagick();
$imagick->newPseudoImage(640, 480, "magick:logo");

$default_mask = $imagick->getImageMask(Imagick::PIXELMASK_READ);

if ($default_mask !== null) {
	echo "Default mask is not null but\n";
	var_dump($default_mask);
}

$mask = new Imagick();
$mask->newPseudoImage(480, 640, "gradient:black-white");
$mask->transposeImage();

$imagick->setImageMask($mask, Imagick::PIXELMASK_READ);

$mask = $imagick->getImageMask(Imagick::PIXELMASK_READ);
$mask->setImageFormat('png');
//$mask->writeImage(__DIR__ . "/i_am_a_mask.png");
//if ( !== Imagick::PIXELMASK_READ) {
//    echo "Failed to set/get Imagick::PIXELMASK_READ";
//};

$imagick->setImageMask($mask, Imagick::PIXELMASK_WRITE);

//$imagick->blurImage(15, 4);
//$imagick->writeImage(__DIR__ . "/mask_test.png");

//if ($imagick->getImageMask() !== Imagick::PIXELMASK_WRITE) {
//        echo "Failed to set/get Imagick::PIXELMASK_WRITE";
//    };

// This can only be tested MagickLibVersion >= 0x708
// so should probably be in a test by itself, once it's figured out
// what it does.
// $imagick->setImageMask($mask, Imagick::PIXELMASK_COMPOSITE);
//if ($imagick->getImageMask() !== Imagick::PIXELMASK_COMPOSITE) {
//    echo "Failed to set/get Imagick::PIXELMASK_COMPOSITE";
//};

$imagick->setImageMask($mask, -1);
// $unknown_result = $imagick->getImageMask(Imagick::PIXELMASK_READ);
// todo echo "not sure what -1 should be: $unknown_result \n";

echo "Ok";
?>
--EXPECTF--
OkPKr9�Z~Nz(tests/111_Imagick_rotateImage_basic.phptnu�[���--TEST--
Test Imagick, rotateImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$angle = 45;
$color = 'rgb(127, 127, 127)';

function rotateImage($angle, $color) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->rotateimage($color, $angle);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

rotateImage($angle, $color) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z����-tests/284_ini_settings_set_truthy_number.phptnu�[���--TEST--
OpenMP segfault hacks

--INI--
imagick.shutdown_sleep_count=20
imagick.set_single_thread=1
--SKIPIF--
<?php 


require_once(dirname(__FILE__) . '/skipif.inc');
 
?>
--FILE--
<?php


$sleepCount = intval(ini_get('imagick.shutdown_sleep_count'));
$setSingleThread = ini_get('imagick.set_single_thread');

if ($sleepCount != 20) {
    echo "imagick.shutdown_sleep_count is not set to 10 but instead " . var_export($sleepCount, true) ."\n";
}

if ($setSingleThread != 1) {
    echo "imagick.set_single_thread setting is not true but instead " . var_export($setSingleThread, true) ."\n";
}


echo "Complete".PHP_EOL;
?>
--EXPECTF--
Complete
PKr9�Z�Lm-tests/044_Imagick_colorMatrixImage_basic.phptnu�[���--TEST--
Test Imagick, colorMatrixImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
checkFormatPresent('png');
?>
--FILE--
<?php

$colorMatrix = array (
  0 => 1.5,
  1 => 0,
  2 => 0,
  3 => 0,
  4 => -0.157,
  5 => 0,
  6 => 1,
  7 => 0.5,
  8 => 0,
  9 => -0.157,
  10 => 0,
  11 => 0,
  12 => 0.5,
  13 => 0,
  14 => 0.5,
  15 => 0,
  16 => 0,
  17 => 0,
  18 => 1,
  19 => 0,
  20 => 0,
  21 => 0,
  22 => 0,
  23 => 0,
  24 => 1,
);

function colorMatrixImage($colorMatrix) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    //$imagick->setImageOpacity(1);

    //A color matrix should look like:
    //    $colorMatrix = [
    //        1.5, 0.0, 0.0, 0.0, 0.0, -0.157,
    //        0.0, 1.0, 0.5, 0.0, 0.0, -0.157,
    //        0.0, 0.0, 1.5, 0.0, 0.0, -0.157,
    //        0.0, 0.0, 0.0, 1.0, 0.0,  0.0,
    //        0.0, 0.0, 0.0, 0.0, 1.0,  0.0,
    //        0.0, 0.0, 0.0, 0.0, 0.0,  1.0
    //    ];

    $background = new \Imagick();
    $background->newPseudoImage($imagick->getImageWidth(), $imagick->getImageHeight(),  "pattern:checkerboard");

    $background->setImageFormat('png');

    $imagick->setImageFormat('png');
    $imagick->colorMatrixImage($colorMatrix);
    
    $background->compositeImage($imagick, \Imagick::COMPOSITE_ATOP, 0, 0);

    $bytes = $background->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

colorMatrixImage($colorMatrix) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z"ckuJJ0tests/113_Imagick_rotationalBlurImage_basic.phptnu�[���--TEST--
Test Imagick, rotationalBlurImage
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); 

checkClassMethods('Imagick', array('rotationalBlurImage'));

?>
--FILE--
<?php


function rotationalBlurImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->rotationalBlurImage(3);
    $imagick->rotationalBlurImage(5);
    $imagick->rotationalBlurImage(7);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

rotationalBlurImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�r@W1tests/222_ImagickDraw_setTextAlignment_basic.phptnu�[���--TEST--
Test ImagickDraw, setTextAlignment
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

require_once(dirname(__FILE__) . '/functions.inc');

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setTextAlignment($strokeColor, $fillColor, $backgroundColor) {
    $draw = new \ImagickDraw();
    setFontForImagickDraw($draw);
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(1);
    $draw->setFontSize(36);

    $draw->setTextAlignment(\Imagick::ALIGN_LEFT);
    $draw->annotation(250, 75, "Lorem Ipsum!");
    $draw->setTextAlignment(\Imagick::ALIGN_CENTER);
    $draw->annotation(250, 150, "Lorem Ipsum!");
    $draw->setTextAlignment(\Imagick::ALIGN_RIGHT);
    $draw->annotation(250, 225, "Lorem Ipsum!");
    $draw->line(250, 0, 250, 500);

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");
    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setTextAlignment($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z<v~3tests/139_Imagick_sigmoidalContrastImage_basic.phptnu�[���--TEST--
Test Imagick, sigmoidalContrastImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$sharpening = 1;
$midpoint = 4;
$sigmoidalContrast = 0.5;

function sigmoidalContrastImage($sharpening, $midpoint, $sigmoidalContrast) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    //Need some stereo image to work with.
    $imagick->sigmoidalcontrastimage(
        $sharpening, //sharpen 
        $midpoint,
        $sigmoidalContrast * \Imagick::getQuantum()
    );
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

sigmoidalContrastImage($sharpening, $midpoint, $sigmoidalContrast) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�X��eetests/021-countable.phptnu�[���--TEST--
Test countable interface
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); 

if (!extension_loaded ('spl'))
	die ('skip SPL is needed');
?>
--FILE--
<?php


$imagick = new Imagick(array (
						'magick:rose',
						'magick:rose',
						'magick:rose',
));

echo count ($imagick) . PHP_EOL;
echo 'done' . PHP_EOL;
?>
--EXPECT--
3
donePKr9�Z�^�||,tests/127_Imagick_progressMonitor_basic.phptnu�[���--TEST--
Test Imagick, progressMonitor
--SKIPIF--
<?php

require_once(dirname(__FILE__) . '/skipif.inc'); 
checkClassMethods('Imagick', array('setProgressMonitor'));
?>
--FILE--
<?php

$radius = 5;
$sigma = 1;

if (property_exists('Imagick', 'RESOURCETYPE_THREAD')) {
	Imagick::setResourceLimit(\Imagick::RESOURCETYPE_THREAD, 8);
}

$debug = "";
$status = 'Not cancelled';
$startTime = time();

$callback = function ($offset, $span) use (&$status, $startTime, $debug) {

	static $x = 0;

	if (((100 * $offset) / $span)  > 20) {
		$status = "Processing cancelled";
		return false;
	}

	$nowTime = time();

	$debug .= "$x: nowTime $nowTime - startTime $startTime".PHP_EOL;
	$x++;

	if ($nowTime - $startTime > 5) {
		$status = "Processing cancelled";
		return false;
	}

	return true;
};

$imagick = new \Imagick();
$imagick->newPseudoImage(640, 480, "magick:logo");

$imagick->setProgressMonitor($callback);

try {

	$imagick->charcoalImage($radius, $sigma);
	$bytes = $imagick->getImageBlob();
	echo "Progress monitor failed to interrupt.".PHP_EOL;
	echo $debug;
}
catch(\Exception $e) {
	echo $status.PHP_EOL;
}
?>
--EXPECTF--
Processing cancelledPKr9�Z)>O���)tests/068_Imagick_enhanceImage_basic.phptnu�[���--TEST--
Test Imagick, enhanceImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function enhanceImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->enhanceImage();
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

enhanceImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�ZFJ�*tests/050_Imagick_distortImage_Affine.phptnu�[���--TEST--
Test Imagick, distortImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$distortion = 1;

        $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
        $points = array(
            0,    0, 
            25,  25,
            100,  0, 
            100, 50
        );

        $imagick->setimagebackgroundcolor("#fad888");
        $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_BACKGROUND );
        $imagick->distortImage(  \Imagick::DISTORTION_AFFINE, $points, TRUE );
        header( "Content-Type: image/jpeg" );
    $bytes = $imagick;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 

echo "Ok";
?>
--EXPECTF--
OkPKr9�Z��hh1tests/287_Imagick_GetImageChannelRange_basic.phptnu�[���--TEST--
Test Imagick, GetImageChannelRange basic
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--XFAIL--
Tests are not stable across ImageMagick versions.
--FILE--
<?php

$imagick = new \Imagick();
$imagick->newPseudoImage(640, 480, "gradient:rgb(0,32,32)-rgb(128,255,255)");

$redChannelRange = $imagick->getImageChannelRange(\Imagick::CHANNEL_RED);
$greenChannelRange = $imagick->getImageChannelRange(\Imagick::CHANNEL_GREEN);

$expectedRedMinima = (Imagick::getQuantum() * 0.0) / 255;
$expectedRedMaxima = (Imagick::getQuantum() * 128.0) / 255;

$expectedGreenMinima = (Imagick::getQuantum() * 32.0) / 255;
$expectedGreenMaxima = (Imagick::getQuantum() * 255.0) / 255;

// Floating point math. This is absolutely going to blow up
// on some platforms. But as finding out which would be interesting
// will leave it like this for now.
if ($expectedRedMinima !== $redChannelRange['minima']) {
	printf(
		"Unexpected red minima. Was expecting %s but have %s\n",
		$expectedRedMinima,
		$redChannelRange['minima']
	);
}
if ($expectedRedMaxima !== $redChannelRange['maxima']) {
	printf(
		"Unexpected red maxima. Was expecting %s but have %s\n",
		$expectedRedMinima,
		$redChannelRange['maxima']
	);
}


if ($expectedGreenMinima !== $greenChannelRange['minima']) {
	printf(
		"Unexpected green minima. Was expecting %s but have %s\n",
		$expectedGreenMinima,
		$greenChannelRange['minima']
	);
}
if ($expectedGreenMaxima !== $greenChannelRange['maxima']) {
	printf(
		"Unexpected green maxima. Was expecting %s but have %s\n",
		$expectedGreenMaxima,
		$greenChannelRange['maxima']
	);
}

echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�*Aw��(tests/190_ImagickDraw_popDefs_basic.phptnu�[���--TEST--
Test ImagickDraw, popDefs
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function popDefs($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setstrokeOpacity(1);
    $draw->setStrokeWidth(2);
    $draw->setFontSize(72);
    $draw->pushDefs();
    $draw->setStrokeColor('white');
    $draw->rectangle(50, 50, 200, 200);
    $draw->popDefs();

    $draw->rectangle(300, 50, 450, 200);

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");

    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

popDefs($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z��r'��'tests/178_ImagickDraw_circle_basic.phptnu�[���--TEST--
Test ImagickDraw, circle
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';
$originX = 250;
$originY = 250;
$endX = 400;
$endY = 400;

function circle($strokeColor, $fillColor, $backgroundColor, $originX, $originY, $endX, $endY) {

    //Create a ImagickDraw object to draw into.
    $draw = new \ImagickDraw();

    $strokeColor = new \ImagickPixel($strokeColor);
    $fillColor = new \ImagickPixel($fillColor);

    $draw->setStrokeOpacity(1);
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);

    $draw->setStrokeWidth(2);
    $draw->setFontSize(72);

    $draw->circle($originX, $originY, $endX, $endY);

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");
    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

circle($strokeColor, $fillColor, $backgroundColor, $originX, $originY, $endX, $endY) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z_p��(("tests/254_getConfigureOptions.phptnu�[���--TEST--
Test Imagick::getConfigureOptions
--SKIPIF--
<?php

require_once(dirname(__FILE__) . '/skipif.inc');

checkClassMethods('Imagick', array('getconfigureoptions'));


?>
--FILE--
<?php

$allOptions = Imagick::getConfigureOptions();

if (!is_array($allOptions)) {
	echo "Failed to return array".PHP_EOL;
	var_dump($allOptions);
}
else if (count($allOptions) == 0) {
	echo "allOptions is empty".PHP_EOL;
}


$optionsStartingWithC = Imagick::getConfigureOptions("Q*");

if (!is_array($optionsStartingWithC)) {
	echo "Failed to return array".PHP_EOL;
	var_dump($optionsStartingWithC);
}
else if (count($optionsStartingWithC) == 0) {
	echo "optionsStartingWithC is empty".PHP_EOL;
	echo "All options are:\n";
	var_dump(Imagick::getConfigureOptions());
}

//Example output on Debian
//
//array(38) {
//  ["CC"]=>
//  string(3) "gcc"
//  ["CFLAGS"]=>
//  string(186) "-I/usr/include/libxml2 -I/usr/include/libpng16 -I/usr/include/freetype2  -fopenmp -Wall -g -O2 -mtune=core2 -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16"
//  ["CODER_PATH"]=>
//  string(56) "/usr/local/lib/ImageMagick-7.0.11/modules-Q16HDRI/coders"
//  ["CONFIGURE"]=>
//  string(155) "./configure  '--with-quantum-depth=16' '--with-magick-plus-plus=no' '--without-perl' '--disable-static' '--disable-docs' '--with-jpeg=yes' '--with-png=yes'"
//  ["CONFIGURE_PATH"]=>
//  string(29) "/usr/local/etc/ImageMagick-7/"
//  ["COPYRIGHT"]=>
//  string(46) "Copyright (C) 1999-2021 ImageMagick Studio LLC"
//  ["CPPFLAGS"]=>
//  string(34) "-I/usr/local/include/ImageMagick-7"
//  ["CXX"]=>
//  string(3) "g++"
//  ["CXXFLAGS"]=>
//  string(9) " -pthread"
//  ["DEFS"]=>
//  string(15) "-DHAVE_CONFIG_H"
//  ["DELEGATES"]=>
//  string(33) "freetype jng jpeg png ps xml zlib"
//  ["DISTCHECK_CONFIG_FLAGS"]=>
//  string(217) " --disable-deprecated  --with-quantum-depth=16  --with-jemalloc=no  --with-umem=no  --with-autotrace=no  --with-fftw=no  --with-gslib=no  --with-fontpath=  --with-jxl=no  --with-rsvg=no  --with-wmf=no  --with-perl=no "
//  ["DOCUMENTATION_PATH"]=>
//  string(34) "/usr/local/share/doc/ImageMagick-7"
//  ["EXEC-PREFIX"]=>
//  string(10) "/usr/local"
//  ["EXECUTABLE_PATH"]=>
//  string(14) "/usr/local/bin"
//  ["FEATURES"]=>
//  string(22) "DPC HDRI Cipher OpenMP"
//  ["FILTER_PATH"]=>
//  string(57) "/usr/local/lib/ImageMagick-7.0.11/modules-Q16HDRI/filters"
//  ["GIT_REVISION"]=>
//  string(24) "18571:309fcfa1c:20210328"
//  ["HOST"]=>
//  string(19) "x86_64-pc-linux-gnu"
//  ["INCLUDE_PATH"]=>
//  string(32) "/usr/local/include/ImageMagick-7"
//  ["LDFLAGS"]=>
//  string(17) "-L/usr/local/lib "
//  ["LIB_VERSION"]=>
//  string(5) "0x70B"
//  ["LIB_VERSION_NUMBER"]=>
//  string(8) "7,0,11,6"
//  ["LIBRARY_PATH"]=>
//  string(33) "/usr/local/lib/ImageMagick-7.0.11"
//  ["LIBS"]=>
//  string(96) "    -lfreetype  -ljpeg    -lpng16                       -lxml2  -lz     -lm    -lpthread  -lgomp"
//  ["MAGICK_TEMPORARY_PATH"]=>
//  string(4) "/tmp"
//  ["NAME"]=>
//  string(11) "ImageMagick"
//  ["PCFLAGS"]=>
//  string(65) "-fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16"
//  ["PREFIX"]=>
//  string(10) "/usr/local"
//  ["QuantumDepth"]=>
//  string(2) "16"
//  ["RELEASE_DATE"]=>
//  string(10) "2021-03-28"
//  ["SHARE_PATH"]=>
//  string(30) "/usr/local/share/ImageMagick-7"
//  ["SHAREARCH_PATH"]=>
//  string(48) "/usr/local/lib/ImageMagick-7.0.11/config-Q16HDRI"
//  ["TARGET_CPU"]=>
//  string(6) "x86_64"
//  ["TARGET_OS"]=>
//  string(9) "linux-gnu"
//  ["TARGET_VENDOR"]=>
//  string(2) "pc"
//  ["VERSION"]=>
//  string(6) "7.0.11"
//  ["WEBSITE"]=>
//  string(23) "https://imagemagick.org"
//}



// Examples of output on nixos
//array(5) {
//  ["DELEGATES"]=>
//  string(102) "bzlib cairo djvu fontconfig freetype heic jng jp2 jpeg lcms lzma openexr png rsvg tiff webp x xml zlib"
//  ["FEATURES"]=>
//  string(28) "Cipher DPC HDRI OpenMP(4.5) "
//  ["MAGICK_TEMPORARY_PATH"]=>
//  string(4) "/tmp"
//  ["NAME"]=>
//  string(11) "ImageMagick"
//  ["QuantumDepth"]=>
//  string(3) "Q16"
//}








if (!(count($optionsStartingWithC) < count($allOptions))) {
	echo "";
	var_dump($optionsStartingWithC);
	var_dump($allOptions);
}

foreach ($optionsStartingWithC as $key => $value) {
	$key = strtolower($key);

	if (stripos($key, "q") !== 0) {
		echo "key $key does not start with c".PHP_EOL;
	}
}

echo "Ok";

?>
--EXPECTF--
OkPKr9�Z?v�m��-tests/200_ImagickDraw_setClipUnits_basic.phptnu�[���--TEST--
Test ImagickDraw, setClipUnits
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setClipUnits($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeOpacity(1);
    $draw->setStrokeWidth(2);
    $clipPathName = 'testClipPath';
    $draw->setClipUnits(\Imagick::RESOLUTION_PIXELSPERINCH);
    $draw->pushClipPath($clipPathName);
    $draw->rectangle(0, 0, 250, 250);
    $draw->popClipPath();
    $draw->setClipPath($clipPathName);

    //RESOLUTION_PIXELSPERINCH
    //RESOLUTION_PIXELSPERCENTIMETER

    $draw->rectangle(200, 200, 300, 300);
    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");

    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setClipUnits($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�,��4tests/214_ImagickDraw_setStrokeDashOffset_basic.phptnu�[���--TEST--
Test ImagickDraw, setStrokeDashOffset
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setStrokeDashOffset($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(4);
    $draw->setStrokeDashArray(array(20, 20));
    $draw->setStrokeDashOffset(0);
    $draw->rectangle(100, 50, 225, 175);

    //Start the dash effect halfway through the solid portion
    $draw->setStrokeDashOffset(10);
    $draw->rectangle(275, 50, 400, 175);

    //Start the dash effect on the space portion
    $draw->setStrokeDashOffset(20);
    $draw->rectangle(100, 200, 225, 350);
    $draw->setStrokeDashOffset(5);
    $draw->rectangle(275, 200, 400, 350);

    $image = new \Imagick();
    $image->newImage(500, 400, $backgroundColor);
    $image->setImageFormat("png");
    $image->drawImage($draw);

    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setStrokeDashOffset($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�	<,,*tests/046_Imagick_contrastImage_basic.phptnu�[���--TEST--
Test Imagick, contrastImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$contrastType = 1;

function contrastImage($contrastType) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    if ($contrastType != 2) {
        $imagick->contrastImage($contrastType);
    }

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

contrastImage($contrastType) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�ZB�Qk*tests/312_Imagick_colorThresholdImage.phptnu�[���--TEST--
Test Imagick, colorThresholdImage
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('colorThresholdImage'));
?>
--FILE--
<?php

function colorThresholdImage() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');
    $imagick->colorThresholdImage(
        "rgb(10, 10, 10)",
        "rgb(240, 240, 240)"
    );
//    $imagick->writeImage(__DIR__ . '/colorThresholdImage_output_image.png');
    $imagick->getImageBlob();
}

colorThresholdImage() ;
echo "Ok";
?>
--EXPECTF--
Ok
PKr9�Z{����)tests/088_Imagick_implodeImage_basic.phptnu�[���--TEST--
Test Imagick, implodeImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function implodeImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->implodeImage(0.0001);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 

}

implodeImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z��k��	�	
tests/php.gifnu�[���GIF89axC�j��97G(%*��⡤���粴�CBX������RRr�����ު��LKc[\����;8<nq�jm�ac�uy�{~����ƌ�����kk�NNkqt�zz����rt�ts����Z[~���{}����mp�rv���Ȼ��tx���������꒒�df�kn���Δ��.+/SQh���lj�\[v���fh�hj����1.9��Ӝ��UVx��ʖ�Ł��gi�?=P���^`���Ȍ�����WX|������" lo�����w{�vx�_^}���no�sw�"������YVW����������������trs��񞜝���KHI���gde����GF_��훜�ik�os������ٸ�ך�̧����뚜�fd�hg����np����������il����!�j,xC��j�����������������������m?ms����?yy6>qLL>>
2A<B-I"99"/)�¡
}MPP}|QQ*r��t��B3-�W(%	���&q|.llu.��2�"�,@��7�᤬@�F�	?;�L���E5Al`C�G$�5�@�ɓ(S�\yr\	v�A�+CD\��	�/�0B�ˣH����&�#G�XrăΝ�~ht�##X(K6�:,�@��)3��.2��@u
HR��_�`,Q���<	��e�|�r�˘1|���
֬Q�A��<F���d��p�M�K��J�,Ys�;�Ea���+1p�¼���ȓv�]�Ț��~��cD�W� Ӽ���^yp @p@�0�D�WS�9�)���p&s��2�J]��\�R1��C�Q�24�@I�@b��f%&�@'I��`�')7�_ਔE�@��3����5�$�G�Ƅb\�$�,1�����4P�#H`�G}�El���YtQ@]�T�g�`�I�)(�]ЀR@ ��� b)E�r)Vj\| J]lQi�4l�E]�h���N�^tq(R#���l#čI���[xA�'�)c` �x
�j$5�N�H
"��fR�l�a@`^l�"�]੸���E�H�-v����de}!!��y�������6GC�,`H?�[��m��3���V���Ձ�c��9֤;�9��N��N�ścp�F�Zd�j�p�qƹ��%K
@�!��:�����-J4�yj�����
|A�YhQ5���E���a�R4�:� �dY�湩�Y|�t���J�\΂3w��*}0�w��
�!�&�e�����:S�tJ1�wF4m�J���E�,u�
���P_O8Ƶ'm�Y���*tҐ�Q��:KE��F8s��r������J����^p����N� H�1]��T{��7w�J���E�c����S
�%�P�n�[�I����9�ӏ��,�c	�֟�	��)������T�%�cN:����$�X�L�xmB�"�� �/�� �E��j�by��tO?,O��
�(!YtD�'���B�C�1|�'LI�&��qb�P�*w+�a!Z\Z�C.�Q���0F�
�~�� J��3�e�d��H�Qq%�S��:p���G�UZe(�p���x�
�h�	b���(�@�a��,ͣ��Ё�DHch��N�C��\�a!vʡI�u�H���C�(�_�<�+��Db���0��8'D�y��X��/�a�R@f�𪭩�9mX�pg��y�x�	$�I�0R\f �P�vП����e2��I)��F�!��
c���f9K2pa�BS�HJV�D\`��.(��Ҥ(e��2C��'P'R`ȅЃ�#�i@�����J�C.�9^�0�Q��G�t,K�!���)�L$S}$�4�<Y�(r��x"e-hr�B���
�X��SNi)�ye�A�hL�J��l��r�j�5���ǪDwR�$e4zYF�`1�@�@�zz�$ys��Ӂ@���Hj%�Ŵbak���F���=��a#��'L@�R���K]޽֞ԥ.��J2��@���*=w])�W�p-e�p0'D���H�P��նׯ'��rA�)�����_Q�Y9�������W�%:�܃�>�Ί����@`��`npC�Yb����b�"	% �`<�8) P�$&��x)H�t@!�!�������
-�xx���)���g�GI|�A�цp��/@���>��~��P�3"<4�q��q;ߙ"ž)@�JS�}�p��iNK�ӟ*P�pi���7�Npl 1�F
>PX*Py��w=�%�lia
c�М�7EPn801�Z1)P<�
l -�v��Bl�p�
#��P�f?�܋Apt����w�;PKr9�Z
Q��*tests/072_Imagick_evaluateImage_basic.phptnu�[���--TEST--
Test Imagick, evaluateImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
checkFormatPresent('png');
?>
--FILE--
<?php

$evaluateType = 1;
$firstTerm = 0.5;
$gradientStartColor = 'black';
$gradientEndColor = 'white';

$evaluateTypes = array(
	\Imagick::EVALUATE_ADD,
	\Imagick::EVALUATE_AND,
	\Imagick::EVALUATE_MAX,
	\Imagick::EVALUATE_MIN,
	\Imagick::EVALUATE_OR,
	\Imagick::EVALUATE_SET,
	\Imagick::EVALUATE_SUBTRACT,
	\Imagick::EVALUATE_XOR,
	\Imagick::EVALUATE_THRESHOLD,
	\Imagick::EVALUATE_THRESHOLDBLACK,
	\Imagick::EVALUATE_THRESHOLDWHITE,
	\Imagick::EVALUATE_ADDMODULUS,

	\Imagick::EVALUATE_DIVIDE,
	\Imagick::EVALUATE_MULTIPLY,
	\Imagick::EVALUATE_RIGHTSHIFT,
	\Imagick::EVALUATE_LEFTSHIFT,
	\Imagick::EVALUATE_POW,
	\Imagick::EVALUATE_LOG,
	\Imagick::EVALUATE_GAUSSIANNOISE,
	\Imagick::EVALUATE_IMPULSENOISE,
	\Imagick::EVALUATE_LAPLACIANNOISE,
	\Imagick::EVALUATE_MULTIPLICATIVENOISE,
	\Imagick::EVALUATE_POISSONNOISE,
	\Imagick::EVALUATE_UNIFORMNOISE,
	\Imagick::EVALUATE_COSINE,
	\Imagick::EVALUATE_SINE,
);



function evaluateImage($evaluateType, $firstTerm, $gradientStartColor, $gradientEndColor) {
    $imagick = new \Imagick();
    $size = 400;
    $imagick->newPseudoImage(
        $size,
        $size,
        "gradient:$gradientStartColor-$gradientEndColor"
    );
    
    $quantumScaledTypes = array(
        \Imagick::EVALUATE_ADD,
        \Imagick::EVALUATE_AND,
        \Imagick::EVALUATE_MAX,
        \Imagick::EVALUATE_MIN,
        \Imagick::EVALUATE_OR,
        \Imagick::EVALUATE_SET,
        \Imagick::EVALUATE_SUBTRACT,
        \Imagick::EVALUATE_XOR,
        \Imagick::EVALUATE_THRESHOLD,
        \Imagick::EVALUATE_THRESHOLDBLACK,
        \Imagick::EVALUATE_THRESHOLDWHITE,
        \Imagick::EVALUATE_ADDMODULUS,
    );

    $unscaledTypes = array(
        \Imagick::EVALUATE_DIVIDE,
        \Imagick::EVALUATE_MULTIPLY,
        \Imagick::EVALUATE_RIGHTSHIFT,
        \Imagick::EVALUATE_LEFTSHIFT,
        \Imagick::EVALUATE_POW,
        \Imagick::EVALUATE_LOG,
        \Imagick::EVALUATE_GAUSSIANNOISE,
        \Imagick::EVALUATE_IMPULSENOISE,
        \Imagick::EVALUATE_LAPLACIANNOISE,
        \Imagick::EVALUATE_MULTIPLICATIVENOISE,
        \Imagick::EVALUATE_POISSONNOISE,
        \Imagick::EVALUATE_UNIFORMNOISE,
        \Imagick::EVALUATE_COSINE,
        \Imagick::EVALUATE_SINE,
    );

    if (in_array($evaluateType, $unscaledTypes)) {
        $imagick->evaluateimage($evaluateType, $firstTerm);
    }
    else if (in_array($evaluateType, $quantumScaledTypes)) {
        $imagick->evaluateimage($evaluateType, $firstTerm * \Imagick::getQuantum());
    }
    else {
        throw new \Exception("Evaluation type $evaluateType is not listed as either scaled or unscaled");
    }

    $imagick->setimageformat('png');
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

foreach ($evaluateTypes as $evaluateType) {
	evaluateImage($evaluateType, $firstTerm, $gradientStartColor, $gradientEndColor) ;
}
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�;��
tests/OFL.txtnu�[���Copyright (c) 2009, Mark Simonson (http://www.ms-studio.com, mark@marksimonson.com),
with Reserved Font Name Anonymous Pro Minus.

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded, 
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
PKr9�Z??���*tests/327_Imagick_polaroidImage_basic.phptnu�[���--TEST--
Test Imagick, polaroidImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x631;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

require_once(dirname(__FILE__) . '/functions.inc');

function polaroidImage() {
    $src1 = new \Imagick();
    $src1->newPseudoImage(640, 480, "magick:logo");

    $imagickDraw = new \ImagickDraw();
    $font = findDefaultFont();

    $imagickDraw->setFont($font);

    $src1->polaroidImage($imagickDraw, 15);

    $src1->setImageFormat('png');
    $bytes = $src1->getImagesBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

polaroidImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z@����&tests/047_Imagick_convolveImage_7.phptnu�[���--TEST--
Test Imagick, convolveImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x700;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$bias = 0.5;
$kernelMatrix = array (
    array (-1, -1, -1),
    array (-1, 8, -1),
    array( -1, -1, -1),
);

function convolveImage($bias, $kernelMatrix) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $kernel = ImagickKernel::fromMatrix($kernelMatrix);
    $imagick->convolveImage($kernel);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

convolveImage($bias, $kernelMatrix) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Zf$e���tests/013-read-filehandle.phptnu�[���--TEST--
Imagick::readImageFile test
--SKIPIF--
<?php 
	require_once(dirname(__FILE__) . '/skipif.inc');
	checkFormatPresent('jpg');
?>
--FILE--
<?php

$file = dirname(__FILE__) . '/__tmp_rose.jpg';

$imagick = new Imagick('magick:rose');
$imagick->setImageFormat('jpg');
$imagick->writeImage($file);

$imagick->clear();

$handle = fopen($file, 'rb');
$imagick->readImageFile($handle);

@unlink($file);

echo 'success';

?>
--CLEAN--
<?php
@unlink(dirname(__FILE__) . '/__tmp_rose.jpg');
?>
--EXPECT--
successPKr9�Z���'tests/307_Imagick_levelImageColors.phptnu�[���--TEST--
Test Imagick, levelImageColors
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('levelImageColors'));
?>
--FILE--
<?php
function levelImageColors() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');
    $imagick->levelImageColors(
		"rgb(10, 10, 10)",
		"rgb(240, 240, 240)",
		false
	);
//    $imagick->writeImage(__DIR__ . '/levelImageColors_output_image.png');
    $imagick->getImageBlob();
}

levelImageColors() ;
echo "Ok";
?>
--EXPECTF--
Ok
PKr9�ZY�
]��(tests/134_Imagick_shadowImage_basic.phptnu�[���--TEST--
Test Imagick, shadowImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function shadowImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->shadowImage(0.4, 10, 50, 5);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

shadowImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z.�O���+tests/155_Imagick_thresholdImage_basic.phptnu�[���--TEST--
Test Imagick, thresholdImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$threshold = 0.5;
//$channel = Imagick::CHANNEL_DEFAULT;
$channel = Imagick::CHANNEL_RED|Imagick::CHANNEL_GREEN|Imagick::CHANNEL_BLUE;

function thresholdimage($threshold, $channel) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->thresholdimage($threshold * \Imagick::getQuantum(), $channel);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

thresholdimage($threshold, $channel) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�� NN6tests/172_ImagickPixel_setColorValueQuantum_basic.phptnu�[���--TEST--
Test ImagickPixel, setColorValueQuantum
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php


function setColorValueQuantum() {
    $image = new \Imagick();

    $quantumRange = $image->getQuantumRange();

    $draw = new \ImagickDraw();
    $color = new \ImagickPixel('blue');
    $color->setcolorValueQuantum(\Imagick::COLOR_RED, (int)(128 * $quantumRange['quantumRangeLong'] / 256));

    $draw->setstrokewidth(1.0);
    $draw->setStrokeColor($color);
    $draw->setFillColor($color);
    $draw->rectangle(200, 200, 300, 300);

    $image->newImage(500, 500, "SteelBlue2");
    $image->setImageFormat("png");

    $image->drawImage($draw);

    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setColorValueQuantum() ;
echo "Ok";
?>
--EXPECTF--
Ok
PKr9�ZE0����,tests/189_ImagickDraw_setClipPath_basic.phptnu�[���--TEST--
Test ImagickDraw, setClipPath
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setClipPath($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeOpacity(1);
    $draw->setStrokeWidth(2);

    $clipPathName = 'testClipPath';

    $draw->pushClipPath($clipPathName);
    $draw->rectangle(0, 0, 250, 250);
    $draw->popClipPath();
    $draw->setClipPath($clipPathName);
    $draw->rectangle(100, 100, 400, 400);
    
    $storedPathName = $draw->getClipPath();
    
    if (strcmp($storedPathName, $clipPathName) != 0) {
        echo "Error retrieving clipPath: $storedPathName != $clipPathName\n";
    }

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");

    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setClipPath($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z��'��*tests/108_Imagick_resampleImage_basic.phptnu�[���--TEST--
Test Imagick, resampleImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function resampleImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");

    $imagick->resampleImage(200, 200, \Imagick::FILTER_LANCZOS, 1);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

resampleImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�<���/tests/248_ImagickPixelIterator_clear_basic.phptnu�[���--TEST--
Test ImagickPixelIterator, clear
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function clear() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");

    $imageIterator = $imagick->getPixelRegionIterator(100, 100, 250, 200);

    /* Loop trough pixel rows */
    foreach ($imageIterator as $pixels) { 
        /** @var $pixel \ImagickPixel */
        /* Loop through the pixels in the row (columns) */
        foreach ($pixels as $column => $pixel) { 
            if ($column % 2) {
                /* Paint every second pixel black*/
                $pixel->setColor("rgba(0, 0, 0, 0)"); 
            }
        }
        /* Sync the iterator, this is important to do on each iteration */
        $imageIterator->syncIterator();
    }

    $imageIterator->clear();

    $bytes = $imagick;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

clear() ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z����+tests/153_Imagick_statisticImage_basic.phptnu�[���--TEST--
Test Imagick, statisticImage
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); 

checkClassMethods('Imagick', array('statisticImage'));

?>
--FILE--
<?php

$statisticType = 1;
$w20 = 5;
$h20 = 5;
$channel = Imagick::CHANNEL_DEFAULT;

function statisticImage($statisticType, $w20, $h20, $channel) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");

    $imagick->statisticImage(
        $statisticType,
        $w20,
        $h20,
        $channel
    );

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

statisticImage($statisticType, $w20, $h20, $channel) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�ū��tests/017-clear-destroy.phptnu�[���--TEST--
Clear and destroy aliases
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$im = new Imagick ();
$im->clear ();
$im->destroy ();

$im = new ImagickDraw ();
$im->clear ();
$im->destroy ();

$im = new ImagickPixel ();
$im->clear ();
$im->destroy ();

$magick = new Imagick ('magick:rose');

$im = new ImagickPixelIterator ($magick);
$im->clear ();
$im->destroy ();

echo 'success';

?>
--EXPECT--
successPKr9�Z�lc�CC tests/271_imagick_constants.phptnu�[���--TEST--
Imagick::readImage test
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$reflClass = new ReflectionClass('Imagick');
$constants = $reflClass->getConstants();

$output = '';

foreach ($constants as $key => $value) {
	$output .= "$key: $value \n";
}
echo "Ok";

?>
--EXPECTF--
OkPKr9�Z��o&tests/166_Imagick_waveImage_basic.phptnu�[���--TEST--
Test Imagick, waveImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$amplitude = 5;
$length = 20;

function waveImage($amplitude, $length) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->waveImage($amplitude, $length);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

waveImage($amplitude, $length) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z��0ww*tests/283_ini_settings_set_falsy_zero.phptnu�[���--TEST--
OpenMP segfault hacks

--INI--
imagick.shutdown_sleep_count=0
imagick.set_single_thread=0
--SKIPIF--
<?php 


require_once(dirname(__FILE__) . '/skipif.inc');
 
?>
--FILE--
<?php


$sleepCount = ini_get('imagick.shutdown_sleep_count');
$setSingleThread = ini_get('imagick.set_single_thread');

if ($sleepCount != 0) {
    echo "imagick.shutdown_sleep_count is not set to 10 but instead " . var_export($sleepCount, true) ."\n";
}

if ($setSingleThread != 0) {
    echo "imagick.set_single_thread setting is not false but instead " . var_export($sleepCount, true) ."\n";
}


echo "Complete".PHP_EOL;
?>
--EXPECTF--
Complete
PKr9�Z</QB*tests/032_Imagick_addNoiseImage_basic.phptnu�[���--TEST--
Test Imagick, addNoiseImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x702;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$noiseType = Imagick::NOISE_IMPULSE;
$channel = Imagick::CHANNEL_DEFAULT;

function addNoiseImage($noiseType, $channel) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->addNoiseImage($noiseType, $channel);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";}
    echo "addNoiseImage\n";
}

function addNoiseWithAttenuate($noiseType, $channel) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->addNoiseImageWithAttenuate($noiseType, 1.4, $channel);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";}
    echo "addNoiseWithAttenuate\n";
}

addNoiseImage($noiseType, $channel);
addNoiseWithAttenuate($noiseType, $channel);
echo "Ok";
?>
--EXPECTF--
addNoiseImage
addNoiseWithAttenuate
OkPKr9�Z˷I��&tests/228_ImagickDraw_skewX_basic.phptnu�[���--TEST--
Test ImagickDraw, skewX
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';
$fillModifiedColor = 'LightCoral';
$startX = 50;
$startY = 50;
$endX = 400;
$endY = 400;
$skew = 10;

function skewX($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor, 
               $startX, $startY, $endX, $endY, $skew) {

    $draw = new \ImagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setStrokeWidth(2);
    $draw->setFillColor($fillColor);
    $draw->rectangle($startX, $startY, $endX, $endY);
    $draw->setFillColor($fillModifiedColor);
    $draw->skewX($skew);
    $draw->rectangle($startX, $startY, $endX, $endY);

    $image = new \Imagick();
    $image->newImage(500, 500, $backgroundColor);
    $image->setImageFormat("png");

    $image->drawImage($draw);

    $bytes = $image->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

skewX($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor,
    $startX, $startY, $endX, $endY, $skew);
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z��SZZ-tests/092_Imagick_mergeImageLayers_basic.phptnu�[���--TEST--
Test Imagick, mergeImageLayers
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$layerMethodType = 13;

function mergeImageLayers($layerMethodType) {

    $imagick = new \Imagick();
    $nextImage = null;
    $imageNames = array(
        "magick:NETSCAPE",
        "magick:logo",
        "magick:GRANITE",
    );

    foreach ($imageNames as $imageName) {        
        $nextImage = new \Imagick();
        $nextImage->newPseudoImage(640, 480, $imageName);
        $imagick->addImage($nextImage);
    }

    $imagick->resetIterator();
    
    $imagick->setImageFormat('png');

    $result = $imagick->mergeImageLayers($layerMethodType);
    $bytes = $result->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

mergeImageLayers($layerMethodType);
echo "Ok";
?>
--EXPECTF--
Ok
PKr9�Z]X�*tests/040_Imagick_charcoalImage_basic.phptnu�[���--TEST--
Test Imagick, charcoalImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$radius = 5;
$sigma = 1;

function charcoalImage($radius, $sigma) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->charcoalImage($radius, $sigma);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

charcoalImage($radius, $sigma) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z��2�mm tests/010_importimagepixels.phptnu�[���--TEST--
Test importimagepixels
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); 

if (!method_exists("imagick", "importimagepixels")) {
	die("skip imagick::importImagePixels not available");
}

?>
--FILE--
<?php

/* Generate array of pixels. 2000 pixels per color stripe */
$count = 2000 * 3;

$pixels = 
   array_merge(array_pad(array(), $count, 0),
               array_pad(array(), $count, 255), 
               array_pad(array(), $count, 0),
               array_pad(array(), $count, 255),
               array_pad(array(), $count, 0));

/* Width and height. The area is amount of pixels divided
   by three. Three comes from 'RGB', three values per pixel */
$width = $height = 100;

/* Create empty image */
$im = new Imagick();
$im->newImage($width, $height, 'gray');

/* Import the pixels into image.
   width * height * strlen("RGB") must match count($pixels) */
$im->importImagePixels(0, 0, $width, $height, "RGB", Imagick::PIXEL_CHAR, $pixels);

var_dump($width, $height);
var_dump($im->getImageGeometry());

?>
--EXPECTF--
int(100)
int(100)
array(2) {
  ["width"]=>
  int(100)
  ["height"]=>
  int(100)
}PKr9�Z���z��/tests/204_ImagickDraw_setFillOpacity_basic.phptnu�[���--TEST--
Test ImagickDraw, setFillOpacity
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';

function setFillOpacity($strokeColor, $fillColor, $backgroundColor) {

    $draw = new \ImagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeOpacity(1);
    $draw->setStrokeWidth(2);

    $draw->rectangle(100, 200, 200, 300);

    $draw->setFillOpacity(0.4);
    $draw->rectangle(300, 200, 400, 300);

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");
    $imagick->drawImage($draw);

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setFillOpacity($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�(��@@/tests/288_imagick_prevent_zero_size_images.phptnu�[���--TEST--
Prevent zero dimension images and check exception
--SKIPIF--
<?php 

require_once(dirname(__FILE__) . '/skipif.inc');


?>
--FILE--
<?php

$im = new Imagick();

$im->newPseudoImage(0, 100, "magick:logo");
$im->newPseudoImage(100, 0, "magick:logo");

ini_set("imagick.allow_zero_dimension_images", 1);
$im->newPseudoImage(0, 100, "magick:logo");
echo "Well done, you have a zero dimension image. Now what?\n";

echo "Ok";

?>
--EXPECTF--
Deprecated: Creating images with zero columns is deprecated. If you think you need to do this, please open an issue at https://phpimagick.com/issues in %s on line %d

Deprecated: Creating images with zero rows is deprecated. If you think you need to do this, please open an issue at https://phpimagick.com/issues in %s on line %d
Well done, you have a zero dimension image. Now what?
OkPKr9�Z�W,�v	v	,tests/229_Tutorial_fxAnalyzeImage_case1.phptnu�[���--TEST--
Test Tutorial, fxAnalyzeImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

ini_set('memory_limit','512M');

// Analyzes a one pixel wide image to make it easy to see what the
// gradient is doing
function fxAnalyzeImage(\Imagick $imagick) {
    
    $graphWidth = $imagick->getImageWidth();
    $sampleHeight = 20;
    $graphHeight = 128;
    $border = 2;

    $imageIterator = new \ImagickPixelIterator($imagick);

    $reds = array();

    foreach ($imageIterator as $pixels) { /* Loop trough pixel rows */
        foreach ($pixels as $pixel) { /* Loop through the pixels in the row (columns) */
            /** @var $pixel \ImagickPixel */
            $color = $pixel->getColor();
            $reds[] = $color['r'];
        }
        $imageIterator->syncIterator(); /* Sync the iterator, this is important to do on each iteration */
    }

    $draw = new \ImagickDraw();

    $strokeColor = new \ImagickPixel('red');
    $fillColor = new \ImagickPixel('none');
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(1);
    $draw->setFontSize(72);
    $draw->setStrokeAntiAlias(true);

    $x = 0;
    $points = array();
    
    foreach ($reds as $red) {
        $pos = $graphHeight - ($red * $graphHeight / 256);
        $points[] = array('x' => $x, 'y' => $pos);
        $x += 1;
    }

    $draw->polyline($points);

    $plot = new \Imagick();
    $plot->newImage($graphWidth, $graphHeight, 'white');
    $plot->drawImage($draw);

    $outputImage = new \Imagick();
    $outputImage->newImage($graphWidth, $graphHeight + $sampleHeight, 'white');
    $outputImage->compositeimage($plot, \Imagick::COMPOSITE_ATOP, 0, 0);

    $imagick->resizeimage($imagick->getImageWidth(), $sampleHeight, \Imagick::FILTER_LANCZOS, 1);

    $outputImage->compositeimage($imagick, \Imagick::COMPOSITE_ATOP, 0, $graphHeight);
    $outputImage->borderimage('black', $border, $border);

    $outputImage->setImageFormat("png");
    $bytes = $outputImage;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}


$arguments = array(5, 1, 0.5);

$imagick = new \Imagick();
$imagick->newPseudoImage(200, 200, 'gradient:black-white');
$imagick->functionImage(\Imagick::FUNCTION_POLYNOMIAL, $arguments);
$imagick->setimageformat('png');

fxAnalyzeImage($imagick);

echo "Ok";
?>
--EXPECTF--
OkPKr9�Z��j��$tests/042_Imagick_clutImage_im7.phptnu�[���--TEST--
Test Imagick, clutImageWithInterpolate
--SKIPIF--
<?php

require_once(dirname(__FILE__) . '/skipif.inc');

checkClassMethods('Imagick', array('clutImageWithInterpolate'));

?>
--FILE--
<?php

$draw = new \ImagickDraw();
$draw->setStrokeOpacity(0);
$draw->setFillColor('black');
$points = [
	['x' => 40 * 3, 'y' => 10 * 5],
	['x' => 20 * 3, 'y' => 20 * 5],
	['x' => 70 * 3, 'y' => 50 * 5],
	['x' => 80 * 3, 'y' => 15 * 5],
];
$draw->polygon($points);
$imagick = new \Imagick();

$imagick->setColorspace(\Imagick::COLORSPACE_GRAY);

$imagick->newPseudoImage(
	300, 300,
	"xc:white"
);


$imagick->drawImage($draw);
$imagick->blurImage(0, 10);

$draw = new \ImagickDraw();
$draw->setStrokeOpacity(1);
$draw->setFillColor('red');
$draw->point(0, 2);
$draw->setFillColor('yellow');
$draw->rectangle(0, 0, 1, 1);
$gradient = new Imagick();
$gradient->newPseudoImage(1, 5, 'xc:black');
$gradient->drawImage($draw);


$imagick->setImageFormat('png');
$imagick->clutImageWithInterpolate($gradient, Imagick::INTERPOLATE_BILINEAR);

$bytes = $imagick->getImageBlob();
if (strlen($bytes) <= 0) { echo "Failed to generate image.";}

// $imagick->writeImage(__DIR__ . "/feels_bad_man.png");

echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�xb
""tests/github_174.phptnu�[���--TEST--
Imagick::resizeImage prevent 0 width/height images
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php
$i = new Imagick;
$i->newPseudoImage(1, 1000, "xc:red");
$i->resizeImage(0, 250, 0, 1);
echo $i->getImageWidth(); // should be 1
?>
--EXPECTF--
1
PKr9�Z���Ӈ�(tests/310_Imagick_whiteBalanceImage.phptnu�[���--TEST--
Test Imagick, whiteBalanceImage
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('whiteBalanceImage'));
?>
--FILE--
<?php

function whiteBalanceImage() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');
    $imagick->whiteBalanceImage();
    $imagick->getImageBlob();
}

whiteBalanceImage() ;
echo "Ok";
?>
--EXPECTF--
Ok
PKr9�Zc�9��tests/024-ispixelsimilar.phptnu�[���--TEST--
Test ImagickPixel::isPixelSimilar
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc');

--FILE--
<?php

$root3 = 1.732050807568877;

$tests = array(
	array ('rgb(245, 0, 0)',     'rgb(255, 0, 0)',        9 / $root3, false,),
	array ('rgb(245, 0, 0)',     'rgb(255, 0, 0)',       10 / $root3, true,),
	array ('rgb(0, 0, 0)',       'rgb(7, 7, 0)',          9 / $root3, false,),
	array ('rgb(0, 0, 0)',       'rgb(7, 7, 0)',         10 / $root3, true,),
	array ('rgba(0, 0, 0, 1)',   'rgba(7, 7, 0, 1)',      9 / $root3, false,),
	array ('rgba(0, 0, 0, 1)',   'rgba(7, 7, 0, 1)',     10 / $root3, true,),
	array ('rgb(128, 128, 128)', 'rgb(128, 128, 120)',    7 / $root3, false,),
	array ('rgb(128, 128, 128)', 'rgb(128, 128, 120)',    8 / $root3, true,),

	array ('rgb(0, 0, 0)',       'rgb(255, 255, 255)',  254.9,        false,),
	array ('rgb(0, 0, 0)',       'rgb(255, 255, 255)',    255,        true,),
	array ('rgb(255, 0, 0)',     'rgb(0, 255, 255)',    254.9,        false,),
	array ('rgb(255, 0, 0)',     'rgb(0, 255, 255)',      255,        true,),
	array ('black',              'rgba(0, 0, 0)',         0.0,        true),
	array ('black',              'rgba(10, 0, 0, 1.0)',  10.0 / $root3, true),
);

try {
	foreach ($tests as $testInfo) {
		$color1 = $testInfo[0];
		$color2 = $testInfo[1];
		$distance = $testInfo[2];
		$expectation = $testInfo[3];
		$testDistance = ($distance / 255.0);

		$color1Pixel = new ImagickPixel($color1);
		$color2Pixel = new ImagickPixel($color2);

		$isSimilar = $color1Pixel->isPixelSimilarQuantum($color2Pixel, $testDistance * \Imagick::getquantum());
		if ($isSimilar !== $expectation) {
			echo "isSimilar failed. Color [$color1] compared to color [$color2] distance $testDistance doesn't meet expected result [$expectation].". PHP_EOL;
		}

		$isPixelSimilar = $color1Pixel->isPixelSimilar($color2Pixel, $testDistance);
		if ($isPixelSimilar !== $expectation) {
			echo "isPixelSimilar failed. Color [$color1] compared to color [$color2] distance $testDistance doesn't meet expected result [$expectation].". PHP_EOL;
		}
	}
	echo "success";
} catch (\Exception $e) {
	echo "Exception caught in ImagickPixel::isPixelSimilar test: ".$e->getMessage() . PHP_EOL;
}

?>
--EXPECT--
successPKr9�Z��˽nn'tests/105_Imagick_raiseImage_basic.phptnu�[���--TEST--
Test Imagick, raiseImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$width = 15;
$height = 15;
$x = 10;
$y = 10;
$raise = 1;

function raiseImage($width, $height, $x, $y, $raise) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");

    //x and y do nothing?
    $imagick->raiseImage($width, $height, $x, $y, $raise);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

raiseImage($width, $height, $x, $y, $raise) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Zdv9O@@)tests/301_Imagick_bilateralBlurImage.phptnu�[���--TEST--
Test Imagick, bilateralBlurImage
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('bilateralBlurImage'));
?>
--FILE--
<?php


function bilateralBlurImage() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');

    $imagick->bilateralBlurImage(
		5,
		1,
		2,
		2
	);

    $imagick->writeImage(__DIR__ . '/bilateralBlurImage_output_image.png');
//    $imagick->getImageBlob();
}

bilateralBlurImage() ;
echo "Ok";
?>
--CLEAN--
<?php
@unlink(__DIR__ . '/bilateralBlurImage_output_image.png');
?>
--EXPECTF--
Ok
PKr9�Z�.=���)tests/090_Imagick_magnifyImage_basic.phptnu�[���--TEST--
Test Imagick, magnifyImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function magnifyImage() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->magnifyImage();
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

magnifyImage() ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Zahu���1tests/264_ImagickDraw_getTextDirection_basic.phptnu�[���--TEST--
Test ImagickDraw, getTextDirection
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('ImagickDraw', array('getTextDirection', 'setTextDirection'));
?>
--FILE--
<?php

require_once(dirname(__FILE__) . '/functions.inc');

$backgroundColor = 'rgb(225, 225, 225)';
$strokeColor = 'rgb(0, 0, 0)';
$fillColor = 'DodgerBlue2';



$draw = new \ImagickDraw();
setFontForImagickDraw($draw);

$draw->setStrokeColor($strokeColor);
$draw->setFillColor($fillColor);

$draw->setStrokeWidth(2);
$draw->setFontSize(56);

$directions = array(
	\Imagick::DIRECTION_LEFT_TO_RIGHT,
	\Imagick::DIRECTION_RIGHT_TO_LEFT,
	\Imagick::DIRECTION_LEFT_TO_RIGHT,
);

$i = 0;
foreach ($directions as $directionToSet) {
	$draw->setTextDirection($directionToSet);
	$directionReturned = $draw->getTextDirection();

	if ($directionReturned != $directionToSet) {
		echo "Direction error for $i \n";
	}

	$position = 36;
	if ($directionToSet == \Imagick::DIRECTION_RIGHT_TO_LEFT) {
		$position = 500 - 36;
	}

	$draw->annotation($position, (72 * $i) + 64, "Lorem Ipsum!");

	$i++;
}

$imagick = new \Imagick();
$imagick->newImage(500, 500, $backgroundColor);
$imagick->setImageFormat("png");
$imagick->drawImage($draw);

$bytes = $imagick->getImageBlob();
if (strlen($bytes) <= 0) { echo "Failed to generate image.";}
 
$imagick->writeImage(__DIR__ . '/directionTest.png');

echo "Ok";
?>
--CLEAN--
<?php
$f = __DIR__ . '/directionTest.png';
if (file_exists($f)) {
    unlink($f);
}
?>
--EXPECTF--
Ok
PKr9�Z0Iy���tests/bug59378_windows.phptnu�[���--TEST--
Test PHP bug #59378 writing to php://temp is incomplete
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$imagick = new Imagick();
$imagick->newPseudoImage(640, 480, "LOGO:");
$imagick->setFormat("png");

// Although the bug was about php://memory, that isn'--TEST--
// available to use as a filehandle on Windows, so may as well
// just test php://temp instead.
$fp = fopen("php://temp", 'r+');
$imagick->writeImageFile($fp);
rewind($fp);
$memoryBlob = stream_get_contents($fp);
fclose($fp);

//This test depends on getImageBlob working correctly.
$imageBlob = $imagick->getImageBlob();

//Read the images from the data blobs.
$imageReopened = new Imagick();
$imageReopened->readImageBlob($imageBlob);
$memoryReopened = new Imagick();
$memoryReopened->readImageBlob($memoryBlob);

//Compare to see if they are identical.
$result = $imageReopened->compareImages($memoryReopened, \Imagick::METRIC_MEANABSOLUTEERROR);

if ($result[1] == 0) {
    echo "Reopened images are identical.";
}
else {
    echo "Error, reopened images have changed.";
    var_dump($result);
}

?>
--EXPECTF--
Reopened images are identical.
PKr9�Zƀ���+tests/095_Imagick_normalizeImage_basic.phptnu�[���--TEST--
Test Imagick, normalizeImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$channel = Imagick::CHANNEL_DEFAULT;

function normalizeImage($channel) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $original = clone $imagick;
    $original->cropimage($original->getImageWidth() / 2, $original->getImageHeight(), 0, 0);
    $imagick->normalizeImage($channel);
    $imagick->compositeimage($original, \Imagick::COMPOSITE_ATOP, 0, 0);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

normalizeImage($channel) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z��O���.tests/053_Imagick_distortImage_RotatedArc.phptnu�[���--TEST--
Test Imagick, distortImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$distortion = 1;

        $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
        $degrees = array( 180, 45, 100, 20 );
        $imagick->setimagebackgroundcolor("#fad888");
        $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_BACKGROUND );
        $imagick->distortImage( \Imagick::DISTORTION_ARC, $degrees, TRUE );
        header( "Content-Type: image/jpeg" );
    $bytes = $imagick;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 

echo "Ok";
?>
--EXPECTF--
OkPKr9�Z���.tests/275_ImagickPixel_unitializedObjects.phptnu�[���--TEST--
Testing ImagickPixel with unitialized pixel_wand
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
requirePHP("5.6");
?>
--FILE--
<?php

interface MockInterface {}

class ImagickPixelMock extends \ImagickPixel implements MockInterface
{
    protected $foo1;
    protected $foo2;
    protected $foo3;
    protected $foo4;
}

$reflectionClass = new ReflectionClass('ImagickPixelMock');
$instance = $reflectionClass->newInstanceWithoutConstructor();
$methods = $reflectionClass->getMethods();

$methodsAndParams = array(
    'clear' => [],
    'destroy' => [],
    'getColor' => [],
    'getColorAsString' => [],
    'getColorCount' => [],
    'getColorQuantum' => [],
    'getColorValue' => [Imagick::COLOR_BLUE],
    'getColorValueQuantum' => [Imagick::COLOR_RED],
    'getHSL' => [],
    'getIndex' => [],
    'isPixelSimilar' =>  ['red', 0.1],
    'isPixelSimilarQuantum' =>  ['red', 100],
    'isSimilar' =>  ['red', 0.1],
    'setColor' => ['red'],
    'setcolorcount' => [4],
    'setColorValue' => [Imagick::COLOR_BLUE, 0.5],
    'setColorValueQuantum' => [Imagick::COLOR_BLUE, 1],
    'setHSL' => [0.5, 0.5, 0.5],
    'setIndex' => [5],
    'setcolorfrompixel' => [$instance],
);

$testedMethods = array();
foreach ($methodsAndParams as $methodName => $params) {

	if ($reflectionClass->hasMethod($methodName) == false) {
		continue;
	}

    try {
        call_user_func_array([$instance, $methodName], $params);
        echo "failed to throw an exception.\n";
    }
    catch (ImagickPixelException $ipe) {
        if (strpos($ipe->getMessage(), "Can not process empty ImagickPixel object") === false) {
            echo "Incorrect message: " . $ipe->getMessage() . "\n";
        }
    }

    $testedMethods[] = strtolower($methodName);
}


// pretend we tested these.
$testedMethods[] = '__construct';
$testedMethods[] = 'clone';

foreach ($methods as $method) {
	$allMethods[] = strtolower($method->getName());
}

// Have we tested all but __construct
$missedMethods = array_diff($allMethods, $testedMethods);

if (count($missedMethods) !== 0) {
	echo "We didn't test all of the ImagickPixel methods\n";
	var_dump($missedMethods);
}

echo "Ok"

?>
--EXPECTF--

OkPKr9�ZUc�^��-tests/083_Imagick_getPixelIterator_basic.phptnu�[���--TEST--
Test Imagick, getPixelIterator
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function getPixelIterator() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imageIterator = $imagick->getPixelIterator();

    /** @noinspection PhpUnusedLocalVariableInspection */
    foreach ($imageIterator as $row => $pixels) { /* Loop trough pixel rows */
        foreach ($pixels as $column => $pixel) { /* Loop through the pixels in the row (columns) */
            /** @var $pixel \ImagickPixel */
            if ($column % 2) {
                $pixel->setColor("rgba(0, 0, 0, 0)"); /* Paint every second pixel black*/
            }
        }
        $imageIterator->syncIterator(); /* Sync the iterator, this is important to do on each iteration */
    }

    $bytes = $imagick;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

getPixelIterator() ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z��@��1tests/104_Imagick_randomThresholdImage_basic.phptnu�[���--TEST--
Test Imagick, randomThresholdImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$lowThreshold = 0.1;
$highThreshold = 0.9;
$channel = Imagick::CHANNEL_DEFAULT;

function randomThresholdimage($lowThreshold, $highThreshold, $channel) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");

    $imagick->randomThresholdimage(
        $lowThreshold * \Imagick::getQuantum(),
        $highThreshold * \Imagick::getQuantum(),
        $channel
    );
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

randomThresholdimage($lowThreshold, $highThreshold, $channel) ;
echo "Ok";
?>
--EXPECTF--
OkPKr9�Z����tests/025-function-image.phptnu�[���--TEST--
Test functionimage
--SKIPIF--
<?php
$imageMagickBelowVersion = 0x700;
require_once(dirname(__FILE__) . '/skipif.inc');

?>
--FILE--
<?php
$im = new Imagick ('magick:rose');
$im->convolveimage (array (1, 'a', 1));

echo "OK" . PHP_EOL;
?>
--EXPECT--
OKPKr9�Z$�-ZZ-tests/123_Imagick_setImageClipMask_basic.phptnu�[���--TEST--
Test Imagick, setImageClipMask
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('imagick', array('setImageClipMask'));

?>
--FILE--
<?php


function setImageClipMask() {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");

    $width = $imagick->getImageWidth();
    $height = $imagick->getImageHeight();

    $clipMask = new \Imagick();
    $clipMask->newPseudoImage(
        $width,
        $height,
        "canvas:transparent"
    );

    $draw = new \ImagickDraw();
    $draw->setFillColor('white');
    $draw->circle(
        $width / 2,
        $height / 2,
        ($width / 2) + ($width / 4),
        $height / 2
    );
    $clipMask->drawImage($draw);
    $imagick->setImageClipMask($clipMask);

    $imagick->negateImage(false);
    $imagick->setFormat("png");

    $bytes = $imagick->getImagesBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
    
}

setImageClipMask() ;
echo "Ok";
?>
--EXPECTF--
Deprecated: %s Imagick::setImageClipMask() is deprecated in %s
Ok
PKr9�Z�ϕ���,tests/237_Tutorial_deconstructGif_basic.phptnu�[���--TEST--
Test Tutorial, deconstructGif
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$deconstruct = 1;

function makeSimpleGif($deconstruct) {
    $aniGif = new \Imagick();
    $aniGif->setFormat("gif");

    $circleRadius = 20;
    $imageFrames = 6;
    $imageSize = 200;

    $background = new \Imagick();
    $background->newpseudoimage($imageSize, $imageSize, "canvas:gray");

    $blackWhite = new \Imagick();
    $blackWhite->newpseudoimage($imageSize, $imageSize, "gradient:black-white");

    $backgroundPalette = clone $background;
    $backgroundPalette->quantizeImage(240, \Imagick::COLORSPACE_RGB, 8, false, false);

    $blackWhitePalette = clone $blackWhite;
    $blackWhitePalette->quantizeImage(16, \Imagick::COLORSPACE_RGB, 8, false, false);

    $backgroundPalette->addimage($blackWhitePalette);

    for($count=0 ; $count<$imageFrames ; $count++) {
        echo "Frame: ".$count."\n";
        $drawing = new \ImagickDraw();
        $drawing->setFillColor('white');
        $drawing->setStrokeColor('rgba(64, 64, 64, 0.8)');
        $strokeWidth = 4;
        $drawing->setStrokeWidth($strokeWidth);
        
        $distanceToMove = $imageSize + (($circleRadius + $strokeWidth) * 2);
        $offset = ($distanceToMove * $count / ($imageFrames -1)) - ($circleRadius + $strokeWidth);
        $drawing->translate($offset, ($imageSize / 2) + ($imageSize / 3 * cos(20 * $count / $imageFrames)));
        $drawing->circle(0, 0, $circleRadius, 0);

        $frame = clone $background;
        $frame->drawimage($drawing);
        $frame->clutimage($backgroundPalette);
        $frame->setImageDelay(10);
        $aniGif->addImage($frame);
    }

    if ($deconstruct == true) {
        $aniGif = $aniGif->deconstructImages();
    }

    $bytes = $aniGif->getImagesBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

makeSimpleGif($deconstruct) ;
echo "Ok";
?>
--EXPECTF--
Frame: 0
Frame: 1
Frame: 2
Frame: 3
Frame: 4
Frame: 5
OkPKr9�Z{ܴo--)tests/059_Imagick_distortImage_Polar.phptnu�[���--TEST--
Test Imagick, distortImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$distortion = 1;

        //v6.4.2-6
        $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
        $points = array(
            0
        );

        //Only do partial arc
//        $points = array(
//            60,20, 0,0, -60,60
//        );

//        HorizontalTile
        
        $imagick->setimagebackgroundcolor("#fad888");
        $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_HORIZONTALTILE);
        $imagick->distortImage(\Imagick::DISTORTION_POLAR, $points, TRUE);

    $bytes = $imagick;
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 

echo "Ok";
?>
--EXPECTF--
OkPKr9�Z�!e�gg)tests/121_Imagick_setImageBias_basic.phptnu�[���--TEST--
Test Imagick, setImageBias
--SKIPIF--
<?php 
    require_once(dirname(__FILE__) . '/skipif.inc'); 
    checkClassMethods('Imagick', array('setImageBias'));
?>
--FILE--
<?php

$bias = 0.5;

//requires ImageMagick version 6.9.0-1 to have an effect on convolveImage
function setImageBias($bias) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");

    $xKernel = array(
        -0.70, 0, 0.70,
        -0.70, 0, 0.70,
        -0.70, 0, 0.70
    );

    $imagick->setImageBias($bias * \Imagick::getQuantum());
    $imagick->convolveImage($xKernel, \Imagick::CHANNEL_ALL);

    $imagick->setImageFormat('png');

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

setImageBias($bias) ;
echo "Ok";
?>
--EXPECTF--
Deprecated: %s Imagick::setImageBias() is deprecated in %s
Ok
PKr9�Z�ʍ660tests/035_Imagick_blackThresholdImage_basic.phptnu�[���--TEST--
Test Imagick, blackThresholdImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$thresholdColor = 'rgb(127, 127, 127)';

function blackThresholdImage($thresholdColor) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->blackthresholdimage($thresholdColor);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

blackThresholdImage($thresholdColor) ;
echo "Ok";
?>
--EXPECTF--
OkPKq9�Z!���!�!util/functions.phpnu�[���PKq9�Z&f8���!util/fixup_arginfo.phpnu�[���PKq9�Z�w����2util/Float32Info.phpnu�[���PKq9�Zq���6util/FloatInfo.phpnu�[���PKq9�Z*��/99tests/306_Imagick_interpolativeResizeImage.phptnu�[���PKq9�Zo���cc+�;tests/159_Imagick_transformImage_basic.phptnu�[���PKq9�ZRo.
��'u>tests/173_ImagickDraw_bezier_basic.phptnu�[���PKq9�Z2�k#���Gtests/004_clone.phptnu�[���PKq9�Zt�D_��%�Itests/236_Imagick_identify_basic.phptnu�[���PKq9�Z�b=��+�Mtests/119_Imagick_sepiaToneImage_basic.phptnu�[���PKq9�Z��oٽ�*Ptests/070_Imagick_equalizeImage_case2.phptnu�[���PKq9�Z��W[[(/Stests/144_Imagick_spliceImage_basic.phptnu�[���PKq9�Zȭ=���&�Utests/074_Imagick_flopImage_basic.phptnu�[���PKq9�Zͷr�<<2�Wtests/266_ImagickDraw_getFontResolution_basic.phptnu�[���PKq9�Z�l
�8�_tests/251_ImagickPixelIterator_setIteratorRow_basic.phptnu�[���PKq9�ZO�g"	"	5�ctests/280_imagickkernel_exception_invalid_origin.phptnu�[���PKq9�Z��MM+�mtests/100_Imagick_posterizeImage_basic.phptnu�[���PKq9�Z�#��1(ptests/220_ImagickDraw_setStrokeOpacity_basic.phptnu�[���PKq9�Z�:���4
utests/217_ImagickDraw_setStrokeMiterLimit_basic.phptnu�[���PKq9�Zf��b��!{tests/320_Imagick_getOptions.phptnu�[���PKq9�Z���~~ �~tests/276_Imagick_artifacts.phptnu�[���PKq9�Z��}.EE-��tests/106_Imagick_reduceNoiseImage_basic.phptnu�[���PKq9�Z���rii%_�tests/294_Imagick_cannyEdgeImage.phptnu�[���PKq9�Z��!���,�tests/188_ImagickDraw_pushPattern_basic.phptnu�[���PKq9�Z<�.T&&$d�tests/261_compositeImageGravity.phptnu�[���PKq9�Z�&ސtests/131_Imagick_setOption_case2.phptnu�[���PKq9�Z�n���)7�tests/314_Imagick_getBackgroundColor.phptnu�[���PKq9�Z3֔YY0��tests/027_Imagick_adaptiveResizeImage_basic.phptnu�[���PKq9�Z!��cc%>�tests/321_Imagick_getOrientation.phptnu�[���PKq9�Z����9��tests/073_Imagick_forwardFourierTransformImage_basic.phptnu�[���PKq9�Z����NN(y�tests/243_Tutorial_svgExample_basic.phptnu�[���PKq9�Zz�,�tests/198_ImagickDraw_setClipPath_basic.phptnu�[���PKq9�Z�$P���&��tests/227_ImagickDraw_skewY_basic.phptnu�[���PKq9�ZX��j��+o�tests/281_imagick_houghLineImage_basic.phptnu�[���PKq9�Z�l2���3��tests/088_Imagick_implodeImageWithMethod_basic.phptnu�[���PKq9�Z!��CC$��tests/076_Imagick_fxImage_basic.phptnu�[���PKq9�Z���oo1��tests/028_Imagick_adaptiveSharpenImage_basic.phptnu�[���PKq9�Zx�Մ��(d�tests/272_imagick_identifyimagetype.phptnu�[���PKq9�Z�4d!,,&y�tests/132_Imagick_setOption_case3.phptnu�[���PKq9�Z
��

$��tests/175_ImagickDraw_arc_basic.phptnu�[���PKq9�ZuIm���7Y�tests/250_ImagickPixelIterator_resetIterator_basic.phptnu�[���PKq9�Z�1�;S
S
D�tests/025-get-color.phptnu�[���PKq9�Z!�5F$$1��tests/152_Imagick_swirlImageWithMethod_basic.phptnu�[���PKq9�Z6����&d�tests/185_ImagickDraw_point_basic.phptnu�[���PKq9�Z�t˭II0��tests/239_Tutorial_gradientReflection_basic.phptnu�[���PKq9�ZF��$��/[�tests/213_ImagickDraw_setStrokeAlpha_basic.phptnu�[���PKq9�Z���*SS&��tests/048_Imagick_cropImage_basic.phptnu�[���PKq9�Z����TT&2�tests/041_Imagick_chopImage_basic.phptnu�[���PKq9�ZR�e޲���tests/bug21229.phptnu�[���PKq9�ZD�ڊUU*��tests/093_Imagick_modulateImage_basic.phptnu�[���PKq9�Z>z�e��'��tests/138_Imagick_shaveImage_basic.phptnu�[���PKq9�Z�			#��tests/278_Imagick_optimaze_gif.phptnu�[���PKq9�Z���2HHtests/houghline_input_image.pngnu�[���PKq9�ZY1��,�	tests/063_Imagick_distortImage_Shepards.phptnu�[���PKq9�Zț+(�tests/066_Imagick_embossImage_basic.phptnu�[���PKq9�Z�JXuZZ&tests/130_Imagick_setOption_case1.phptnu�[���PKq9�Zӥ��$�tests/322_Imagick_getResolution.phptnu�[���PKq9�Z�64>>/�tests/197_ImagickDraw_roundRectangle_basic.phptnu�[���PKq9�ZD�٭II_tests/009_properties.phptnu�[���PKq9�Z1��jj*�tests/085_Imagick_haldClutImage_basic.phptnu�[���PKq9�Z�UU��.�"tests/256_Imagick_exportImagePixels_basic.phptnu�[���PKq9�Z?� �jj(�)tests/049_Imagick_deskewImage_basic.phptnu�[���PKq9�Z������)n0tests/112_Imagick_roundCorners_basic.phptnu�[���PKq9�ZZ�!]] �4tests/001_imagick_readimage.phptnu�[���PKq9�Z�1����'66tests/195_ImagickDraw_rotate_basic.phptnu�[���PKq9�Zdgr�		(f:tests/186_ImagickDraw_polygon_basic.phptnu�[���PKq9�Z꣮���&�>tests/196_ImagickDraw_scale_basic.phptnu�[���PKq9�Z�aP--!�Btests/260_localContrastImage.phptnu�[���PKq9�Zn���@@(uDtests/039_Imagick_borderImage_basic.phptnu�[���PKq9�ZL4+�xx
Gtests/323_Imagick_getType.phptnu�[���PKq9�Z�ӅPP,�Htests/054_Imagick_distortImage_Bilinear.phptnu�[���PKq9�Z��!���,Ltests/193_ImagickDraw_pushPattern_basic.phptnu�[���PKq9�Z6wep**2�Rtests/143_Imagick_spreadImageWithMethod_basic.phptnu�[���PKq9�Z�lύ�RUtests/325_Imagick_setDepth.phptnu�[���PKq9�ZuC~:��*.Xtests/235_ImagickDraw_translate_basic.phptnu�[���PKq9�Z�)�VQQ*d]tests/151_Imagick_subImageMatch_basic.phptnu�[���PKq9�Z�kͪ55*dtests/296_Imagick_waveletDenoiseImage.phptnu�[���PKq9�Znm?��*�ftests/181_ImagickDraw_pathStart_basic.phptnu�[���PKq9�Z/A��  '�ltests/078_Imagick_gammaImage_basic.phptnu�[���PKq9�Zi�Xtzz!eotests/326_Imagick_setExtract.phptnu�[���PKq9�Z�~�**+0rtests/045_Imagick_compositeImage_basic.phptnu�[���PKq9�Z�bb.�vtests/080_Imagick_gaussianBlurImage_basic.phptnu�[���PKq9�Z����00!uytests/273_imagick_falsyimage.phptnu�[���PKq9�Z�����$�ztests/305_Imagick_complexImages.phptnu�[���PKq9�ZG�����&�}tests/067_Imagick_edgeImage_basic.phptnu�[���PKq9�Z�����3
�tests/211_ImagickDraw_setStrokeAntialias_basic.phptnu�[���PKq9�Z-ιL		)i�tests/289_Imagick_setImageMask_basic.phptnu�[���PKq9�Z�Ỡ�*ˋtests/013-read-filehandle-file-stream.phptnu�[���PKq9�Zb���-Ŏtests/241_Tutorial_psychedelicFont_basic.phptnu�[���PKq9�Z���i>>.Ǔtests/058_Imagick_distortImage_Polynomial.phptnu�[���PKq9�ZMߥ�c�tests/292_index_iterator.phptnu�[���PKq9�Z {���,��tests/203_ImagickDraw_setFillRule_basic.phptnu�[���PKq9�Z�)���+��tests/242_Tutorial_levelizeImage_basic.phptnu�[���PKq9�Z�A��77�tests/008_newpseudoimage.phptnu�[���PKq9�Z�`�d(��tests/234_Tutorial_edgeExtend_basic.phptnu�[���PKq9�Z��{y��(�tests/143_Imagick_spreadImage_basic.phptnu�[���PKq9�Z�u��NN)/�tests/135_Imagick_sharpenImage_basic.phptnu�[���PKq9�Z�Hb���3ָtests/247_ImagickPixelIterator_construct_basic.phptnu�[���PKq9�Z�E�G��,�tests/013-read-filehandle-memory-stream.phptnu�[���PKq9�ZUދC((>�tests/007_thumbnail_fill.phptnu�[���PKq9�Z�ty�&��tests/180_ImagickDraw_matte_basic.phptnu�[���PKq9�Zћ��(�tests/315_Imagick_getImageArtifacts.phptnu�[���PKq9�Z4	�zmm!��tests/003_cast_color_opacity.phptnu�[���PKq9�Z��nk""+H�tests/265_ImagickDraw_getOpacity_basic.phptnu�[���PKq9�Z®.�==��tests/330_Imagick_newImage.phptnu�[���PKq9�Z�}��EE)Q�tests/300_Imagick_autoThresholdImage.phptnu�[���PKq9�Z����3��tests/030_Imagick_adaptiveThresholdImage_basic.phptnu�[���PKq9�Z���S##+*�tests/268_ImagickDraw_getDensity_basic.phptnu�[���PKq9�Zj����+��tests/097_Imagick_newPseudoImage_basic.phptnu�[���PKq9�Z�h�VV)��tests/245_Tutorial_screenEmbed_basic.phptnu�[���PKq9�Z�#�FF/��tests/133_Imagick_setSamplingFactors_basic.phptnu�[���PKq9�Z��a~��/9�tests/221_ImagickDraw_setStrokeWidth_basic.phptnu�[���PKq9�Z��t�$$b�tests/bug_72226.phptnu�[���PKq9�ZJ
d�~~C��tests/183_ImagickDraw_pathCurveToQuadraticBezierAbsolute_basic.phptnu�[���PKq9�Zy<mAA1��tests/218_ImagickDraw_setStrokeLineCap_basic.phptnu�[���PKq9�Zb�s8VV<]tests/249_ImagickPixelIterator_getNextIteratorRow_basic.phptnu�[���PKq9�Z�*~�{{0tests/075_Imagick_floodFillPaintImage_basic.phptnu�[���PKq9�Z�S`ff-�tests/118_Imagick_setImageArtifact_basic.phptnu�[���PKq9�Z*��-�
tests/165_Imagick_unsharpMaskImage_basic.phptnu�[���PKq9�Z�m

2�tests/279_ImagickDraw_setTextInterlineSpacing.phptnu�[���PKq9�ZO=6��.Atests/163_Imagick_uniqueImageColors_basic.phptnu�[���PKq9�Z������'Itests/052_Imagick_distortImage_Arc.phptnu�[���PKq9�Z�T�bb,� tests/206_ImagickDraw_setFontSize_basic.phptnu�[���PKq9�Z�	���?%tests/bug_66098.phptnu�[���PKq9�Z����/b&tests/208_ImagickDraw_setFontStretch_basic.phptnu�[���PKq9�ZD	a�ffO,tests/295_Imagick_setSeed.phptnu�[���PKq9�Z�U���./tests/051_Imagick_distortImage_Projection.phptnu�[���PKq9�ZnS,�1W2tests/031_Imagick_affineTransformImage_basic.phptnu�[���PKq9�Z��oo.�Btests/081_Imagick_getImageHistogram_basic.phptnu�[���PKq9�ZJB���*�Ntests/069_Imagick_equalizeImage_case1.phptnu�[���PKq9�Z��ɥ�)�Ptests/060_Imagick_distortImage_Polar.phptnu�[���PKq9�Z�����Stests/Biter_500.jpgnu�[���PKq9�Z#��//)tests/329_imagick_getImageBlob_empty.phptnu�[���PKq9�ZVQ�4��*�tests/101_Imagick_quantizeImage_basic.phptnu�[���PKq9�Z�E[*tt)�tests/154_Imagick_textureImage_basic.phptnu�[���PKq9�Z�ۅ�cc.Stests/029_Imagick_adaptiveBlurImage_basic.phptnu�[���PKq9�ZN��DD,!tests/282_ini_settings_set_falsy_string.phptnu�[���PKq9�Z���uMM*�%tests/299_Imagick_rangeThresholdImage.phptnu�[���PKq9�Zc>=�--0[(tests/168_Imagick_whiteThresholdImage_basic.phptnu�[���PKq9�Zݞ�``%�*tests/179_ImagickDraw_line_basic.phptnu�[���PKq9�Z� L��(�.tests/259_Imagick_colorPoints_basic.phptnu�[���PKq9�Zh�\�>
>
|5tests/014-setresourcelimit.phptnu�[���PKq9�Z��c���*	@tests/099_Imagick_oilPaintImage_basic.phptnu�[���PKq9�Z�$�:��NBtests/018-clone-length.phptnu�[���PKq9�Z.7T���+DEtests/033_Imagick_autoLevelImage_basic.phptnu�[���PKq9�Z�~�;��'mGtests/136_Imagick_shadeImage_basic.phptnu�[���PKq9�Z�_�ss%�Itests/077_Imagick_frameImage_im7.phptnu�[���PKq9�Z�H&__*UPtests/167_Imagick_vignetteImage_basic.phptnu�[���PKq9�Z�8��Stests/246_antialias_image.phptnu�[���PKq9�Z��Y***Utests/043_Imagick_colorizeImage_basic.phptnu�[���PKq9�Zu�<��!�Ytests/064_cropThumbNailImage.phptnu�[���PKq9�Z�j�N��(�atests/176_ImagickDraw_ellipse_basic.phptnu�[���PKq9�Z�6���$�ftests/274_imagick_setImageAlpha.phptnu�[���PKq9�ZJ
d�~~Cuntests/182_ImagickDraw_pathCurveToQuadraticBezierAbsolute_basic.phptnu�[���PKq9�Zd���[[)fvtests/107_Imagick_recolorImage_basic.phptnu�[���PKq9�Zz�,ytests/192_ImagickDraw_setClipPath_basic.phptnu�[���PKq9�Z�ugG%%%�}tests/191_ImagickDraw_push_basic.phptnu�[���PKq9�Z���K��%��tests/311_Imagick_channelFxImage.phptnu�[���PKq9�Zӌn��'B�tests/114_Imagick_scaleImage_basic.phptnu�[���PKq9�ZM�um)c�tests/184_ImagickDraw_polyline_basic.phptnu�[���PKq9�Z�;9�
�
ǎtests/skipif.incnu�[���PKq9�ZY�9���9��tests/057_Imagick_distortImage_PerspectiveProjection.phptnu�[���PKq9�Z�l����*��tests/034_Imagick_annotateImage_basic.phptnu�[���PKq9�Z:���1A�tests/240_Tutorial_imagickCompositeGen_basic.phptnu�[���PKq9�Z�����$[�tests/308_Imagick_levelizeImage.phptnu�[���PKq9�Z�����5v�tests/161_Imagick_transformImageColorspace_basic.phptnu�[���PKq9�Z���̚�4i�tests/038_Imagick_brightnessContrastImage_basic.phptnu�[���PKq9�Z_�-g�tests/285_ini_settings_set_truthy_string.phptnu�[���PKq9�Z��Mx��'H�tests/087_Imagick_levelImage_basic.phptnu�[���PKq9�ZB�|���#6�tests/022-writeimagefileformat.phptnu�[���PKq9�Z96W���[�tests/253_getHdri.phptnu�[���PKq9�ZV�b�..+5�tests/226_ImagickDraw_setViewBox_basic.phptnu�[���PKq9�ZI%rkk,��tests/199_ImagickDraw_setClipRule_basic.phptnu�[���PKq9�ZT��WW0��tests/166_Imagick_waveImageWithMethod_basic.phptnu�[���PKq9�ZH??'<�tests/137_Imagick_shearImage_basic.phptnu�[���PKq9�Z\�0cc0��tests/125_Imagick_setImageOrientation_basic.phptnu�[���PKq9�Z��>�;;#��tests/317_Imagick_getImageMean.phptnu�[���PKq9�Z�N�||#�tests/026_phpinfo.phptnu�[���PKq9�Z6���'��tests/174_ImagickDraw_affine_basic.phptnu�[���PKq9�ZU9uv,$�tests/102_Imagick_radialBlurImage_basic.phptnu�[���PKq9�Z9l������tests/bug20636.phptnu�[���PKq9�Z�,o�~~$��tests/318_Imagick_getImageRange.phptnu�[���PKq9�Z���@@p�tests/005_bestfit.phptnu�[���PKq9�Z��c���+��tests/065_Imagick_despeckleImage_basic.phptnu�[���PKq9�Zмx�  %�tests/297_Imagick_meanShiftImage.phptnu�[���PKq9�Z�E�'��+��tests/158_Imagick_transposeImage_basic.phptnu�[���PKq9�Z)�(�>>*��tests/270_imagick_restoreErrorHandler.phptnu�[���PKq9�Zcvח��Stests/291_reflection.phptnu�[���PKq9�Zܷr���+�tests/319_Imagick_getInterpolateMethod.phptnu�[���PKq9�ZE�n..3�tests/216_ImagickDraw_setStrokeDashArray_basic.phptnu�[���PKq9�Z�m7�>>I
tests/255_getFeatures.phptnu�[���PKq9�Z����&�tests/109_Imagick_rollImage_basic.phptnu�[���PKq9�Z���1*&tests/099_Imagick_oilPaintImage_sigma.phptnu�[���PKq9�Z��:l��,�tests/094_Imagick_motionBlurImage_basic.phptnu�[���PKq9�Z�'�L#^tests/290_imagick_profileimage.phptnu�[���PKq9�Zl�^S""1�tests/116_Imagick_separateImageChannel_basic.phptnu�[���PKq9�Zu
"C)):tests/002_thumbnail.phptnu�[���PKq9�Z7]���+�)tests/212_ImagickDraw_setGravity_basic.phptnu�[���PKr9�Zkv)ABB*�/tests/103_Imagick_readImageBlob_basic.phptnu�[���PKr9�Ztaj%%3e4tests/269_ImagickPixel_setColorFromPixel_basic.phptnu�[���PKr9�Z�{v##'�6tests/015-imagickdrawsetresolution.phptnu�[���PKr9�Z�]MPP&g=tests/324_Imagick_polynomialImage.phptnu�[���PKr9�Z����NN%
Atests/145_imagickkernel_coverage.phptnu�[���PKr9�Z�ugG%%%�Ttests/187_ImagickDraw_push_basic.phptnu�[���PKr9�Z�<{��&*Ytests/039_Imagick_borderImage_im7.phptnu�[���PKr9�Z��i��&Eptests/156_Imagick_tintImage_basic.phptnu�[���PKr9�ZW趺PP4stests/263_autoGammaImage.phptnu�[���PKr9�Z��ޑ���ttests/bug_71742.phptnu�[���PKr9�Z,$�5��*ytests/177_ImagickDraw_composite_basic.phptnu�[���PKr9�Z���l%�tests/012-clone-separation.phptnu�[���PKr9�ZS�<��2��tests/224_ImagickDraw_setTextUnderColor_basic.phptnu�[���PKr9�Z`\�^^z�tests/bug59378.phptnu�[���PKr9�Z�K$&�tests/042_Imagick_clutImage_basic.phptnu�[���PKr9�Z����pp2w�tests/219_ImagickDraw_setStrokeLineJoin_basic.phptnu�[���PKr9�ZD.�kkk&I�tests/047_Imagick_convolveImage_6.phptnu�[���PKr9�Z�'�5,,(
�tests/141_Imagick_sketchImage_basic.phptnu�[���PKr9�Z�4E�BB&��tests/037_Imagick_blurImage_basic.phptnu�[���PKr9�Z{�s��3&�tests/252_ImagickPixelIterator_construct_basic.phptnu�[���PKr9�Z�G�00(b�tests/110_Imagick_resizeImage_basic.phptnu�[���PKr9�ZJ����-�tests/201_ImagickDraw_setFillAlpha_basic.phptnu�[���PKr9�Z�[-���,�tests/162_Imagick_transverseImage_basic.phptnu�[���PKr9�Z\����)�tests/309_Imagick_orderedDitherImage.phptnu�[���PKr9�ZC���*M�tests/170_ImagickPixel_setColor_basic.phptnu�[���PKr9�Z|�"��.��tests/207_ImagickDraw_setFontFamily_basic.phptnu�[���PKr9�Z��H%%*��tests/061_Imagick_distortImage_Barrel.phptnu�[���PKr9�Zd�[$�tests/303_Imagick_averageImages.phptnu�[���PKr9�Z�!��LL2��tests/225_ImagickDraw_setTextDecoration_basic.phptnu�[���PKr9�ZW�õ2�tests/bug81235.phptnu�[���PKr9�Z��g����tests/skipprobefourier.incnu�[���PKr9�Z,	 ;��'��tests/149_Imagick_sparseColorImage.phptnu�[���PKr9�Z�O�3��tests/084_Imagick_getPixelRegionIterator_basic.phptnu�[���PKr9�Z*�Z���2`�tests/098_Imagick_orderedPosterizeImage_basic.phptnu�[���PKr9�Z��v���/��tests/171_ImagickPixel_setColorValue_basic.phptnu�[���PKr9�Z�x��22*��tests/142_Imagick_solarizeImage_basic.phptnu�[���PKr9�ZRq�SMM&z�tests/164_Imagick_trimImage_basic.phptnu�[���PKr9�Zf���+�tests/258_Imagick_evaluateImages_basic.phptnu�[���PKr9�Z�� ���H�tests/262_autoOrient.phptnu�[���PKr9�Z[��mm<�tests/006_cropthumbnail.phptnu�[���PKr9�Z��+�����tests/functions.incnu�[���PKr9�Z�J����)�tests/117_Imagick_segmentImage_basic.phptnu�[���PKr9�Z�)�R��2�tests/120_Imagick_setCompressionQuality_basic.phptnu�[���PKr9�Z���))1�tests/126_Imagick_getImageChannelStats_basic.phptnu�[���PKr9�Z�k2;Etests/328_Imagick_polaroidImageWithTextAndMethod_basic.phptnu�[���PKr9�Z`���tests/bug_73840.phptnu�[���PKr9�Z�
vtests/bug64015.phptnu�[���PKr9�Z����Rtests/019-readimages.phptnu�[���PKr9�Z�%88#D#tests/281_ini_settings_default.phptnu�[���PKr9�Z�=���'�%tests/077_Imagick_frameImage_basic.phptnu�[���PKr9�Zg�>r��-%*tests/210_ImagickDraw_setFontStyle_basic.phptnu�[���PKr9�Z��^��+N/tests/036_Imagick_blueShiftImage_basic.phptnu�[���PKr9�Z/�'
��0�1tests/257_Imagick_setImageChannelMask_basic.phptnu�[���PKr9�ZV����'�5tests/152_Imagick_swirlImage_basic.phptnu�[���PKr9�Z_
��-�7tests/277_Imagick_colorDecisionListImage.phptnu�[���PKr9�Zj���/;tests/056_Imagick_distortImage_Perspective.phptnu�[���PKr9�ZmDD+��$Atests/016-static-methods.phptnu�[���PKr9�ZJ���ll1�Btests/062_Imagick_distortImage_BarrelInverse.phptnu�[���PKr9�Z����RR+�Ftests/169_ImagickPixel_construct_basic.phptnu�[���PKr9�Zj�;`��0tNtests/244_Tutorial_psychedelicFontGif_basic.phptnu�[���PKr9�Ze����/uVtests/267_ImagickDraw_getBorderColor_basic.phptnu�[���PKr9�Z�����[[tests/011_polygon.phptnu�[���PKr9�Z�5
��9�]tests/086_Imagick_forwardFourierTransformImage_basic.phptnu�[���PKr9�Z{�u&&7�dtests/122_Imagick_setImageCompressionQuality_basic.phptnu�[���PKr9�Z���""2pgtests/160_Imagick_transparentPaintImage_basic.phptnu�[���PKr9�Zz�"�jtests/150_Imagick_setregistry.phptnu�[���PKr9�Z�l�η�*^qtests/194_ImagickDraw_rectangle_basic.phptnu�[���PKr9�Z��1���/outests/115_Imagick_selectiveBlurImage_basic.phptnu�[���PKr9�Z�����1jxtests/223_ImagickDraw_setTextAntialias_basic.phptnu�[���PKr9�Z�����&�}tests/071_Imagick_flipImage_basic.phptnu�[���PKr9�Z��M66.�tests/089_Imagick_medianFilterImage_basic.phptnu�[���PKr9�Za����/1�tests/091_Imagick_linearStretchImage_basic.phptnu�[���PKr9�Z� F,V�tests/304_Imagick_is_imagemagick_borked.phptnu�[���PKr9�Z�e!�"��tests/298_Imagick_kmeansImage.phptnu�[���PKr9�ZEN��..(�tests/096_Imagick_negateImage_basic.phptnu�[���PKr9�Z��d��8��tests/055_Imagick_distortImage_ScaleRotateTransform.phptnu�[���PKr9�Z��ULLǔtests/020-pixeliterator.phptnu�[���PKr9�ZU��+_�tests/157_Imagick_thumbnailImage_basic.phptnu�[���PKr9�Z؅,���/Оtests/215_ImagickDraw_setStrokeColor_basic.phptnu�[���PKr9�Z�P�h�h��tests/anonymous_pro_minus.ttfnu�[���PKr9�Z
�k-��!�~tests/302_Imagick_claheImage.phptnu�[���PKr9�Z�b5���.ɀtests/209_ImagickDraw_setFontWeight_basic.phptnu�[���PKr9�Z�i_h��-�tests/079_Imagick_getImageGeometry_basic.phptnu�[���PKr9�Z$͏���-#�tests/202_ImagickDraw_setFillColor_basic.phptnu�[���PKr9�ZZ� ���$*�tests/286_Imagick_setMask_basic.phptnu�[���PKr9�Z~Nz($�tests/111_Imagick_rotateImage_basic.phptnu�[���PKr9�Z����-��tests/284_ini_settings_set_truthy_number.phptnu�[���PKr9�Z�Lm-u�tests/044_Imagick_colorMatrixImage_basic.phptnu�[���PKr9�Z"ckuJJ0ٞtests/113_Imagick_rotationalBlurImage_basic.phptnu�[���PKr9�Z�r@W1��tests/222_ImagickDraw_setTextAlignment_basic.phptnu�[���PKr9�Z<v~3�tests/139_Imagick_sigmoidalContrastImage_basic.phptnu�[���PKr9�Z�X��ee]�tests/021-countable.phptnu�[���PKr9�Z�^�||,
�tests/127_Imagick_progressMonitor_basic.phptnu�[���PKr9�Z)>O���)�tests/068_Imagick_enhanceImage_basic.phptnu�[���PKr9�ZFJ�*�tests/050_Imagick_distortImage_Affine.phptnu�[���PKr9�Z��hh1_�tests/287_Imagick_GetImageChannelRange_basic.phptnu�[���PKr9�Z�*Aw��((�tests/190_ImagickDraw_popDefs_basic.phptnu�[���PKr9�Z��r'��'c�tests/178_ImagickDraw_circle_basic.phptnu�[���PKr9�Z_p��(("@�tests/254_getConfigureOptions.phptnu�[���PKr9�Z?v�m��-��tests/200_ImagickDraw_setClipUnits_basic.phptnu�[���PKr9�Z�,��4��tests/214_ImagickDraw_setStrokeDashOffset_basic.phptnu�[���PKr9�Z�	<,,*��tests/046_Imagick_contrastImage_basic.phptnu�[���PKr9�ZB�Qk*��tests/312_Imagick_colorThresholdImage.phptnu�[���PKr9�Z{����)��tests/088_Imagick_implodeImage_basic.phptnu�[���PKr9�Z��k��	�	
�tests/php.gifnu�[���PKr9�Z
Q��*7�tests/072_Imagick_evaluateImage_basic.phptnu�[���PKr9�Z�;��
��tests/OFL.txtnu�[���PKr9�Z??���*�tests/327_Imagick_polaroidImage_basic.phptnu�[���PKr9�Z@����&}tests/047_Imagick_convolveImage_7.phptnu�[���PKr9�Zf$e���rtests/013-read-filehandle.phptnu�[���PKr9�Z���'�tests/307_Imagick_levelImageColors.phptnu�[���PKr9�ZY�
]��(tests/134_Imagick_shadowImage_basic.phptnu�[���PKr9�Z.�O���+?tests/155_Imagick_thresholdImage_basic.phptnu�[���PKr9�Z�� NN6C!tests/172_ImagickPixel_setColorValueQuantum_basic.phptnu�[���PKr9�ZE0����,�$tests/189_ImagickDraw_setClipPath_basic.phptnu�[���PKr9�Z��'��*"*tests/108_Imagick_resampleImage_basic.phptnu�[���PKr9�Z�<���/k,tests/248_ImagickPixelIterator_clear_basic.phptnu�[���PKr9�Z����+�0tests/153_Imagick_statisticImage_basic.phptnu�[���PKr9�Z�ū���3tests/017-clear-destroy.phptnu�[���PKr9�Z�lc�CC �5tests/271_imagick_constants.phptnu�[���PKr9�Z��o&�7tests/166_Imagick_waveImage_basic.phptnu�[���PKr9�Z��0ww*�9tests/283_ini_settings_set_falsy_zero.phptnu�[���PKr9�Z</QB*�<tests/032_Imagick_addNoiseImage_basic.phptnu�[���PKr9�Z˷I��&-Atests/228_ImagickDraw_skewX_basic.phptnu�[���PKr9�Z��SZZ-Ftests/092_Imagick_mergeImageLayers_basic.phptnu�[���PKr9�Z]X�*�Itests/040_Imagick_charcoalImage_basic.phptnu�[���PKr9�Z��2�mm 7Ltests/010_importimagepixels.phptnu�[���PKr9�Z���z��/�Ptests/204_ImagickDraw_setFillOpacity_basic.phptnu�[���PKr9�Z�(��@@/Utests/288_imagick_prevent_zero_size_images.phptnu�[���PKr9�Z�W,�v	v	,�Xtests/229_Tutorial_fxAnalyzeImage_case1.phptnu�[���PKr9�Z��j��$rbtests/042_Imagick_clutImage_im7.phptnu�[���PKr9�Z�xb
""�gtests/github_174.phptnu�[���PKr9�Z���Ӈ�(�htests/310_Imagick_whiteBalanceImage.phptnu�[���PKr9�Zc�9���jtests/024-ispixelsimilar.phptnu�[���PKr9�Z��˽nn'�stests/105_Imagick_raiseImage_basic.phptnu�[���PKr9�Zdv9O@@)�vtests/301_Imagick_bilateralBlurImage.phptnu�[���PKr9�Z�.=���)Aytests/090_Imagick_magnifyImage_basic.phptnu�[���PKr9�Zahu���1_{tests/264_ImagickDraw_getTextDirection_basic.phptnu�[���PKr9�Z0Iy�����tests/bug59378_windows.phptnu�[���PKr9�Zƀ���+t�tests/095_Imagick_normalizeImage_basic.phptnu�[���PKr9�Z��O���.��tests/053_Imagick_distortImage_RotatedArc.phptnu�[���PKr9�Z���.��tests/275_ImagickPixel_unitializedObjects.phptnu�[���PKr9�ZUc�^��-��tests/083_Imagick_getPixelIterator_basic.phptnu�[���PKr9�Z��@��1��tests/104_Imagick_randomThresholdImage_basic.phptnu�[���PKr9�Z����S�tests/025-function-image.phptnu�[���PKr9�Z$�-ZZ-��tests/123_Imagick_setImageClipMask_basic.phptnu�[���PKr9�Z�ϕ���,[�tests/237_Tutorial_deconstructGif_basic.phptnu�[���PKr9�Z{ܴo--)��tests/059_Imagick_distortImage_Polar.phptnu�[���PKr9�Z�!e�gg)6�tests/121_Imagick_setImageBias_basic.phptnu�[���PKr9�Z�ʍ660��tests/035_Imagick_blackThresholdImage_basic.phptnu�[���PK\\}���