/home/lnzliplg/www/alt-php82-pecl-gmagick_2.0.6-1.RC1.el8.tar
tests/gmagickdraw-033_setClipPath_basic.phpt000064400000002321151730207640015032 0ustar00--TEST--
Test GmagickDraw, 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 \GmagickDraw();
    $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 \Gmagick();
    $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--
Oktests/gmagickpixel-005-setcolorvaluequantum_getcolorvaluequantum.phpt000064400000001134151730207640022423 0ustar00--TEST--
Test setColorValueQuantum and getColorValueQuantum methods
--SKIPIF--
<?php
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gp = new GMagickPixel();
echo $gp->getColorValueQuantum(Gmagick::COLOR_BLACK). "\n";
$gp->setColorValueQuantum(Gmagick::COLOR_BLACK,1);
echo $gp->getColorValueQuantum(Gmagick::COLOR_BLACK). "\n";
try {
    $gp->setColorValueQuantum(123456, 1);
    echo "GmagickPixelException was not thrown".PHP_EOL;
} catch (GmagickPixelException $gpe) {
    //This is the expected exception
    echo $gpe->getMessage();
}
?>
--EXPECTF--
0
1
Unknown color type: 123456
tests/gmagick-041-set_getimageinterlacescheme.phpt000064400000000525151730207640016225 0ustar00--TEST--
Set, get image interlace scheme
--SKIPIF--
<?php
/* $Id: gmagick-041-set_getimageinterlacescheme.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
echo $gm->setImageInterlaceScheme(1)->getImageInterlaceScheme();
?>
--EXPECTF--
1tests/gmagick-015-cyclecolormapimage.phpt000064400000000440151730207650014351 0ustar00--TEST--
Test current
--SKIPIF--
<?php
/* $Id: gmagick-015-cyclecolormapimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->cycleColorMapImage(2);
echo "ok";
?>
--EXPECTF--
oktests/gmagick-067-minifyimage.phpt000064400000000426151730207650013023 0ustar00--TEST--
minifyImage test
--SKIPIF--
<?php
/* $Id: gmagick-067-minifyimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->minifyImage();
echo "ok";
?>
--EXPECTF--
ok
tests/gmagickdraw-027-setantialias_getantialias.phpt000064400000000346151730207650016606 0ustar00--TEST--
Test and get anti-alias
--SKIPIF--
<?php
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
	$gDraw = new GmagickDraw();
	$gDraw->setStrokeAntiAlias(true);
	echo $gDraw->getStrokeAntiAlias();
?>
--EXPECT--
1
tests/gmagick-042-set_getimageiterations.phpt000064400000000500151730207650015246 0ustar00--TEST--
Set, get image iterations
--SKIPIF--
<?php
/* $Id: gmagick-042-set_getimageiterations.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
echo $gm->setImageIterations(2)->getImageIterations();
?>
--EXPECTF--
2tests/gmagickdraw_040_pathCurveToQuadraticBezierAbsolute_basic.phpt000064400000003576151730207650021652 0ustar00--TEST--
Test GmagickDraw, 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 \GmagickDraw();

    $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();

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

    $gmagick->drawImage($draw);

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

}

pathCurveToQuadraticBezierAbsolute($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagick-060-haspreviousimage.phpt000064400000000445151730207650014072 0ustar00--TEST--
hasPreviousImage test
--SKIPIF--
<?php
/* $Id: gmagick-060-haspreviousimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->hasPreviousImage();
echo "ok";
?>
--EXPECTF--
ok
tests/gmagick-102-unsharpenmaskimage.phpt000064400000000340151730207650014370 0ustar00--TEST--
unsharpmaskimage test
--SKIPIF--
<?php
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$image = new Gmagick('magick:rose');
$image->unsharpMaskImage(0 , 0.5 , 1 , 0.05);
echo "ok";
?>
--EXPECTF--
ok
tests/gmagick-092-getimagegeometry.phpt000064400000000505151730207650014057 0ustar00--TEST--
setImage test
--SKIPIF--
<?php
/* $Id: gmagick-086-setcompressionquality.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$image = new Gmagick('magick:rose');
print_r($image->getImageGeometry());
?>
--EXPECTF--
Array
(
    [width] => 70
    [height] => 46
)
tests/gmagick-105-readimageblob.phpt000064400000000707151730207650013275 0ustar00--TEST--
Gmagick::readImageBlob
--SKIPIF--
<?php
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$image = new Gmagick('magick:rose');
$image->setImageFormat('png');
$imageBlob = $image->getImageBlob();

$imageReload = new Gmagick();
$imageReload->readImageBlob($imageBlob);
printf(
    "Dimensions are %d x %d\n",
    $imageReload->getImageWidth(),
    $imageReload->getImageHeight()
);
echo "ok";

?>
--EXPECTF--
Dimensions are 70 x 46
oktests/gmagickdraw-012-setstrokeopacity_getstrokeopacity.phpt000064400000000506151730207650020464 0ustar00--TEST--
Test setstrokeopacity, getstrokeopacity
--SKIPIF--
<?php
/* $Id: gmagickdraw-012-setstrokeopacity_getstrokeopacity.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gd = new GMagickDraw();
echo $gd->setStrokeOpacity(0.8)->getStrokeOpacity();
?>
--EXPECT--
0.8tests/gmagick-037-set_getimagegamma.phpt000064400000000460151730207650014160 0ustar00--TEST--
Set, get image gamma
--SKIPIF--
<?php
/* $Id: gmagick-037-set_getimagegamma.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
echo $gm->setImageGamma(0.2)->getImageGamma();
?>
--EXPECTF--
0.2tests/gmagick-027-set_getimagebordercolor.phpt000064400000000766151730207650015422 0ustar00--TEST--
Imagebordercolor test
--SKIPIF--
<?php
/* $Id: gmagick-027-set_getimagebordercolor.phpt 331869 2013-10-20 11:27:00Z remi $ */
if(!extension_loaded('gmagick')) die('skip');
if (Gmagick::QUANTUM_DEPTH != 8) die('skip QUANTUM_DEPTH='.Gmagick::QUANTUM_DEPTH);
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$color=new GmagickPixel("rgb(255,255,255)");
$pixel = $gm->setImageBorderColor($color)->getImageBorderColor();
print_r($pixel->getColor());
?>
--EXPECTF--
rgb(255,255,255)
tests/gmagick-075-quantizeimages.phpt000064400000000462151730207650013552 0ustar00--TEST--
quantizeImages test
--SKIPIF--
<?php
/* $Id: gmagick-075-quantizeimages.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->quantizeImages(2, 2, 2, true, true);
echo "ok";
?>
--EXPECTF--
ok
tests/gmagick-083-solarizeimage.phpt000064400000000434151730207650013355 0ustar00--TEST--
solarizeImage test
--SKIPIF--
<?php
/* $Id: gmagick-083-solarizeimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->solarizeImage(1);
echo "ok";
?>
--EXPECTF--
oktests/gmagickdraw_045_setFontFamily_basic.phpt000064400000002473151730207650015474 0ustar00--TEST--
Test GmagickDraw, setFontFamily
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

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

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

    $draw = new \GmagickDraw();

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

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    //TODO - actually use setFontFamily
    $draw->setStrokeWidth(2);

    $draw->setFontSize(24);
    $draw->annotate(50, 50, "Lorem Ipsum!");

    $draw->setFontSize(36);
    $draw->annotate(50, 100, "Lorem Ipsum!");

    $draw->setFontSize(48);
    $draw->annotate(50, 150, "Lorem Ipsum!");

    $draw->setFontSize(60);
    $draw->annotate(50, 200, "Lorem Ipsum!");

    $draw->setFontSize(72);
    $draw->annotate(50, 250, "Lorem Ipsum!");

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

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

setFontFamily($fillColor, $strokeColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagick-126_negateImage_basic.phpt000064400000001004151730207650014143 0ustar00--TEST--
Test Gmagick, negateImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$grayOnly = 0;
$channel = Gmagick::CHANNEL_DEFAULT;

function negateImage($grayOnly, $channel) {
    $gmagick = new \Gmagick("magick:logo");
    $gmagick->negateImage($grayOnly, $channel);
    $bytes = $gmagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

negateImage($grayOnly, $channel) ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagick-044-set_getimageredprimary.phpt000064400000000560151730207650015253 0ustar00--TEST--
Set, get imageredprimary
--SKIPIF--
<?php
/* $Id: gmagick-044-set_getimageredprimary.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
print_r($gm->setImageRedPrimary(0.2, 0.2)->getImageRedPrimary());
?>
--EXPECTF--
Array
(
    [x] => 0.2
    [y] => 0.2
)tests/gmagick-013-commentimage.phpt000064400000000446151730207650013163 0ustar00--TEST--
Test commentImage
--SKIPIF--
<?php
/* $Id: gmagick-013-commentimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->commentImage("Test Comment");
echo "ok";
?>
--EXPECT--
ok
tests/gmagickdraw-010-setfontstyle_getfontstyle.phpt000064400000000476151730207650016746 0ustar00--TEST--
Test setfontstyle, getfontstyle
--SKIPIF--
<?php
/* $Id: gmagickdraw-010-setfontstyle_getfontstyle.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gd = new GMagickDraw();
echo $gd->setFontStyle(Gmagick::STYLE_NORMAL)->getFontStyle();
?>
--EXPECT--
0tests/gmagick-070-motionblurimage.phpt000064400000000452151730207650013713 0ustar00--TEST--
motionblur test
--SKIPIF--
<?php
/* $Id: gmagick-070-motionblurimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->motionBlurImage(0.2, 0.2, 0.2);
echo "ok";
?>
--EXPECTF--
ok
tests/gmagick-090-setimage.phpt000064400000000500151730207650012310 0ustar00--TEST--
setImage test
--SKIPIF--
<?php
/* $Id: gmagick-086-setcompressionquality.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$image = new Gmagick('magick:rose');
$replace = new Gmagick('magick:rose');
$image->setImage($replace);
echo "1";
?>
--EXPECTF--
1
tests/gmagick-093-flattenimages.phpt000064400000000430151730207650013342 0ustar00--TEST--
setImage test
--SKIPIF--
<?php
/* $Id: gmagick-086-setcompressionquality.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$image = new Gmagick('magick:rose');
$image->flattenImages();
echo "ok";
?>
--EXPECTF--
ok
tests/gmagickdraw-025-affine.phpt000064400000000555151730207650012630 0ustar00--TEST--
Test affine
--SKIPIF--
<?php
/* $Id: gmagickdraw-025-affine.phpt 280206 2010-08-07 12:46:00Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
    $gDraw = new GmagickDraw();
    $affineArray = array("sx" => 1, "rx" => 0, "ry" => 0, "sy" =>1, "tx" => 0, "ty" => 0);
    $gDraw->affine($affineArray);
    echo "ok";
?>
--EXPECT--
ok
tests/gmagick-025-set_and_getimageckgroundcolor.phpt000064400000001060151730207650016565 0ustar00--TEST--
Test setImageBackgroundColor and getImageBackgroundColor methods
--SKIPIF--
<?php
/* $Id: gmagick-025-set_and_getimageckgroundcolor.phpt 331869 2013-10-20 11:27:00Z remi $ */
if(!extension_loaded('gmagick')) die('skip');
if (Gmagick::QUANTUM_DEPTH != 8) die('skip QUANTUM_DEPTH='.Gmagick::QUANTUM_DEPTH);
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$color=new GmagickPixel("rgb(255,255,255)");
$pixel =  $gm->setImageBackgroundColor($color)->getimagebackgroundcolor();
print_r($pixel->getColor());
?>
--EXPECTF--
rgb(255,255,255)
tests/gmagick-021-equalizeimage.phpt000064400000000421151730207650013330 0ustar00--TEST--
Equalize
--SKIPIF--
<?php
/* $Id: gmagick-021-equalizeimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->equalizeImage();
echo "ok";
?>
--EXPECTF--
oktests/gmagickdraw_042_setTextAntialias_basic.phpt000064400000002455151730207650016173 0ustar00--TEST--
Test GmagickDraw, setTextAntialias
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

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

function setTextAntialias($fillColor, $backgroundColor) {

    $draw = new \GmagickDraw();
    $draw->setStrokeColor('none');
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(1);
    $draw->setFontSize(32);
    $draw->setTextAntialias(false);
    $draw->annotate(5, 30, "Lorem Ipsum!");
    $draw->setTextAntialias(true);
    $draw->annotate(5, 65, "Lorem Ipsum!");

    $currentValue = $draw->getTextAntialias();

    if ($currentValue !== true) {
        echo "Failed to get textAntiAlias setting, which should be true\n";
        var_dump($currentValue);
    }

    $gmagick = new \Gmagick();
    $gmagick->newImage(220, 80, $backgroundColor);
    $gmagick->setImageFormat("png");
    $gmagick->drawImage($draw);

    //Scale the image so that people can see the aliasing.
    $gmagick->scaleImage(220 * 6, 80 * 6);
    $gmagick->cropImage(640, 480, 0, 0);

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

setTextAntialias($fillColor, $backgroundColor);
echo "Ok";
?>
--EXPECTF--
Oktests/gmagick-038-setimagegreenprimary.phpt000064400000000564151730207650014751 0ustar00--TEST--
Set, get imagegreenprimary
--SKIPIF--
<?php
/* $Id: gmagick-038-setimagegreenprimary.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
print_r($gm->setImageGreenPrimary(0.2, 0.2)->getImageGreenPrimary());
?>
--EXPECTF--
Array
(
    [x] => 0.2
    [y] => 0.2
)tests/gmagickdraw_035_setClipUnits_basic.phpt000064400000002540151730207650015330 0ustar00--TEST--
Test GmagickDraw, 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 \GmagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeOpacity(1);
    $draw->setStrokeWidth(2);
    $clipPathName = 'testClipPath';
    $draw->setClipUnits(\Gmagick::RESOLUTION_PIXELSPERINCH);
    $draw->pushClipPath($clipPathName);
    $draw->rectangle(0, 0, 250, 250);
    $draw->popClipPath();
    $draw->setClipPath($clipPathName);
    $clipUnits = $draw->getClipUnits();
    if ($clipUnits !== \Gmagick::RESOLUTION_PIXELSPERINCH) {
        echo "Failed to get correct clipUnits $clipRule != \Gmagick::RESOLUTION_PIXELSPERINCH \n";
    }

    //RESOLUTION_PIXELSPERINCH
    //RESOLUTION_PIXELSPERCENTIMETER

    $draw->rectangle(200, 200, 300, 300);
    $imagick = new \Gmagick();
    $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--
Oktests/gmagick-074-quantizeimage.phpt000064400000000457151730207650013372 0ustar00--TEST--
quantizeImage test
--SKIPIF--
<?php
/* $Id: gmagick-074-quantizeimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->quantizeImage(2, 2, 2, true, true);
echo "ok";
?>
--EXPECTF--
ok
tests/gmagick-097-sampleimage.phpt000064400000000310151730207650013004 0ustar00--TEST--
sampleimage test
--SKIPIF--
<?php
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$image = new Gmagick('magick:rose');
$image->sampleimage(5, 5);
echo "ok";
?>
--EXPECTF--
ok
tests/gmagickdraw-030-setmiterlimit_getmiterlimit.phpt000064400000000514151730207650017221 0ustar00--TEST--
Test get and set strokeMiterLimit
--SKIPIF--
<?php
/* $Id: gmagickdraw30-setmiterlimit_getmiterlimit.phpt 280206 2013-11-05 12:46:00Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
	$gDraw = new GmagickDraw();
	$gDraw->setStrokeMiterLimit(2);
	echo $gDraw->getStrokeMiterLimit();
?>
--EXPECT--
2
tests/gmagick-023-gammaimage.phpt000064400000000417151730207650012602 0ustar00--TEST--
Gamma image
--SKIPIF--
<?php
/* $Id: gmagick-023-gammaimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->gammaImage(0.8);
echo "1";
?>
--EXPECTF--
1tests/bug63677.phpt000064400000002344151730207650010006 0ustar00--TEST--
Test bug 63677 - getimagehistogram
--SKIPIF--
<?php

if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php

class Image
{
    private $gmagick;
    private $layers;

    public function __construct(\Gmagick $gmagick)
    {
        $this->gmagick = $gmagick;
        $this->layers = new Layers($this, $this->gmagick);
    }

    public function __destruct()
    {
        if (null !== $this->gmagick && $this->gmagick instanceof \Gmagick) {
            $this->gmagick->clear();
            $this->gmagick->destroy();
        }
    }

    public function histogram()
    {
        return array_map(
            function(\GmagickPixel $pixel) {
                return new \stdClass();
            },
            $this->gmagick->getimagehistogram()
        );
    }
}

class Layers
{
    private $image;
    private $resource;

    public function __construct(Image $image, \Gmagick $resource)
    {
        $this->image = $image;
        $this->resource = $resource;
    }
}


for ($i=0; $i<5; $i++) {
    $image = new Image(new \Gmagick("magick:logo"));
    // the same fixture must beloaded twice to reprodcue the seg fault
    $image = new Image(new \Gmagick("magick:logo"));

    $image->histogram();
}

echo "ok";
?>
--EXPECT--
ok
tests/gmagick-062-labelimage.phpt000064400000000431151730207650012576 0ustar00--TEST--
labelImage test
--SKIPIF--
<?php
/* $Id: gmagick-062-labelimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->labelImage("test");
echo "ok";
?>
--EXPECTF--
ok
tests/gmagickdraw-021-rectangle.phpt000064400000000656151730207650013342 0ustar00--TEST--
Test rectangle
--SKIPIF--
<?php
/* $Id: gmagickdraw-021-rectangle.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$filename = dirname(__FILE__) . '/test_constructor.jpg';
$gm = new GMagick();
$gd = new GMagickDraw();
$gm->read("magick:rose");
$gd->rectangle(20,20,30,30);
$gm->drawImage($gd);
$gm->write($filename);
unlink($filename);
echo "ok";
?>
--EXPECT--
oktests/gmagick-073-profileimage.phpt000064400000000462151730207660013166 0ustar00--TEST--
profileImage test
--SKIPIF--
<?php
/* $Id: gmagick-073-profileimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->profileImage('icc', 'test_icc_profile');
echo "ok";
?>
--EXPECTF--
ok
tests/gmagick-086-swirlimage.phpt000064400000000425151730207660012671 0ustar00--TEST--
swirlImage test
--SKIPIF--
<?php
/* $Id: gmagick-086-swirlimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->swirlImage(0.2);
echo "ok";
?>
--EXPECTF--
oktests/gmagickdraw_039_pathStart_basic.phpt000064400000002766151730207660014673 0ustar00--TEST--
Test GmagickDraw, 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 \GmagickDraw();

    $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();

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

    $gmagick->drawImage($draw);

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

pathStart($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagick-017-destroy.phpt000064400000000404151730207670012207 0ustar00--TEST--
Destroy
--SKIPIF--
<?php
/* $Id: gmagick-017-destroy.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->destroy();
echo "ok";
?>
--EXPECTF--
oktests/gmagickdraw-007-setfillopacity_getfillopacity.phpt000064400000000477151730207670017537 0ustar00--TEST--
Test setfillopacity, getfillopacity
--SKIPIF--
<?php
/* $Id: gmagickdraw-007-setfillopacity_getfillopacity.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gd = new GMagickDraw();
$gd->setFillOpacity(0.8);
echo $gd->getFillOpacity();
?>
--EXPECT--
0.2tests/gmagick-011-charcoalimage.phpt000064400000000556151730207700013271 0ustar00--TEST--
Test charcoal image
--SKIPIF--
<?php
/* $Id: gmagick-011-charcoalimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$filename = dirname(__FILE__) . '/test_constructor.jpg';
$gm->read("magick:rose");
$gm->charcoalImage(3,3);
$gm->write($filename);
echo "ok";
?>
--EXPECT--
oktests/gmagick-114_convolveImage_6.phpt000064400000001210151730207700013607 0ustar00--TEST--
Test Gmagick, 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) {
    $gmagick = new \Gmagick("magick:logo");
    
    
    $gmagick->convolveImage($kernelMatrix);
    $bytes = $gmagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

convolveImage($bias, $kernelMatrix) ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagickdraw_037_setFillRule_basic.phpt000064400000003617151730207700015140 0ustar00--TEST--
Test GmagickDraw, 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 \GmagickDraw();

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

    $fillRules = array(\Gmagick::FILLRULE_NONZERO, \Gmagick::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();
        
        $currentFillRule = $draw->getFillRule();
        
        if ($currentFillRule !== $fillRules[$x]) {
            echo "Failed to get correct fillRule $currentFillRule != ".$fillRules[$x]." \n";
        }

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

    $image = new \Gmagick();
    $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--
Oktests/gmagick-016-despeckleimage.phpt000064400000000432151730207710013453 0ustar00--TEST--
Despeckle image
--SKIPIF--
<?php
/* $Id: gmagick-016-despeckleimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->despeckleImage();
echo "ok";
?>
--EXPECTF--
oktests/gmagick-029-set_getimagecolorspace.phpt000064400000000504151730207710015225 0ustar00--TEST--
Set, get imagecolorspace test
--SKIPIF--
<?php
/* $Id: gmagick-029-set_getimagecolorspace.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
echo $gm->setImageColorspace(2)->getImageColorspace();
?>
--EXPECTF--
2tests/gmagickdraw-014-setstrokewidth_getstrokewidth.phpt000064400000000466151730207710017606 0ustar00--TEST--
Test setstrokewidth, getstrokewidth
--SKIPIF--
<?php
/* $Id: gmagickdraw-014-setstrokewidth_getstrokewidth.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gd = new GMagickDraw();
echo $gd->setStrokeWidth(2)->getStrokeWidth();
?>
--EXPECT--
2tests/gmagick-066-medianfilterimage.phpt000064400000000452151730207720014167 0ustar00--TEST--
medianFilterImage test
--SKIPIF--
<?php
/* $Id: gmagick-066-medianfilterimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->medianFilterImage(0.5);
echo "ok";
?>
--EXPECTF--
oktests/gmagickdraw-023-roundrectangle.phpt000064400000000702151730207720014402 0ustar00--TEST--
Test round rectangle
--SKIPIF--
<?php
/* $Id: gmagickdraw-023-roundrectangle.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$filename = dirname(__FILE__) . '/test_constructor.jpg';
$gm = new GMagick();
$gd = new GMagickDraw();
$gm->read("magick:rose");
$gd->roundRectangle(30,30,35,35,5,5);
$gm->drawImage($gd);
$gm->write($filename);
unlink($filename);
echo "ok";
?>
--EXPECT--
oktests/gmagickdraw-004-arc.phpt000064400000000646151730207730012142 0ustar00--TEST--
Test arc
--SKIPIF--
<?php
/* $Id: gmagickdraw-004-arc.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$filename = dirname(__FILE__) . '/test_constructor.jpg';
$gm = new GMagick();
$gd = new GMagickDraw();
$gm->read("magick:rose");
$gd->arc(10, 10, 30, 30, 5, 10);
$gm->drawImage($gd);
$gm->write($filename);
unlink($filename);
echo "ok";
?>
--EXPECT--
oktests/gmagick-049-set_getimagetype.phpt000064400000000447151730207730014066 0ustar00--TEST--
Set, get imagetype
--SKIPIF--
<?php
/* $Id: gmagick-049-set_getimagetype.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
echo $gm->setImageType(6)->getImageType();
?>
--EXPECTF--
6tests/gmagick-061-implodeimage.phpt000064400000000435151730207730013152 0ustar00--TEST--
implode image test
--SKIPIF--
<?php
/* $Id: gmagick-061-implodeimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->implodeImage(0.5);
echo "ok";
?>
--EXPECTF--
ok
tests/gmagickdraw-005-bezier.phpt000064400000001345151730207740012654 0ustar00--TEST--
Test bezier
--SKIPIF--
<?php
/* $Id: gmagickdraw-005-bezier.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$filename = dirname(__FILE__) . '/test_constructor.jpg';
$gm = new GMagick();
$gd = new GMagickDraw();
$gm->read("magick:rose");
$gd->bezier( array(
                    array( "x" => 3 , "y" => 8 ),
                    array( "x" => 13, "y" => 16 ),
                    array( "x" => 20, "y" => 25 ),
                    array( "x" => 25, "y" => 23 ),
                    array( "x" => 33, "y" => 23 ),
                    array( "x" => 33, "y" => 3 ),
                 ) );
$gm->drawImage($gd);
$gm->write($filename);
unlink($filename);
echo "ok";
?>
--EXPECT--
oktests/gmagick-080-scaleimage.phpt000064400000000426151730207740012612 0ustar00--TEST--
scaleImage test
--SKIPIF--
<?php
/* $Id: gmagick-080-scaleimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->scaleImage(5, 5);
echo "ok";
?>
--EXPECTF--
oktests/gmagick-096-setinterlacescheme.phpt000064400000000351151730207750014374 0ustar00--TEST--
setInterlaceScheme test
--SKIPIF--
<?php
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$image = new Gmagick('magick:rose');
$image->setInterlaceScheme(Gmagick::INTERLACE_LINE);
echo "ok";
?>
--EXPECTF--
ok
tests/gmagick-005-draw.phpt000064400000001052151730207750011447 0ustar00--TEST--
Test read/write
--SKIPIF--
<?php
/* $Id: gmagick-005-draw.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$color = "rgb(255,255,123)";
$pixel = new GmagickPixel($color);
$gd = new GMagickDraw();
$gd->setStrokeColor($pixel)->setStrokeWidth( 2 )->setFillColor($pixel)->ellipse( 200, 100, 50, 50, 0, 360 );
$filename = dirname(__FILE__) . '/test_constructor.jpg';
$gm = new GMagick("magick:rose");
$gm->drawImage($gd);
$gm->write($filename);
unlink($filename);
echo "ok";
?>
--EXPECT--
ok
tests/gmagick-040-getimagehistogram.phpt000064400000000451151730207760014214 0ustar00--TEST--
Set, get image histogram
--SKIPIF--
<?php
/* $Id: gmagick-040-getimagehistogram.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->getImageHistogram();
echo "ok";
?>
--EXPECTF--
oktests/gmagick-039-getimageheight.phpt000064400000000432151730207760013476 0ustar00--TEST--
Set, get image height
--SKIPIF--
<?php
/* $Id: gmagick-039-getimageheight.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
echo $gm->getImageHeight();
?>
--EXPECTF--
46tests/gmagick-099-appendimages.phpt000064400000000351151730207760013166 0ustar00--TEST--
appendimages test
--SKIPIF--
<?php
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$image = new Gmagick('magick:rose');
$image->newImage(100, 50, "blue");
$image->appendImages();
echo "ok";
?>
--EXPECTF--
ok
tests/gmagickdraw-013-setstrokecolor_getstrokecolor.phpt000064400000000757151730207770017614 0ustar00--TEST--
Test setstrokecolor, getstrokecolor
--SKIPIF--
<?php
/* $Id: gmagickdraw-013-setstrokecolor_getstrokecolor.phpt 331869 2013-10-20 11:27:00Z remi $ */
if(!extension_loaded('gmagick')) die('skip');
if (Gmagick::QUANTUM_DEPTH != 8) die('skip QUANTUM_DEPTH='.Gmagick::QUANTUM_DEPTH);
?>
--FILE--
<?php
$color = "rgb(255,255,255)";
$pixel = new GmagickPixel($color);
$gd = new GMagickDraw();
print_r($gd->setStrokeColor($pixel)->getStrokeColor()->getColor());
?>
--EXPECT--
rgb(255,255,255)
tests/gmagickdraw_036_pushPattern_basic.phpt000064400000003007151730207770015222 0ustar00--TEST--
Test GmagickDraw, 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 \GmagickDraw();

    $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->pushGraphicContext();
    $draw->setFillPatternURL('#MyFirstPattern');
    $draw->setFillColor('yellow');
    $draw->rectangle(100, 100, 400, 400);
    $draw->popGraphicContext();

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

    $gmagick->drawImage($draw);

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

pushPattern($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagick-027-set_getimagebordercolor_q16.phpt000064400000000775151730207770016114 0ustar00--TEST--
Imagebordercolor test
--SKIPIF--
<?php
/* $Id: gmagick-027-set_getimagebordercolor.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
if (Gmagick::QUANTUM_DEPTH != 16) die('skip QUANTUM_DEPTH='.Gmagick::QUANTUM_DEPTH);
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$color=new GmagickPixel("rgb(255,255,255)");
$pixel = $gm->setImageBorderColor($color)->getImageBorderColor();
print_r($pixel->getColor());
?>
--EXPECTF--
rgb(65535,65535,65535)
tests/gmagick-091-getimage.phpt000064400000000404151730207770012303 0ustar00--TEST--
getImage test
--SKIPIF--
<?php
/* $Id: gmagick-086-getimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$image = new Gmagick('magick:rose');
$image->getImage();
echo "1";
?>
--EXPECTF--
1
tests/gmagick-122_unsharpMaskImage_basic.phpt000064400000001216151730207770015200 0ustar00--TEST--
Test Gmagick, unsharpMaskImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

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

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

unsharpMaskImage($radius, $sigma, $amount, $unsharpThreshold) ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagick-053-getpackagename.phpt000064400000000440151730207770013453 0ustar00--TEST--
get packagename
--SKIPIF--
<?php
/* $Id: gmagick-053-getpackagename.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
echo $gm->getPackageName();
?>
--EXPECTF--
GraphicsMagicktests/gmagick-035-set_getfilename.phpt000064400000000504151730207770013653 0ustar00--TEST--
Set, get filename
--SKIPIF--
<?php
/* $Id: gmagick-035-set_getfilename.phpt 295011 2010-02-13 17:06:23Z mkoppanen $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
echo $gm->setFilename("magickrose.png")->getFilename();
?>
--EXPECTF--
magickrose.pngtests/gmagick-065-mapimage.phpt000064400000000634151730207770012307 0ustar00--TEST--
mapImage test
--SKIPIF--
<?php
/* $Id: gmagick-065-mapimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
if (Gmagick::QUANTUM_DEPTH == 8) die('skip QUANTUM_DEPTH='.Gmagick::QUANTUM_DEPTH);
?>
--FILE--
<?php
$gm = new Gmagick();
$gm2 = new Gmagick();
$gm->read("magick:rose");
$gm2->read("magick:rose");
$gm->mapImage($gm2, true);
echo "ok";
?>
--EXPECTF--
ok
tests/gmagick-019-embossimage.phpt000064400000000423151730207770013015 0ustar00--TEST--
Emboss
--SKIPIF--
<?php
/* $Id: gmagick-019-embossimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->embossImage(0.8, 0.5);
echo "ok";
?>
--EXPECTF--
oktests/gmagick-003-resize_variations.phpt000064400000000656151730207770014263 0ustar00--TEST--
Test resize
--SKIPIF--
<?php
/* $Id: gmagick-003-resize_variations.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick("magick:rose");
$gm->resizeImage(10, 10, Gmagick::FILTER_LANCZOS, 0.5);
$gm->resizeImage(10, 10, Gmagick::FILTER_UNDEFINED, 0.5, true);
$gm->resizeImage(10, 10, Gmagick::FILTER_GAUSSIAN, 0.5, false);
echo "ok";
?>
--EXPECTF--
ok
tests/gmagick-028-set_getimagechanneldepth.phpt000064400000000517151730207770015541 0ustar00--TEST--
Set, get imagechanneldepth test
--SKIPIF--
<?php
/* $Id: gmagick-028-set_getimagechanneldepth.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
echo $gm->setImageChannelDepth(1,1)->getImageChannelDepth(1);
?>
--EXPECTF--
1tests/gmagick-100-coalesceimages.phpt000064400000000422151730207770013454 0ustar00--TEST--
coalesceimages test
--SKIPIF--
<?php
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$image = new Gmagick('magick:rose');
$image->newImage(100, 50, "blue");
$image->newImage(100, 50, "yellow");
$image->coalesceImages();
echo "ok";
?>
--EXPECTF--
ok
tests/gmagick-010-borderimage.phpt000064400000000634151730207770012775 0ustar00--TEST--
Test border image
--SKIPIF--
<?php
/* $Id: gmagick-010-borderimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$filename = dirname(__FILE__) . '/test_constructor.jpg';
$gm->read("magick:rose");
$color=new GmagickPixel("rgb(255,255,255)");
$gm->borderImage($color,3,3);
$gm->write($filename);
echo "ok";
?>
--EXPECT--
oktests/gmagick-101-sharpenimage.phpt000064400000000316151730207770013156 0ustar00--TEST--
sharpenimage test
--SKIPIF--
<?php
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$image = new Gmagick('magick:rose');
$image->sharpenImage(1.5, 1.2);
echo "ok";
?>
--EXPECTF--
ok
tests/gmagickdraw_044_setTextUnderColor_basic.phpt000064400000002052151730207770016340 0ustar00--TEST--
Test GmagickDraw, setTextUnderColor
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

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

function setTextUnderColor($strokeColor, $fillColor, $backgroundColor, $textUnderColor) {
    $draw = new \GmagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(2);
    $draw->setFontSize(72);
    $draw->annotate(50, 75, "Lorem Ipsum!");
    $draw->setTextUnderColor($textUnderColor);
    $draw->annotate(50, 175, "Lorem Ipsum!");

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

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

setTextUnderColor($strokeColor, $fillColor, $backgroundColor, $textUnderColor) ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagick-103-setgetimagecompression.phpt000064400000000404151730207770015273 0ustar00--TEST--
setImageCompression test
--SKIPIF--
<?php
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$image = new Gmagick('magick:rose');
$image->setImageCompression(Gmagick::COMPRESSION_JPEG);
echo $image->getImageCompression();
?>
--EXPECTF--
5tests/gmagick-036-set_getimagefilename.phpt000064400000000523151730207770014660 0ustar00--TEST--
Set, get imagefilename
--SKIPIF--
<?php
/* $Id: gmagick-036-set_getimagefilename.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
echo $gm->setImageFilename('magickrose.png')->getImageFilename();
?>
--EXPECTF--
magickrose.pngtests/gmagickdraw-006-setfillcolor_getfillcolor.phpt000064400000000743151730207770016647 0ustar00--TEST--
Test setfillcolor, getfillcolor
--SKIPIF--
<?php
/* $Id: gmagickdraw-006-setfillcolor_getfillcolor.phpt 331869 2013-10-20 11:27:00Z remi $ */
if(!extension_loaded('gmagick')) die('skip');
if (Gmagick::QUANTUM_DEPTH != 8) die('skip QUANTUM_DEPTH='.Gmagick::QUANTUM_DEPTH);
?>
--FILE--
<?php
$color = "rgb(255,255,255)";
$pixel = new GmagickPixel($color);
$gd = new GMagickDraw();
print_r($gd->setFillColor($pixel)->getFillColor()->getColor());
?>
--EXPECT--
rgb(255,255,255)
tests/gmagick-076-queryfonts.phpt000064400000000423151730207770012744 0ustar00--TEST--
queryFonts test
--SKIPIF--
<?php
/* $Id: gmagick-076-queryfonts.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->queryFonts();
echo "ok";
?>
--EXPECTF--
ok
tests/gmagickdraw-016-settextencoding_gettextencoding.phpt000064400000000506151730207770020061 0ustar00--TEST--
Test settextencoding, gettextencoding
--SKIPIF--
<?php
/* $Id: gmagickdraw-016-settextencoding_gettextencoding.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gd = new GMagickDraw();
echo $gd->setTextEncoding("UTF-8")->getTextEncoding();
?>
--EXPECT--
UTF-8tests/gmagick-084-spreadimage.phpt000064400000000430151730207770013003 0ustar00--TEST--
spreadImage test
--SKIPIF--
<?php
/* $Id: gmagick-084-spreadimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->spreadImage(0.2);
echo "ok";
?>
--EXPECTF--
oktests/gmagick-043-set_getimageprofile.phpt000064400000000531151730207770014535 0ustar00--TEST--
Set, get imageprofile
--SKIPIF--
<?php
/* $Id: gmagick-043-set_getimageprofile.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
echo $gm->setImageProfile("test", "test_profile")->getImageProfile("test");
?>
--EXPECTF--
test_profiletests/gmagickdraw-015-settextdecoration_gettextdecoration.phpt000064400000000544151730210000020740 0ustar00--TEST--
Test settextdecoration, gettextdecoration
--SKIPIF--
<?php
/* $Id: gmagickdraw-015-settextdecoration_gettextdecoration.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gd = new GMagickDraw();
echo $gd->setTextDecoration(Gmagick::DECORATION_UNDERLINE)->getTextDecoration();
?>
--EXPECT--
1tests/gmagick-034-set_getimagedispose.phpt000064400000000460151730210000014520 0ustar00--TEST--
Set, getimagedepth
--SKIPIF--
<?php
/* $Id: gmagick-034-set_getimagedispose.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
echo $gm->setImageDispose(2)->getImageDispose();
?>
--EXPECTF--
2tests/skipif.inc000064400000000372151730210000007655 0ustar00<?php

if (!extension_loaded("gmagick")) die("skip");

function checkClassMethods($class, $methods)
{
	foreach ($methods as $method) {
		if (method_exists($class, $method) == false) {
			die("skip Class method $class::$method not present");
		}
	}
}
tests/gmagick-014-current.phpt000064400000000420151730210000012150 0ustar00--TEST--
Test current
--SKIPIF--
<?php
/* $Id: gmagick-014-current.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm2 = $gm->current();
echo "ok";
?>
--EXPECTF--
oktests/gmagick-024-getcopyright_getfilename.phpt000064400000000505151730210000015543 0ustar00--TEST--
Test getCopyright, getFileName
--SKIPIF--
<?php
/* $Id: gmagick-024-getcopyright_getfilename.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->getCopyright();
$gm->getFilename();
echo "ok";
?>
--EXPECTF--
oktests/gmagick-072-oilpaintimage.phpt000064400000000437151730210000013324 0ustar00--TEST--
oilPaintImage test
--SKIPIF--
<?php
/* $Id: gmagick-072-oilpaintimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->oilPaintImage(0.2);
echo "ok";
?>
--EXPECTF--
ok
tests/gmagick-071-next_previousimage.phpt000064400000000470151730210000014413 0ustar00--TEST--
next,previousImage test
--SKIPIF--
<?php
/* $Id: gmagick-071-next_previousimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->nextImage();
$gm->previousImage();
echo "ok";
?>
--EXPECTF--
ok
tests/gmagick-113_compareImages.phpt000064400000001716151730210000013335 0ustar00--TEST--
Test PHP bug #59378 writing to php://memory is incomplete
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$gmagick = new Gmagick("magick:logo");
//$gmagick->setFormat("png");

$fp = fopen("php://memory", 'r+');
$gmagick->writeImageFile($fp);
rewind($fp);
$memoryBlob = stream_get_contents($fp);
fclose($fp);

//This test depends on getImageBlob working correctly.
$imageBlob = $gmagick->getImageBlob();

//Read the images from the data blobs.
$imageReopened = new Gmagick();
$imageReopened->readImageBlob($imageBlob);
$memoryReopened = new Gmagick();
$memoryReopened->readImageBlob($memoryBlob);

//Compare to see if they are identical.
$result = $imageReopened->compareImages($memoryReopened, \Gmagick::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.
tests/bug71626.phpt000064400000001476151730210000007763 0ustar00--TEST--
Test bug 71626 - multiple calls to queryFontMetrics
--SKIPIF--
<?php

if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php

$textWidth = null;

for ($i=0; $i<5; $i++) {
	$image = new Gmagick();
	$fontDraw = new GmagickDraw();
	$fontMetrics = $image->queryFontMetrics($fontDraw, 'g');

	if (is_array($fontMetrics) === false ||
		isset($fontMetrics['textWidth']) === false) {
		echo "fontMetrics contains bad data".PHP_EOL;
		var_dump($fontMetrics);
	}
}


for ($i=0; $i<5; $i++) {
	$gmagick = new \Gmagick("magick:logo");
	$fontDraw = new GmagickDraw();
	$fontMetrics = $image->queryFontMetrics($fontDraw, 'g');

	if (is_array($fontMetrics) === false ||
		isset($fontMetrics['textWidth']) === false) {
		echo "fontMetrics contains bad data".PHP_EOL;
		var_dump($fontMetrics);
	}
}


echo "ok";
?>
--EXPECT--
ok
tests/gmagick-081-separateimagechannel.phpt000064400000000461151730210000014637 0ustar00--TEST--
separateImageChannel test
--SKIPIF--
<?php
/* $Id: gmagick-081-separateimagechannel.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->separateImageChannel(1);
echo "ok";
?>
--EXPECTF--
oktests/gmagick-121_deconstructGif_basic.phpt000064400000004274151730210000014706 0ustar00--TEST--
Test Tutorial, deconstructGif
--SKIPIF--
<?php

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

checkClassMethods("GmagickDraw", array('circle', 'translate'));

?>
--XFAIL--
GraphicMagick has multiple issues with 'image counts'. It appears to be confused how many images are in the list. 
--FILE--
<?php

$aniGif = new \Gmagick();
$aniGif->setFormat("gif");

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

$background = new \Gmagick();
$background->newImage($imageSize, $imageSize, "gray");

$blackWhite = new \Gmagick();
$blackWhite->newImage($imageSize, $imageSize, "white");

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

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

$backgroundPalette->addimage($blackWhitePalette);

/*
for($count=0 ; $count<$imageFrames ; $count++) {
	echo "Frame: ".$count."\n";
	$drawing = new \GmagickDraw();
	$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->setImageDelay(10);
	
	$frame = new Gmagick();
	$frame->newimage( int $width , int $height , string $background [, string $format ] )
	
	
	$aniGif->addImage($frame);
}
*/

$colors = array(
	"Red",
	"Orange",
	"Yellow",
	"Green",
	"Indigo",
	"Violet",
);

foreach ($colors as $color) {
	$frame = new Gmagick();
	$frame->newimage(100, 100, $color);
	$aniGif->addImage($frame);
}

$aniGif->setImageFormat('gif');

//Even this fails.
//$aniGif->writeImage("./testgif.gif");

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

echo "Ok";
?>
--EXPECTF--
Frame: 0
Frame: 1
Frame: 2
Frame: 3
Frame: 4
Frame: 5
Oktests/gmagickpixel-006-setcolorcount.phpt000064400000000516151730210000014442 0ustar00--TEST--
Test getColorcount method
--SKIPIF--
<?php
/* $Id: gmagickpixel-003-getcolorcount.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$color = "rgb(255,255,255)";
$pixel = new GmagickPixel($color);
$pixel->setColorCount(2);
echo $pixel->getColorCount();
?>
--EXPECTF--
2tests/gmagickdraw_034_setClipRule_basic.phpt000064400000002554151730210000015120 0ustar00--TEST--
Test GmagickDraw, 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 \GmagickDraw();

    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeOpacity(1);
    $draw->setStrokeWidth(2);
    //\Gmagick::FILLRULE_EVENODD
    //\Gmagick::FILLRULE_NONZERO

    $clipPathName = 'testClipPath';
    $draw->pushClipPath($clipPathName);
    $draw->setClipRule(\Gmagick::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 !== \Gmagick::FILLRULE_EVENODD) {
        echo "Failed to get correct clipRule $clipRule != \Gmagick::FILLRULE_EVENODD \n";
    }

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

    $gmagick->drawImage($draw);

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

setClipRule($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagick-088-getimageblob.phpt000064400000000435151730210000013130 0ustar00--TEST--
getimageBlob test
--SKIPIF--
<?php
/* $Id: gmagick-086-setcompressionquality.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick("magick:rose");
$blob = $gm->getimageBlob();
echo "ok";
?>
--EXPECTF--
ok
tests/gmagick-031-set_getimagecompose.phpt000064400000000467151730210010014524 0ustar00--TEST--
Set and get image compose
--SKIPIF--
<?php
/* $Id: gmagick-031-set_getimagecompose.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
echo $gm->setImageCompose(1)->getImageCompose();
?>
--EXPECTF--
1tests/gmagick-078-rollimage.phpt000064400000000422151730210010012456 0ustar00--TEST--
rollImage test
--SKIPIF--
<?php
/* $Id: gmagick-078-rollimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->rollImage(5,5);
echo "ok";
?>
--EXPECTF--
oktests/gmagick-085-stripimage.phpt000064400000000422151730210010012645 0ustar00--TEST--
stripImage test
--SKIPIF--
<?php
/* $Id: gmagick-085-stripimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->stripImage();
echo "ok";
?>
--EXPECTF--
oktests/gmagick-079-rotateimage.phpt000064400000000515151730210010013010 0ustar00--TEST--
rotateImage test
--SKIPIF--
<?php
/* $Id: gmagick-079-rotateimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$color=new GmagickPixel("rgb(255,255,255)");
$gm->rotateImage($color, 0.8);
echo "ok";
?>
--EXPECTF--
oktests/gmagickdraw-031-setdashstrokearray_getdashstrokearray.phpt000064400000000617151730210010021264 0ustar00--TEST--
Test set and get stroke dash array
--SKIPIF--
<?php
/* $Id: gmagickdraw-031-setdashstrokearray_getdashstrokearray.phpt 280206 2013-12-14 18:04:00Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
    $gDraw = new GmagickDraw();
    $gDraw->setStrokeDashArray(array(3, 2));
    print_r($gDraw->getStrokeDashArray());
?>
--EXPECT--
Array
(
    [0] => 3
    [1] => 2
)tests/gmagickdraw-013-setstrokecolor_getstrokecolor_q16.phpt000064400000000766151730210020020261 0ustar00--TEST--
Test setstrokecolor, getstrokecolor
--SKIPIF--
<?php
/* $Id: gmagickdraw-013-setstrokecolor_getstrokecolor.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
if (Gmagick::QUANTUM_DEPTH != 16) die('skip QUANTUM_DEPTH='.Gmagick::QUANTUM_DEPTH);
?>
--FILE--
<?php
$color = "rgb(255,255,255)";
$pixel = new GmagickPixel($color);
$gd = new GMagickDraw();
print_r($gd->setStrokeColor($pixel)->getStrokeColor()->getColor());
?>
--EXPECT--
rgb(65535,65535,65535)
tests/gmagick-022-flip_and_flop_image.phpt000064400000000451151730210020014431 0ustar00--TEST--
Flip and flop image
--SKIPIF--
<?php
/* $Id: gmagick-022-flip_and_flop_image.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->flipImage()->flopImage();
echo "1";
?>
--EXPECTF--
1tests/gmagick-089-getnumberimages.phpt000064400000000430151730210020013663 0ustar00--TEST--
getNumberImages test
--SKIPIF--
<?php
/* $Id: gmagick-086-setcompressionquality.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick("magick:rose");
print_r($gm->getNumberImages());
?>
--EXPECTF--
1
tests/gmagick-123_sharpenImage_basic.phpt000064400000000740151730210020014324 0ustar00--TEST--
Test Gmagick, sharpenImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$radius = 5;
$sigma = 1;

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

sharpenImage($radius, $sigma);
echo "Ok";
?>
--EXPECTF--
Oktests/gmagick-106-testConstants.phpt000064400000000553151730210020013355 0ustar00--TEST--
Test contants have symbols.
--SKIPIF--
<?php
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$image = new Gmagick('magick:rose');
$reflClass = new ReflectionClass('Gmagick');
// This just checks that the symbols that Gmagick was compiled with
// are actually present.
$constants = $reflClass->getConstants();

echo "ok";
?>
--EXPECTF--
oktests/gmagickdraw_041_popDefs_basic.phpt000064400000001742151730210030014264 0ustar00--TEST--
Test GmagickDraw, 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 \GmagickDraw();

    $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);

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

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

popDefs($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagick-068-modulateimage.phpt000064400000000451151730210030013323 0ustar00--TEST--
modulateImage test
--SKIPIF--
<?php
/* $Id: gmagick-068-modulateimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->modulateImage(0.2, 0.2, 0.2);
echo "ok";
?>
--EXPECTF--
ok
tests/gmagickdraw-006-setfillcolor_getfillcolor_q16.phpt000064400000000752151730210030017315 0ustar00--TEST--
Test setfillcolor, getfillcolor
--SKIPIF--
<?php
/* $Id: gmagickdraw-006-setfillcolor_getfillcolor.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
if (Gmagick::QUANTUM_DEPTH != 16) die('skip QUANTUM_DEPTH='.Gmagick::QUANTUM_DEPTH);
?>
--FILE--
<?php
$color = "rgb(255,255,255)";
$pixel = new GmagickPixel($color);
$gd = new GMagickDraw();
print_r($gd->setFillColor($pixel)->getFillColor()->getColor());
?>
--EXPECT--
rgb(65535,65535,65535)
tests/gmagick-117_haldClutImage_basic.phpt000064400000001025151730210030014425 0ustar00--TEST--
Test Gmagick, haldClutImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function haldClutImage() {
    $gmagick = new \Gmagick("magick:logo");
    $gmagickPalette = new \Gmagick(__DIR__."/hald_8.png");

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

haldClutImage() ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagick-058-getversion.phpt000064400000000423151730210030012671 0ustar00--TEST--
getVersion test
--SKIPIF--
<?php
/* $Id: gmagick-058-getversion.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->getVersion();
echo "ok";
?>
--EXPECTF--
ok
tests/bug_71742.phpt000064400000001750151730210030010117 0ustar00--TEST--
Bug #71742 polyline touched by array_walk
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc');
--FILE--
<?php

$coordinates = [];

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 GMagick();
$imagick->newImage(200, 200, "white");

$draw = new GmagickDraw();
$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--
Oktests/gmagick-118_shaveImage_basic.phpt000064400000000632151730210030013777 0ustar00--TEST--
Test Gmagick, shaveImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


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

shaveImage() ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagickdraw-009-setfontsize_getfontsize.phpt000064400000000444151730210040016360 0ustar00--TEST--
Test setfontsize, getfontsize
--SKIPIF--
<?php
/* $Id: gmagickdraw-009-setfontsize_getfontsize.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gd = new GMagickDraw();
echo $gd->setFontSize(1)->getFontSize();
?>
--EXPECT--
1tests/gmagick-026-set_getimageblueprimary.phpt000064400000000571151730210040015415 0ustar00--TEST--
Set, get imageblueprimary test
--SKIPIF--
<?php
/* $Id: gmagick-026-set_getimageblueprimary.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
print_r($gm->setImageBluePrimary(0.2, 0.2)->getImageBluePrimary());
?>
--EXPECTF--
Array
(
    [x] => 0.2
    [y] => 0.2
)tests/gmagick-032-set_getimagedelay.phpt000064400000000460151730210040014152 0ustar00--TEST--
Set, getimagedelay test 
--SKIPIF--
<?php
/* $Id: gmagick-032-set_getimagedelay.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
echo $gm->setImageDelay(2)->getImageDelay();
?>
--EXPECTF--
2tests/gmagick-098-cloneimage.phpt000064400000000314151730210040012613 0ustar00--TEST--
cloneimage test
--SKIPIF--
<?php
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$image = new Gmagick('magick:rose');
$cloned = $image->cloneimage();
echo "ok";
?>
--EXPECTF--
ok
tests/gmagick-025-set_and_getimageckgroundcolor_q16.phpt000064400000001067151730210040017246 0ustar00--TEST--
Test setImageBackgroundColor and getImageBackgroundColor methods
--SKIPIF--
<?php
/* $Id: gmagick-025-set_and_getimageckgroundcolor.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
if (Gmagick::QUANTUM_DEPTH != 16) die('skip QUANTUM_DEPTH='.Gmagick::QUANTUM_DEPTH);
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$color=new GmagickPixel("rgb(255,255,255)");
$pixel =  $gm->setImageBackgroundColor($color)->getimagebackgroundcolor();
print_r($pixel->getColor());
?>
--EXPECTF--
rgb(65535,65535,65535)
tests/gmagick-059-hasnextimage.phpt000064400000000431151730210040013162 0ustar00--TEST--
hasNextImage test
--SKIPIF--
<?php
/* $Id: gmagick-059-hasnextimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->hasNextImage();
echo "ok";
?>
--EXPECTF--
ok
tests/gmagick-006-annotateimage.phpt000064400000000637151730210040013321 0ustar00--TEST--
Test annotate image
--SKIPIF--
<?php
/* $Id: gmagick-006-annotateimage.phpt 333024 2014-03-17 05:37:54Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new GMagick();
$gd = new GMagickDraw();
$gm->read("magick:rose");

$fonts = $gm->queryFonts();

if (!empty($fonts))
    $gd->setFont($fonts[0]);

$gm->annotateImage($gd, 5, 15, 0, 'Test Text');
echo "ok";
?>
--EXPECT--
ok
tests/gmagickdraw-024-scale.phpt000064400000000673151730210040012452 0ustar00--TEST--
Test scale
--SKIPIF--
<?php
/* $Id: gmagickdraw-024-scale.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$filename = dirname(__FILE__) . '/test_constructor.jpg';
$gm = new GMagick();
$gd = new GMagickDraw();
$gm->read("magick:rose");
$gd->rectangle(20,20,30,30);
$gd->scale(0.5,0.5);
$gm->drawImage($gd);
$gm->write($filename);
unlink($filename);
echo "ok";
?>
--EXPECT--
oktests/gmagickdraw-001-setstrokecolor_setstrokewidth.phpt000064400000000607151730210040017600 0ustar00--TEST--
Test set stroke color, set stroke width
--SKIPIF--
<?php
/* $Id: gmagickdraw-001-setstrokecolor_setstrokewidth.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$color = "rgb(255,255,123)";
$pixel = new GmagickPixel($color);
$gd = new GMagickDraw();
$gd->setStrokeColor($pixel)->setStrokeWidth(2);
echo "ok";
?>
--EXPECT--
oktests/gmagickdraw-008-setfont_getfont.phpt000064400000000504151730210040014566 0ustar00--TEST--
Test setfont, getfont
--SKIPIF--
<?php
/* $Id: gmagickdraw-008-setfont_getfont.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gd = new GMagickDraw();
echo strstr($gd->setFont(dirname(__FILE__) . "/Vera.ttf")->getFont(),"Vera.ttf");
?>
--EXPECT--
Vera.ttftests/gmagickdraw-018-point.phpt000064400000000634151730210040012514 0ustar00--TEST--
Test point
--SKIPIF--
<?php
/* $Id: gmagickdraw-018-point.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$filename = dirname(__FILE__) . '/test_constructor.jpg';
$gm = new GMagick();
$gd = new GMagickDraw();
$gm->read("magick:rose");
$gd->point(20,20);
$gm->drawImage($gd);
$gm->write($filename);
unlink($filename);
echo "ok";
?>
--EXPECT--
oktests/gmagickdraw-028-setlinecap_getlinecap.phpt000064400000000472151730210040015706 0ustar00--TEST--
Test set and get line cap
--SKIPIF--
<?php
/* $Id: gmagickdraw-028-setlinecap_getlinecap.phpt 280206 2013-11-05 12:46:00Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
	$gDraw = new GmagickDraw();
	$gDraw->setStrokeLineCap(2);
	echo $gDraw->getStrokeLineCap();
?>
--EXPECT--
2
tests/gmagick-030-getimagecolors.phpt000064400000000436151730210040013503 0ustar00--TEST--
Getimagecolors test
--SKIPIF--
<?php
/* $Id: gmagick-030-getimagecolors.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
print_r($gm->getImageColors());
?>
--EXPECTF--
3019tests/gmagick-125_radialBlurImage_basic.phpt000064400000001005151730210040014744 0ustar00--TEST--
Test Gmagick, radialBlurImage
--SKIPIF--
<?php

die("skip - not implemented by GraphicsMagick");

//checkClassMethods('Gmagick', array('radialBlurImage'));
?>
--FILE--
<?php


function radialBlurImage() {
    $gmagick = new \Gmagick("magick:logo");
    $gmagick->radialBlurImage(3);
    $gmagick->radialBlurImage(5);
    $gmagick->radialBlurImage(7);
    $bytes = $gmagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

radialBlurImage() ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagickdraw_038_setFontStretch_basic.phpt000064400000003143151730210040015647 0ustar00--TEST--
Test GmagickDraw, setFontStretch
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

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

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

    $draw = new \GmagickDraw();

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

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

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

        if ($currentFontStretch !== $fontStretch) {
            echo "Failed to get correct fontStretch $currentFontStretch != $fontStretch \n";
        }
    }

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

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

setFontStretch($fillColor, $strokeColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagick-050-set_getimageunits.phpt000064400000000453151730210040014220 0ustar00--TEST--
Set, get imageunits
--SKIPIF--
<?php
/* $Id: gmagick-050-set_getimageunits.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
echo $gm->setImageUnits(2)->getImageUnits();
?>
--EXPECTF--
2tests/gmagickdraw-017-line.phpt000064400000000640151730210040012306 0ustar00--TEST--
Test line
--SKIPIF--
<?php
/* $Id: gmagickdraw-017-line.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$filename = dirname(__FILE__) . '/test_constructor.jpg';
$gm = new GMagick();
$gd = new GMagickDraw();
$gm->read("magick:rose");
$gd->line(8, 8, 18, 18);
$gm->drawImage($gd);
$gm->write($filename);
unlink($filename);
echo "ok";
?>
--EXPECT--
oktests/gmagick-047-set_getimagescene.phpt000064400000000453151730210040014161 0ustar00--TEST--
Set, get imagescene
--SKIPIF--
<?php
/* $Id: gmagick-047-set_getimagescene.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
echo $gm->setImageScene(1)->getImageScene();
?>
--EXPECTF--
1tests/gmagickdraw-020-polyline.phpt000064400000001576151730210040013215 0ustar00--TEST--
Test polyline
--SKIPIF--
<?php
/* $Id: gmagickdraw-020-polyline.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php

$intPoints = array(
    array( 'x' => 3, 'y' => 4 ), 
    array( 'x' => 2, 'y' => 6 ),
    array( 'x' => 5, 'y' => 10 ),
    array( 'x' => 3, 'y' => 4 )
);

$floatPoints = array(
    array( 'x' => 3.5, 'y' => 4.5 ), 
    array( 'x' => 2.5, 'y' => 6.5 ),
    array( 'x' => 5.5, 'y' => 10.5 ),
    array( 'x' => 3.5, 'y' => 4.5 )
);

$tests = array(
    $intPoints,
    $floatPoints
);

foreach ($tests as $polArray) {
    $filename = dirname(__FILE__) . '/test_constructor.jpg';
    $gm = new GMagick();
    $gd = new GMagickDraw();
    $gm->read("magick:rose");  
    $gd->polyline($polArray);
    $gm->drawImage($gd);
    $gm->write($filename);
    unlink($filename);
    echo "ok".PHP_EOL;
}
?>
--EXPECT--
ok
oktests/gmagick-002-crop_variations.phpt000064400000000677151730210040013707 0ustar00--TEST--
Test crop with and without an image
--SKIPIF--
<?php
/* $Id: gmagick-002-crop_variations.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose")->cropImage(10, 10, 10, 10);
echo "ok\n--\n";
$gm = new Gmagick();
try {
	$gm->cropImage(10, 10, 10, 10);
} catch (GmagickException $e) {
	echo "got exception";
}
?>
--EXPECTF--
ok
--
got exceptiontests/gmagick-004-composite_variations.phpt000064400000001010151730210040014726 0ustar00--TEST--
Test composite variations
--SKIPIF--
<?php
/* $Id: gmagick-004-composite_variations.phpt 294865 2010-02-10 23:50:11Z mkoppanen $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick("magick:rose");
$source = new Gmagick();

try {
	$gm->compositeImage($source, Gmagick::COMPOSITE_OVER, 0, 0);
} catch (Exception $e) {
	echo "got exception\n";
}

$source->read("magick:rose");
$gm->compositeImage($source, Gmagick::COMPOSITE_OVER, 0, 0);

echo "ok";
?>
--EXPECTF--
got exception
oktests/gmagick-051-set_getimagewhitepoint.phpt000064400000000560151730210040015250 0ustar00--TEST--
Set, get imagewhitepoint
--SKIPIF--
<?php
/* $Id: gmagick-051-set_getimagewhitepoint.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
print_r($gm->setImageWhitePoint(0.2, 0.2)->getImageWhitePoint());
?>
--EXPECTF--
Array
(
    [x] => 0.2
    [y] => 0.2
)tests/gmagick-020-enhanceimage.phpt000064400000000416151730210040013100 0ustar00--TEST--
Enhance
--SKIPIF--
<?php
/* $Id: gmagick-020-enhanceimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->enhanceImage();
echo "ok";
?>
--EXPECTF--
oktests/gmagick-007-blurimage.phpt000064400000000573151730210040012454 0ustar00--TEST--
Test blur image
--SKIPIF--
<?php
/* $Id: gmagick-007-blurimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$filename = dirname(__FILE__) . '/test_constructor.jpg';
$gm = new GMagick();
$gm->read("magick:rose");
$gm->blurImage(5, 3);
$gm->writeImage($filename);
unlink($filename);
echo "ok";
?>
--EXPECT--
oktests/gmagick-064-magnifyimage.phpt000064400000000430151730210040013135 0ustar00--TEST--
magnifyImage test
--SKIPIF--
<?php
/* $Id: gmagick-064-magnifyimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->magnifyImage();
echo "ok";
?>
--EXPECTF--
oktests/gmagickdraw-029-setlinejoin_getlinejoin.phpt000064400000000473151730210040016300 0ustar00--TEST--
Test stroke line join
--SKIPIF--
<?php
/* $Id: gmagickdraw-0229-setlinejoin_getlinejoin.phpt 280206 2013-11-05 12:46:00Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
	$gDraw = new GmagickDraw();
	$gDraw->setStrokeLineJoin(2);
	echo $gDraw->getStrokeLineJoin();
?>
--EXPECT--
2
tests/gmagick-055-getreleasedate.phpt000064400000000432151730210040013460 0ustar00--TEST--
get releasedate
--SKIPIF--
<?php
/* $Id: gmagick-055-getreleasedate.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->getReleaseDate();
echo "ok";
?>
--EXPECTF--
oktests/gmagick-129_gettersAndSetters.phpt000064400000004727151730210040014253 0ustar00--TEST--
Test static methods
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$gmagick = new \Gmagick("magick:logo");






$gmagick->getImageVirtualPixelMethod();
$gmagick->getImageBackgroundColor();
$gmagick->getImageBluePrimary();
$gmagick->getImageBorderColor();
$gmagick->getImagesBlob();
$gmagick->getImageColorspace();
$gmagick->getImageCompose();
$gmagick->getImageDelay();
$gmagick->getImageDepth();
$gmagick->getImageCompression();
$gmagick->getImageDispose();
$gmagick->getImageExtrema();
$gmagick->getImageFilename();
$gmagick->getImageFormat();
$gmagick->getImageGamma();
$gmagick->getImageGreenPrimary();
$gmagick->getImageIndex();
$gmagick->getImageInterlaceScheme();
$gmagick->getImageIterations();
$gmagick->getImageMatteColor();

$gmagick->getImageRedPrimary();
$gmagick->getImageRenderingIntent();
$gmagick->getImageResolution();
$gmagick->getImageScene();
$gmagick->getImageBoundingbox(0.1);
$gmagick->getImageFuzz();
$gmagick->getImageSavedType();

$gmagick->getImageType();
$gmagick->getImageUnits();
$gmagick->getImageWhitepoint();

$gmagick->getSamplingfactors();
$gmagick->getSize();
$gmagick->getImageGeometry();
$gmagick->setImageAttribute("comment", "this is a comment");
$gmagick->setImageColormapColor(0, 'red');

$gmagick->setImageMatteColor('pink');
$gmagick->setDepth(16);
$gmagick->setImageFuzz(0.1 * \GMAGICK::QUANTUM);
$gmagick->setImageOption("jpeg", "preserve-settings", "true");
$gmagick->setImageSavedType(\GMAGICK::IMGTYPE_TRUECOLOR);
$gmagick->setResolutionUnits(\GMAGICK::RESOLUTION_PIXELSPERCENTIMETER);
$gmagick->setImageIndex(0);
$gmagick->setInterlaceScheme(\GMAGICK::INTERLACE_PLANE);
$gmagick->setImageCompression(\GMAGICK::COMPRESSION_NO);
$gmagick->setImageFormat("BMP");

$gmagick->setResourceLimit(\GMAGICK::RESOURCETYPE_MEMORY, 16*1024*1024);
$gmagick->getImageAttribute("comment");
$gmagick->getImageChannelExtrema(\GMAGICK::CHANNEL_RED);
$gmagick->getImageChannelMean(\GMAGICK::CHANNEL_RED);
$gmagick->getImageColormapColor(0);
$gmagick->getImageChannelDepth(\GMAGICK::CHANNEL_RED);
$gmagick->getResourceLimit(\GMAGICK::RESOURCETYPE_MEMORY);

if (method_exists($gmagick, 'setImageGravity')) {
	$gmagick->setImageGravity(\GMAGICK::GRAVITY_SOUTHWEST);
}

if (method_exists($gmagick, 'getImageGravity')) {
	$gmagick->getImageGravity();
}

if (method_exists($gmagick, 'getImagePage')) {
	$gmagick->getImagePage();
}


// Don't know how to call this successfully.
// $gmagick->get ImageProfile("ICC");


echo 'ok';

?>
--EXPECT--
oktests/gmagickdraw-026-setgravity_getgravity.phpt000064400000000552151730210040016027 0ustar00--TEST--
Test affine
--SKIPIF--
<?php
/* $Id: gmagickdraw-025-affine.phpt 280206 2010-08-07 12:46:00Z vito $ */
require_once(dirname(__FILE__) . '/skipif.inc');

checkClassMethods(
    'GmagickDraw',
    array('setGravity', 'getGravity')
);
?>
--FILE--
<?php
    $gDraw = new GmagickDraw();
    $gDraw->setGravity(2);
	echo $gDraw->getGravity();
?>
--EXPECT--
2
tests/gmagick-018-edgeimage.phpt000064400000000410151730210040012404 0ustar00--TEST--
Edge
--SKIPIF--
<?php
/* $Id: gmagick-018-edgeimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->edgeImage(0.8);
echo "ok";
?>
--EXPECTF--
oktests/gmagick-124__reduceNoiseImage_basic.phpt000064400000001033151730210040015267 0ustar00--TEST--
Test Gmagick, reduceNoiseImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Gmagick', array('reduceNoiseImage'));
?>
--FILE--
<?php

$reduceNoise = 5;

function reduceNoiseImage($reduceNoise) {
    $gmagick = new \Gmagick("magick:logo");
    @$gmagick->reduceNoiseImage($reduceNoise);
    $bytes = $gmagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

reduceNoiseImage($reduceNoise) ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagickpixel-001-setcolor_getcolor.phpt000064400000001053151730210040015263 0ustar00--TEST--
Test setColor and getColor methods
--SKIPIF--
<?php
/* $Id: gmagickpixel-001-setcolor_getcolor.phpt 331869 2013-10-20 11:27:00Z remi $ */
if(!extension_loaded('gmagick')) die('skip');
if (Gmagick::QUANTUM_DEPTH != 8) die('skip QUANTUM_DEPTH='.Gmagick::QUANTUM_DEPTH);
?>
--FILE--
<?php
$color = "rgb(255,255,255)";
$pixel = new GmagickPixel($color);
echo strcmp($color, $pixel->getColor()) . "\n";
var_dump($pixel->setColor($pixel->getColor()));
echo strcmp($color, $pixel->getColor()) . "\n";
?>
--EXPECTF--
0
object(GmagickPixel)#%d (%d) {
}
0
tests/gmagick-054-getquantumdepth.phpt000064400000001352151730210040013722 0ustar00--TEST--
get quantumdepth
--SKIPIF--
<?php
/* $Id: gmagick-054-getquantumdepth.phpt 331865 2013-10-19 09:28:23Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$q=$gm->getQuantumDepth();
if (is_array($q) && count($q)==2 && isset($q['quantumDepthLong']) && isset($q['quantumDepthString'])) {
   echo "Struct OK\n";
   if ($q['quantumDepthLong']=='8' && $q['quantumDepthString']=='Q8') {
       echo "Quantum OK\n";
   } else if ($q['quantumDepthLong']=='16' && $q['quantumDepthString']=='Q16') {
       echo "Quantum OK\n";
   } else {
       echo "Quantum KO\n";
       print_r($q);
   }
} else {
   echo "Struct KO\n";
   print_r($q);
}
?>
--EXPECTF--
Struct OK
Quantum OKtests/gmagick-128_staticMethods.phpt000064400000000620151730210040013377 0ustar00--TEST--
Test static methods
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$gmagick = new Gmagick ();

//echo gettype (Gmagick::queryFormats ()) . PHP_EOL;
echo gettype ($gmagick->queryFormats ()) . PHP_EOL;

//echo gettype (Gmagick::queryFonts ()) . PHP_EOL;
echo gettype ($gmagick->queryFonts ()) . PHP_EOL;

echo 'success';

?>
--EXPECT--
array
array
successtests/gmagick-119_thumbnail_fill.phpt000064400000000777151730210040013572 0ustar00--TEST--
Test filling thumbnail with color
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc');

$v = Gmagick::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

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


echo "ok"
?>
--EXPECT--

oktests/gmagick-012-chopimage.phpt000064400000000554151730210040012434 0ustar00--TEST--
Test chop image
--SKIPIF--
<?php
/* $Id: gmagick-012-chopimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$filename = dirname(__FILE__) . '/test_constructor.jpg';
$gm->read("magick:rose");
$gm->chopImage(10, 10, 0, 0);
$gm->write($filename);
echo "ok";
?>
--EXPECTF--
oktests/gmagickdraw-011-setfontweight_getfontweight.phpt000064400000000464151730210040017205 0ustar00--TEST--
Test setfontweight, getfontweight
--SKIPIF--
<?php
/* $Id: gmagickdraw-011-setfontweight_getfontweight.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gd = new GMagickDraw();
echo $gd->setFontWeight(101)->getFontWeight();
?>
--EXPECT--
101tests/gmagick-108_adaptiveThresholdImage_basic.phpt000064400000001251151730210040016341 0ustar00--TEST--
Test Gmagick, 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) {
    $gmagick = new \Gmagick('magick:rose');
    $adaptiveOffsetQuantum = intval($adaptiveOffset * \Gmagick::QUANTUM);
    $gmagick->adaptiveThresholdImage($width, $height, $adaptiveOffsetQuantum);
    $bytes = $gmagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

adaptiveThresholdImage($width, $height, $adaptiveOffset) ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagick-008-addimage.phpt000064400000000455151730210040012240 0ustar00--TEST--
Test add image
--SKIPIF--
<?php
/* $Id: gmagick-008-addimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new GMagick();
$image = new GMagick();
$image->read("magick:rose");
$gm->addImage($image);
echo "ok";
?>
--EXPECT--
oktests/gmagickdraw-003-annotate.phpt000064400000000710151730210040013161 0ustar00--TEST--
Test annotate
--SKIPIF--
<?php
/* $Id: gmagickdraw-003-annotate.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$filename = dirname(__FILE__) . '/test_constructor.jpg';
$gm = new GMagick();
$gd = new GMagickDraw();
$gm->read("magick:rose");//->write($filename);
$gd->annotate(10, 20, "Test Text");
$gm->drawImage($gd);
$gm->write($filename);
unlink($filename);
echo "ok";
?>
--EXPECT--
oktests/gmagick-109_affineTransformImage_basic.phpt000064400000001300151730210040016007 0ustar00--TEST--
Test Gmagick, affineTransformImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php


function affineTransformImage() {
    $gmagick = new \Gmagick("magick:logo");
    $draw = new \GmagickDraw();

    $angle = 40 ;

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

    $draw->affine($affineRotate);

    $gmagick->affineTransformImage($draw);

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

affineTransformImage() ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagick-033-set_getimagedepth.phpt000064400000000452151730210040014162 0ustar00--TEST--
Set, getimagedepth
--SKIPIF--
<?php
/* $Id: gmagick-033-set_getimagedepth.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
echo $gm->setImageDepth(2)->getImageDepth();
?>
--EXPECTF--
2tests/gmagick-095-negateimage.phpt000064400000000310151730210040012747 0ustar00--TEST--
negateImage test
--SKIPIF--
<?php
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$image = new Gmagick('magick:rose');
$image->negateImage(TRUE);
echo "ok";
?>
--EXPECTF--
ok
tests/gmagick-046-set_getimagerresolution.phpt000064400000000560151730210040015447 0ustar00--TEST--
Set, get imageresolution
--SKIPIF--
<?php
/* $Id: gmagick-046-set_getimagerresolution.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
print_r($gm->setImageResolution(0.2,0.2)->getImageResolution());
?>
--EXPECTF--
Array
(
    [x] => 0.2
    [y] => 0.2
)tests/gmagick-009-addimagenoise.phpt000064400000000464151730210040013277 0ustar00--TEST--
Test addnoiseimage image
--SKIPIF--
<?php
/* $Id: gmagick-009-addimagenoise.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new GMagick();
$gm->read("magick:rose");
$gm->addNoiseImage(Gmagick::COLOR_BLACK);
echo "ok";
?>
--EXPECT--
oktests/gmagickdraw_043_setViewBox_basic.phpt000064400000002456151730210040014771 0ustar00--TEST--
Test GmagickDraw, 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 \GmagickDraw();

    $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);


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

    $gmagick->drawImage($draw);

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

setViewBox($strokeColor, $fillColor, $backgroundColor) ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagick-115_equalizeImage_case2.phpt000064400000001223151730210040014417 0ustar00--TEST--
Test Gmagick, 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) {
    $gmagick = new \Gmagick("magick:logo");
    $gmagick->equalizeImage();
    $gmagick->extentImage(
        $startX, $startY, $width, $height
    );
    
    $bytes = $gmagick->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--
Oktests/gmagickpixel-004-clone.phpt000064400000000323151730210040012635 0ustar00--TEST--
Test object cloning and get
--SKIPIF--
<?php
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$color = "rgb(255,255,255)";
$pixel = new GmagickPixel($color);
clone $pixel;
?>
--EXPECTF--
tests/gmagick-052-getimagewidth.phpt000064400000000421151730210040013317 0ustar00--TEST--
get imagewidth
--SKIPIF--
<?php
/* $Id: gmagick-052-getimagewidth.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
echo $gm->getImageWidth();
?>
--EXPECTF--
70tests/gmagick-077-cropthumbnail.phpt000064400000004204151730210040013356 0ustar00--TEST--
cropthumbnail test
--SKIPIF--
<?php
/* $Id: gmagick-077-cropthumbnail.phpt 280549 2009-05-14 21:45:39Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->cropThumbnailImage(3, 3);

//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++) {
		$gmagick = new Gmagick();
		$gmagick->newImage ($imageWidth, $imageHeight, 'blue');

		$gmagick->cropThumbnailImage(
			$desired_width,
			$desired_height,
			$legacy
		);
		$error = false;

		$thumbnailImageWidth = $gmagick->getImageWidth();
		$thumbnailImageHeight = $gmagick->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) {
			// The legacy behaviour is to generate a wrong size for this setting.
			// 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 "Unexpected width of $thumbnailImageWidth for desired_width $desired_width, expected width is $expectedWidth".PHP_EOL;
			$error = true;
		}

		if ($thumbnailImageHeight != $expectedHeight) {
			echo "Unexpected height $thumbnailImageHeight for desired_width $desired_width, expected height is $expectedHeight".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 "ok";

?>
--EXPECTF--
ok
tests/gmagickdraw-032_circle_basic.phpt000064400000002206151730210040014040 0ustar00--TEST--
Test GmagickDraw, 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 GmagickDraw object to draw into.
    $draw = new \GmagickDraw();

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

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

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

    $draw->circle($originX, $originY, $endX, $endY);

    $imagick = new \Gmagick();
    $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--
Oktests/gmagickdraw-002-ellipse.phpt000064400000000546151730210040013013 0ustar00--TEST--
Test ellipse
--SKIPIF--
<?php
/* $Id: gmagickdraw-002-ellipse.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$color = "rgb(255,255,255)";
$pixel = new GmagickPixel($color);
$gd = new GMagickDraw();
$gd->setFillColor($pixel)->ellipse( 200, 100, 50, 50, 0, 360 );
echo "ok";
?>
--EXPECT--
oktests/gmagick-107_setimagevirtualpixelmethod.phpt000064400000002736151730210040016243 0ustar00--TEST--
Test Tutorial, edgeExtend
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$virtualPixelType = 5;

function edgeExtend($virtualPixelType) {
    $gmagick = new \Gmagick("magick:logo");
    $gmagick->setImageVirtualPixelMethod($virtualPixelType);

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

    $gmagick->setimagebackgroundcolor('pink');
   
    $desiredWidth = 600;
    $originalWidth = $gmagick->getImageWidth();

    //Make the image be the desired width.
    $gmagick->sampleimage($desiredWidth, $gmagick->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);

    $amplitude = 5;
    $length = 20;
    $gmagick->waveImage($amplitude, $length);

    $bytes = $gmagick->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--
Oktests/gmagick-116_waveImage_basic.phpt000064400000000746151730210040013640 0ustar00--TEST--
Test Gmagick, waveImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$amplitude = 5;
$length = 20;

function waveImage($amplitude, $length) {
    $gmagick = new \Gmagick("magick:logo");
    $gmagick->waveImage($amplitude, $length);
    $bytes = $gmagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

waveImage($amplitude, $length) ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagick-048-getimagesignature.phpt000064400000000540151730210040014210 0ustar00--TEST--
Set, get imagesignature
--SKIPIF--
<?php
/* $Id: gmagick-048-getimagesignature.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
echo $gm->getImageSignature();
?>
--EXPECTF--
8b19185a62241bd7b79ecf3f619711f4ebbedd73eaeca0366f05778762b6614ftests/gmagick-082-shearimage.phpt000064400000000517151730210040012613 0ustar00--TEST--
shearImage test
--SKIPIF--
<?php
/* $Id: gmagick-082-shearimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$color=new GmagickPixel("rgb(255,255,255)");
$gm->read("magick:rose");
$gm->shearImage($color, 0.2, 0.2);
echo "ok";
?>
--EXPECTF--
oktests/gmagick-057-set_getsize.phpt000064400000000515151730210040013033 0ustar00--TEST--
set,get size test
--SKIPIF--
<?php
/* $Id: gmagick-057-set_getsize.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
print_r($gm->setSize(20, 20)->getSize());
?>
--EXPECTF--
Array
(
    [columns] => 20
    [rows] => 20
)tests/gmagick-094-thresholdimage.phpt000064400000000313151730210040013502 0ustar00--TEST--
thresholdImage test
--SKIPIF--
<?php
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$image = new Gmagick('magick:rose');
$image->thresholdImage(2);
echo "ok";
?>
--EXPECTF--
ok
tests/gmagick-110_blackThresholdImage_basic.phpt000064400000001014151730210040015606 0ustar00--TEST--
Test Gmagick, blackThresholdImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

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

function blackThresholdImage($thresholdColor) {
    $gmagick = new \Gmagick("magick:logo");
    $gmagick->blackthresholdimage($thresholdColor);
    $bytes = $gmagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

blackThresholdImage($thresholdColor) ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagick-087-setcompressionquality.phpt000064400000000465151730210040015203 0ustar00--TEST--
setCompressionQuality test
--SKIPIF--
<?php
/* $Id: gmagick-086-setcompressionquality.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->setCompressionQuality(2);
echo "ok";
?>
--EXPECTF--
ok
tests/gmagick-111_whiteThresholdImage_basic.phpt000064400000000750151730210040015661 0ustar00--TEST--
Test Gmagick, whiteThresholdImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

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

function whiteThresholdImage($color) {
    $gmagick = new \Gmagick("magick:logo");
    $gmagick->whiteThresholdImage($color);
    $bytes = $gmagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

whiteThresholdImage($color) ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagickdraw-019-polygon.phpt000064400000001057151730210040013053 0ustar00--TEST--
Test polygon
--SKIPIF--
<?php
/* $Id: gmagickdraw-019-polygon.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$filename = dirname(__FILE__) . '/test_constructor.jpg';
$gm = new GMagick();
$gd = new GMagickDraw();
$gm->read("magick:rose");
$polArray = array( array( 'x' => 3, 'y' => 4 ), array( 'x' => 2, 'y' => 6 ) ,array( 'x' => 5, 'y' => 10 ), array( 'x' => 3, 'y' => 4 ));
$gd->polygon($polArray);
$gm->drawImage($gd);
$gm->write($filename);
unlink($filename);
echo "ok";
?>
--EXPECT--
oktests/hald_8.png000064400000024626151730210040007556 0ustar00�PNG


IHDR+���gAMA���a cHRMz&�����u0�`:�p��Q<bKGD������	X��(�IDATx���Kj��@����`�1G`�܍���Ո��xUPf��'��|[k�������O��?�����y���/��������v����o��_��ٿ��_k}���Q�o�R��[���o���k��^��U��j���[���/u��X���o�f5�V���K�p=V���[�XͿU��R7\�U��V��^���ߪ�t���]�#��`����[���V�o�_����Z@V���[�����/]k�O�Hշ�o���[���o���n��U��j���[���R�ĵ���[V�o�ߪ�U�����U�0����o�_�����o����j���[����z��[���o�f5�V����uX- ��V�����[����:��U��V��j���K}���U�?���ߪ�U��/u�����[V�o�ߪ���� �d�������V���K�p=V���[��YͿU��R7\�U��V/V�o�ߪ��
�`�ߪ�U�0����/���jY���o����ߪ��
�`����[���V�o�_�������V��j���[���R7\Ȫ��`5�V���[��_�Z@V������o�ߪ��
�`�ߪ����[���/u��X���o�`5�V���K�p=V���[��z����R��:��U��V��j���K�pVȪ�U��o5�V�������Uߪ��@V�o�ߪ�����Z@V������o��j�K�
���ouXͿU��V��n���V��^���ߪ�U�����U�����o�_�����o�ߪ����[����`����[���V�o�_����Z@V���[�����/���V�������V�����
���ouXͿU��V�_�W���U��j���[���/u��X���o�f5�V���K�p=V���[�XͿU��R7\�U��V��^���ߪ��w��d�ߪ������R7\����o��j�[ͿU��pշ�o���[���o���n��U��j���[���R�ĵ���[V�o�ߪ�U�����U�0����o�_�����o����j���[����z��[���o�f5�V����uX- ��V�����[����:��U��V��j���K��V�`��j�XͿU��V�_��kY��:��ߪ�U��/�+@\Ȫ��`5�V���[����z��[��z����V��n���V��^��ߪ�U�����U��V/`V�o�_�;\����o��j�[ͿU���jY���o����ߪ�4���q��[����j���[���R7\Ȫ��`5�V���[��_�Z@V������o�ߪ��
�`�ߪ����[���/u��X���o�`5�V���K�p=V���[��z����R��:��U��V��j���K�pVȪ�U��o5�V����Uߪ��@V�o�ߪ�����Z@V������o��j�K�
���ouXͿU��V��n���V��^���ߪ�U�����U�����o�_�����o�ߪ����[����`����[���V�o�_����Z@V���[�����/���V�������V�����
���ouXͿU��V�_�W���U��j���[���/u��X���o�f5�V���K�p=V���[�XͿU��R7\�U��V��^���ߪ��w��d�ߪ������R7\����o��j�[ͿUi��
�z��[m����o��j�K�p- ��V��[���o���~�kY��:��ߪ�U��R7\�U��V/`V�o�ߪ��
�`�ߪ����[���/u��X���o����j���K}���Z@V���[�����/u�uX- ��V�����[���;[�3NV}��VYͿU��V�_��kY��:��ߪ�U��/�+@\Ȫ��`5�V���[����z��[��z����V��n���V��^��ߪ�U�����U��V/`V�o�_�;\����o��j�[ͿU���jY���o����ߪ��w��[����j���[���R7\Ȫ��`5�V���[��_�Z@V������o�ߪ��
�`�ߪ����[���/u��X���o�`5�V���K�p=V���[��z����R��:��U��V��j���K�pVȪ�U��o5�V����Uߪ��@V�o�ߪ�����Z@V������o��j�K�
���ouXͿU��V��n���V��^���ߪ�U�����U�����o�_�����o�ߪ����[����`����[���V�o�_����Z@V���[�����/�wZAP�U��c5�V���[���d�������V����ԯq- ��V��[���o�_�����o����j���[����z��[��z����V��n���V���[��YͿU��pVȪ�U��o5�V��n��d�ߪ������ҵ����g������@V�o�ߪ�����Z@V������o��j�K�
���ouXͿU��V��n���V��^���ߪ�U�����U�����o�_�����o�ߪ����[����`����[���V�o�_����Z@V���[�����/]k�O�Hշ�o���[���o���n��U��j���[���R�ĵ���[V�o�ߪ�U�����U�0����o�_�����o����j���[����z��[���o�f5�V����uX- ��V�����[����:��U��V��j���K}���U�?���ߪ�U��/u�����[V�o�ߪ���� �d�������V���K�p=V���[��YͿU��R7\�U��V/V�o�ߪ��
�`�ߪ�U�0����/���jY���o����ߪ��
�`����[���V�o�_�������V��j���[���R7\Ȫ��`5�V���[��_�Z@V������o�ߪ��
�`�ߪ����[���/u��X���o�`5�V���K�p=V���[��z����R��:��U��V��j���K�pVȪ�U��o5�V�������Uߪ��@V�o�ߪ�����Z@V������o��j�K�
���ouXͿU��V��n���V��^���ߪ�U�����U�����o�_�����o�ߪ����[����`����[���V�o�_����Z@V���[�����/���V�������V�����
���ouXͿU��V�_�W���U��j���[���/u��X���o�f5�V���K�p=V���[�XͿU��R7\�U��V��^���ߪ��w��d�ߪ������R7\����o��j�[ͿU��pշ�o���[���o���n��U��j���[���R�ĵ���[V�o�ߪ�U�����U�0����o�_�����o����j���[����z��[���o�f5�V����uX- ��V�����[����:��U��V��j���K}���U�?���ߪ�U��/u�����[V�o�ߪ���� �d�������V���K�p=V���[��YͿU��R7\�U��V/V�o�ߪ��
�`�ߪ�U�0����/���jY���o����ߪ��
�`����[���V�o�_�������V��j���[���R7\Ȫ��`5�V���[��_�Z@V������o�ߪ��
�`�ߪ����[���/u��X���o�`5�V���K�p=V���[��z����R��:��U��V��j���K�pVȪ�U��o5�V�������Uߪ��@V�o�ߪ�����Z@V������o��j�K�
���ouXͿU��V��n���V��^���ߪ�U�����U�����o�_�����o�ߪ����[����`����[���V�o�_����Z@V���[�����/���V�������V�����
���ouXͿU��V�_�W���U��j���[���/u��X���o�f5�V���K�p=V���[�XͿU��R7\�U��V��^���ߪ��w��d�ߪ������R7\����o��j�[ͿU��pշ�o���[���o���n��U��j���[���R�ĵ���[V�o�ߪ�U�����U�0����o�_�����o����j���[����z��[���o�f5�V����uX- ��V�����[����:��U��V��j���K��V�`��j�XͿU��V�_��kY��:��ߪ�U��/�+@\Ȫ��`5�V���[����z��[��z����V��n���V��^��ߪ�U�����U��V/`V�o�_�;\����o��j�[ͿU���jY���o����ߪ�4���q��[����j���[���R7\Ȫ��`5�V���[��_�Z@V������o�ߪ��
�`�ߪ����[���/u��X���o�`5�V���K�p=V���[��z����R��:��U��V��j���K�pVȪ�U��o5�V����Uߪ��@V�o�ߪ�����Z@V������o��j�K�
���ouXͿU��V��n���V��^���ߪ�U�����U�����o�_�����o�ߪ����[����`����[���V�o�_����Z@V���[�����/���V�������V�����
���ouXͿU��V�_�W���U��j���[���/u��X���o�f5�V���K�p=V���[�XͿU��R7\�U��V��^���ߪ��w��d�ߪ������R7\����o��j�[ͿU�Z�~^� �����@V�o�ߪ�����Z@V������o��j�K�
���ouXͿU��V��n���V��^���ߪ�U�����U�����o�_�����o�ߪ����[����`����[���V�o�_����Z@V���[�����/]k�O�Hշ�o���[���o���n��U��j���[���R�ĵ���[V�o�ߪ�U�����U�0����o�_�����o����j���[����z��[���o�f5�V����uX- ��V�����[����:��U��V��j���K}���U�?���ߪ�U��/u�����[V�o�ߪ���� �d�������V���K�p=V���[��YͿU��R7\�U��V/V�o�ߪ��
�`�ߪ�U�0����/���jY���o����ߪ��
�`����[���V�o�_�;\���[�d5�V���[���d�������V����ԯq- ��V��[���o�_�����o����j���[����z��[��z����V��n���V���[��YͿU��pVȪ�U��o5�V��n��d�ߪ�������|��X���>V�o�ߪ�����Z@V������o��j�K�
���ouXͿU��V��n���V��^���ߪ�U�����U�����o�_�����o�ߪ����[����`����[���V�o�_����Z@V���[�����/�w��g���V�������V�����
���ouXͿU��V�_�W���U��j���[���/u��X���o�f5�V���K�p=V���[�XͿU��R7\�U��V��^���ߪ��w��d�ߪ������R7\����o��j�[ͿU��pշ�o���[���o���n��U��j���[���R�ĵ���[V�o�ߪ�U�����U�0����o�_�����o����j���[����z��[���o�f5�V����uX- ��V�����[����:��U��V��j���K}���U�?���ߪ�U��/u�����[V�o�ߪ���� �d�������V���K�p=V���[��YͿU��R7\�U��V/V�o�ߪ��
�`�ߪ�U�0����/���jY���o����ߪ��
�`����[���V�o�_�������V��j���[���R7\Ȫ��`5�V���[��_�Z@V������o�ߪ��
�`�ߪ����[���/u��X���o�`5�V���K�p=V���[��z����R��:��U��V��j���K�pVȪ�U��o5�V�������Uߪ��@V�o�ߪ�����Z@V������o��j�K�
���ouXͿU��V��n���V��^���ߪ�U�����U�����o�_�����o�ߪ����[����`����[���V�o�_����Z@V���[�����/���V�������V�����
���ouXͿU��V�_�W���U��j���[���/u��X���o�f5�V���K�p=V���[�XͿU��R7\�U��V��^���ߪ��w��d�ߪ������R7\����o��j�[ͿU��pշ�o���[���o���n��U��j���[���R�ĵ���[V�o�ߪ�U�����U�0����o�_�����o����j���[����z��[���o�f5�V����uX- ��V�����[����:��U��V��j���K}���U�?���ߪ�U��/u�����[V�o�ߪ���� �d�������V���K�p=V���[��YͿU��R7\�U��V/V�o�ߪ��
�`�ߪ�U�0����/���jY���o����ߪ��
�`����[���V�o�_�������V��j���[���R7\Ȫ��`5�V���[��_�Z@V������o�ߪ��
�`�ߪ����[���/u��X���o�`5�V���K�p=V���[��z����R��:��U��V��j���K�pVȪ�U��o5�V�������Uߪ��@V�o�ߪ�����Z@V������o��j�K�
���ouXͿU��V��n���V��^���ߪ�U�����U�����o�_�����o�ߪ����[����`����[���V�o�_����Z@V���[�����/���V�������V�����
���ouXͿU��V�_�W���U��j���[���/u��X���o�f5�V���K�p=V���[�XͿU��R7\�U��V��^���ߪ��w��d�ߪ������R7\����o��j�[ͿU�Z�~^[�3N�`��� ����o��j�K�p- ��V��[���o���~�kY��:��ߪ�U��R7\�U��V/`V�o�ߪ��
�`�ߪ����[���/u��X���o����j���K}���Z@V���[�����/u�uX- ��V�����[�����$�X���>V�o�ߪ�����Z@V������o��j�K�
���ouXͿU��V��n���V��^���ߪ�U�����U�����o�_�����o�ߪ����[����`����[���V�o�_����Z@V���[�����/�w��g���V�������V�����
���ouXͿU��V�_�W���U��j���[���/u��X���o�f5�V���K�p=V���[�XͿU��R7\�U��V��^���ߪ��w��d�ߪ������R7\����o��j�[ͿU��pշ�o���[���o���n��U��j���[���R�ĵ���[V�o�ߪ�U�����U�0����o�_�����o����j���[����z��[���o�f5�V����uX- ��V�����[����:��U��V��j���K}���U�?���ߪ�U��/u�����[V�o�ߪ���� �d�������V���K�p=V���[��YͿU��R7\�U��V/V�o�ߪ��
�`�ߪ�U�0����/���jY���o����ߪ��
�`����[���V�o�_�������V��j���[���R7\Ȫ��`5�V���[��_�Z@V������o�ߪ��
�`�ߪ����[���/u��X���o�`5�V���K�p=V���[��z����R��:��U��V��j���K�pVȪ�U��o5�V�������Uߪ��@V�o�ߪ�����Z@V������o��j�K�
���ouXͿU��V��n���V��^���ߪ�U�����U�����o�_�����o�ߪ����[����`����[���V�o�_����Z@V���[�����/���V�������V�����
���ouXͿU��V�_�W���U��j���[���/u��X���o�f5�V���K�p=V���[�XͿU��R7\�U��V��^���ߪ��w��d�ߪ������R7\����o��j�[ͿU��pշ�o���[���o���n��U��j���[���R�ĵ���[V�o�ߪ�U�����U�0����o�_�����o����j���[����z��[���o�f5�V����uX- ��V�����[����:��U��V��j���K��V�`��j�XͿU��V�_��kY��:��ߪ�U��/�+@\Ȫ��`5�V���[����z��[��z����V��n���V��^��ߪ�U�����U��V/`V�o�_�;\����o��j�[ͿU���jY���o����ߪ�4���q��[����j���[���R7\Ȫ��`5�V���[��_�Z@V������o�ߪ��
�`�ߪ����[���/u��X���o�`5�V���K�p=V���[��z����R��:��U��V��j���K�pVȪ�U��o5�V����Uߪ��@V�o�ߪ�����Z@V������o��j�K�
���ouXͿU��V��n���V��^���ߪ�U�����U�����o�_�����o�ߪ����[����`����[���V�o�_����Z@V���[�����/���V�������V�����
���ouXͿU��V�_�W���U��j���[���/u��X���o�f5�V���K�p=V���[�XͿU��R7\�U��V��^���ߪ��w��d�ߪ������R7\����o��j�[ͿUi��
�z��[m����o��j�K�p- ��V��[���o���~�kY��:��ߪ�U��R7\�U��V/`V�o�ߪ��
�`�ߪ����[���/u��X���o����j���K}���Z@V���[�����/u�uX- ��V�����[���;[�3NV}��VYͿU��V�_��kY��:��ߪ�U��/�+@\Ȫ��`5�V���[����z��[��z����V��n���V��^��ߪ�U�����U��V/`V�o�_�;\����o��j�[ͿU���jY���o����ߪ��w��[����j���[���R7\Ȫ��`5�V���[��_�Z@V������o�ߪ��
�`�ߪ����[���/u��X���o�`5�V���K�p=V���[��z����R��:��U��V��j���K�pVȪ�U��o5�V����܏�VC�
%tEXtdate:create2014-05-31T13:00:02+00:00R��%tEXtdate:modify2014-05-31T13:00:02+00:00#��MIEND�B`�tests/gmagick-127_contrastImage_basic.phpt000064400000001002151730210050014520 0ustar00--TEST--
Test Gmagick, contrastImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$contrastType = 1;

function contrastImage($contrastType) {
    $gmagick = new \Gmagick("magick:logo");
    if ($contrastType != 2) {
        $gmagick->contrastImage($contrastType);
    }

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

contrastImage($contrastType) ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagickdraw-022-rotate.phpt000064400000000671151730210050012656 0ustar00--TEST--
Test rotate
--SKIPIF--
<?php
/* $Id: gmagickdraw-022-rotate.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$filename = dirname(__FILE__) . '/test_constructor.jpg';
$gm = new GMagick();
$gd = new GMagickDraw();
$gm->read("magick:rose");
$gd->rectangle(20,20,30,30);
$gd->rotate(45);
$gm->drawImage($gd);
$gm->write($filename);
unlink($filename);
echo "ok";
?>
--EXPECT--
oktests/gmagickpixel-002-setcolorvalue_getcolorvalue.phpt000064400000000651151730210050017362 0ustar00--TEST--
Test setColorValue and getColorValue methods
--SKIPIF--
<?php
/* $Id: gmagickpixel-002-setcolorvalue_getcolorvalue.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gp = new GMagickPixel();
echo $gp->getColorValue(Gmagick::COLOR_BLACK). "\n";
$gp->setColorValue(Gmagick::COLOR_BLACK,1);
echo $gp->getColorValue(Gmagick::COLOR_BLACK). "\n";
?>
--EXPECTF--
0
1tests/gmagick-045-set_getimagerenderingintent.phpt000064400000000523151730210050016260 0ustar00--TEST--
Set, get imagerenderingintent
--SKIPIF--
<?php
/* $Id: gmagick-045-set_getimagerenderingintent.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
echo $gm->setImageRenderingIntent(1)->getImageRenderingIntent();
?>
--EXPECTF--
1tests/gmagick-112_colorizeImage_basic.phpt000064400000001146151730210050014514 0ustar00--TEST--
Test Gmagick, colorizeImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

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

function colorizeImage($color, $opacity) {
    $gmagick = new \Gmagick("magick:logo");
    $opacity = $opacity / 255.0;
    $opacityColor = new \GmagickPixel("rgba(0, 0, 0, $opacity)");
    $gmagick->colorizeImage($color, $opacityColor);
    $bytes = $gmagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

colorizeImage($color, $opacity) ;
echo "Ok";
?>
--EXPECTF--
Oktests/gmagick-001-read_and_write.phpt000064400000000553151730210050013445 0ustar00--TEST--
Test read/write
--SKIPIF--
<?php
/* $Id: gmagick-001-read_and_write.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$filename = dirname(__FILE__) . '/test_constructor.jpg';
$gm = new Gmagick();
$gm->readImage("magick:rose")->writeImage($filename);
unlink($filename);
echo "ok";
?>
--EXPECT--
ok
tests/gmagick-120_writeImageFile.phpt000064400000001664151730210050013463 0ustar00--TEST--
Test PHP writing to php://memory 
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$gmagick = new Gmagick("magick:logo");
$gmagick->setFormat("png");

$fp = fopen("php://memory", 'r+');
$gmagick->writeImageFile($fp);
rewind($fp);
$memoryBlob = stream_get_contents($fp);
fclose($fp);

//This test depends on getImageBlob working correctly.
$imageBlob = $gmagick->getImageBlob();

//Read the images from the data blobs.
$imageReopened = new Gmagick();
$imageReopened->readImageBlob($imageBlob);
$memoryReopened = new Gmagick();
$memoryReopened->readImageBlob($memoryBlob);

//Compare to see if they are identical.
$result = $imageReopened->compareImages($memoryReopened, \Gmagick::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.
tests/Vera.ttf000064400000200531151730210050007315 0ustar00OS/2�_�c�pVPCLTъ^���6cmap����lXcvt ��9��fpgm���&`�gaspHglyftA�&��~hdmx4�!�Hhead݄��T6hheaEo�L$hmtx	Ǝ���0kern�Rՙ��-�loca���=��maxpG:�, nameټȵ�post�Z/����prep;� �h::_::dM0�l	�
	p	t	�	&
	

Y	&
	&
	
c	.
5	`
�	s	0�	
&
{Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved.Bitstream Vera SansBitstreamVeraSans-RomanRelease 1.10Copyright (c) 2003 by Bitstream, Inc.
All Rights Reserved.
Bitstream Vera is a trademark of Bitstream, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions:

The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces.

The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the word "Vera".

This License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the "Bitstream Vera" names.

The Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself.

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 BITSTREAM OR THE GNOME FOUNDATION 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.

Except as contained in this notice, the names of Gnome, the Gnome Foundation, and Bitstream Inc., shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Font Software without prior written authorization from the Gnome Foundation or Bitstream Inc., respectively. For further information, contact: fonts at gnome dot org.http://www.bitstream.comCopyright (c) 2003 by Bitstream, Inc. All Rights Reserved.Bitstream Vera SansBitstreamVeraSans-RomanRelease 1.10Copyright (c) 2003 by Bitstream, Inc.

All Rights Reserved.

Bitstream Vera is a trademark of Bitstream, Inc.



Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions:



The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces.



The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the word "Vera".



This License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the "Bitstream Vera" names.



The Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself.



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 BITSTREAM OR THE GNOME FOUNDATION 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.



Except as contained in this notice, the names of Gnome, the Gnome Foundation, and Bitstream Inc., shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Font Software without prior written authorization from the Gnome Foundation or Bitstream Inc., respectively. For further information, contact: fonts at gnome dot org.http://www.bitstream.com5��������fq����u����-��������J3���T��99N�R���7s�`s3�V�V9����s��3�D��������{�o{R�����o���������H������T3f������s�
�+���b�-����{T��#���������\q��#�H�99`���#fy```{�w`��`b{�{�R�f�fw�;���{�J/��}oo5jo{��-��{��T7����f����D)f�s��@�����%�2�������%���%�A�������:�B��2��S��A�S��/��/���2�ݖ���}ٻ�֊A�}��G�}�G��������͖�����2�ƅ����������������������%���������]������%�]@��@�%�������������d���%�d���%���A��������������2��d��A������������d�����
����
���
��A�����(����������]������%�]�@�%����.���.��%�A������%�d���%�������������@�~}}~�}}|d{T{%z�y�xwv
u�t�s�r�q�p�o�n�l!k�jBjSi�h}gBf�e�d�c�b�a:`�^]�[�Z�YX
Y�X
WW2V�UTUBTSSRQJQ�PO�NMN�ML�KJK�JIJI
IH
G�F�E�D�C-C�B�AK@�?�>=>=<=<;
<@�;
:�9�878�767656543
212�10/0
/.-	.-	,2+*%+d*)*%)('%(A'%&%&%$�#�"!! d�
d
B��BB�d����B�-B}d�

��
	�-�d�@-�-��d��++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++�, �%Id�@QX �Y!-,�%Id�@QX �Y!-,  �P�
y ���PXY��%�%#� �P�
y ���PXY��%�-,KPX ��EDY!-,�%E`D-,KSX�%�%EDY!!-,ED-f��f�@��/���1����0!%!!f�s����r)5�	@@��
�<�2991/��0K�TX�
@

��878Y� P]%3#3#5�������q��e����M@������1�<�20K�TK�T[X�@��878Y@0	@	P	`	p	�	�	]#!#o�$���+��+��`@1�	
�
	
 ��91/<�<<�<<�<<�2�220@
]!!!3!!!!#!#!5!!5!��T%Dh$i�g8��R>��h�g��g�h��`T��if�����a��a�����b��b��N�����m!(/�@U"

'&(
/)/))/B"
)	*!��#��*��-
)	"	&
0�<��<�<���1/������2���99990KSX��9�9�Y"K�	TX�0@00��878YK�TK�T[K�T[X�0��00@878Y#.'5.546753.'>54&�di�jf�o����d]�SS�\����dtzq��{��---�@A�$�������*.�U#�����
jXV`�OnZXhq��)�#'3�@6$%&%&'$'B��.��$��&�($�4'!%	
	
!
+
14�������991�2�<�����0KSX��Y"K�	TK�T[K�T[K�T[K�T[K�
T[X�4@44��878Y"32654&'2#"&546"32654&%3#2#"&546�WccWUccU���������VcbWWcd1��Z�����������������ܻ��ۻ��a����������
ۻ��ۼ�������	0�@�
��
	�	���	 !


	




B	
(('�+�'�$��
.	.'.'!!1��������99999991/������9990KSX��9�9�9�9�9��9�9���9Y"�2]@�"	)**&:4D^YZ
UZZY0g{��������"�-		'(	2'')	#**(/2;	49?2J	LKFO2VZ	YUY\_2ji`2uyz��������	���2�2�29]]3267	>73#'#"5467.54632.#"�[UԠ_�I�{�;B�h]��h��Ά�02޸S�UW�Di�;#Q�X��?@���Y�r���~��YW׀�c?}<��$$�/1oX3g��o�B@
����1��0K�TK�T[X�@��878Y@
@P`p��]#o���+���{
O@��

��2�991��0K�TX�@��878YK�TX���@878Y#&547{����������>��;����������o
@���<��991��03#654�����������<��:������=J��N@,
	��
�
		
�<�2�<�2991��<�2��2990%#'%%73%��g:��r��:g��:PrP���b��y�b��c�y�����#@	�
�<�<�1/�<�<�0!!#!5!�-�Ө��-�Ӫ��-�-����@������1��073#�Ӥ�R����@d������1��0!!d�����������1/�073#�����B��-@B��/�991��0KSX��Y"3#�����m�����#@����	����1����0"32'2#"����������	������	P�����3343��s�����s�yz��Z�
K@B����	����1/�2����0KSXY"K�TX���@878Y�]7!5%3!!�J��e�J���sH�H�ժ�J��@'B��
���

����91/�2����0KSX��9Y"K�TK�T[K�T[X�@��878Y@2UVVzzv�tvust�������]]%!!567>54&#"5>32���Ls�3aM��_�xz�X�E[��w�:m�Iw�BC�12��\�p�����s�({@.
�	� �
�	�� �#���)& 	)�������991����������90K�TK�T[X�)@))��878Y@	daa d!]!"&'532654&+532654&#"5>32?�����^�jT�m�ǹ�������S�rs�Y��%Đ��%%�12�����wps{$&�  Ѳ|�d��
�@


B��	
��<��291/��<�290KSX��Y"K�TK�
T[X�@��878Y@**HYiw�+&+6NOO
Vfuz�
]]	!33##!5��5����^%���3���`����d�u@#����
��
��

������1���������90K�TK�T[X�@��878YK�TX���@878Y!!>32!"&'532654&#"���,X,�$���^�hZ�k��ʭQ�Tժ������  �10����$&�����$X@$
������"��%"	!%������1�������90@���������]]"32654&.#">32# !2��������	L�L��;�k������PL�;��������y�$&���W]������yb��h�c@B�����991/��0KSX��Y"K�TX�@��878Y@X9Hg��]]!#!�������3�V��+�����#/C@%�'�-���'�0$*$	!0��������991������990"32654&%&&54632#"$54632654&#"��������������������������H��������Ś�������V ����г�� "Ə���ُ�at��tt�������$X@#��
������%!""
%������1������90@����������]]7532#"543 !"&2654&#"�L�K��:�l������L�>��������$&
V\���s�����[�����������#@����<�21/���073#3#������#����#	%@����

�<�2��1���03#3#���Ӥ�R#��٬��@�^��M@*����B��$#��291��90KSX����Y"	5�������Ѧ��`��@
��#�<�21����0!!!!���������^��O@+����B��$#�<�91��90KSX����Y"55����/��/�m���$p@+$	
�����
	

&%������99991/����9990K�TX�%@%%��878Y�y	z
z ]%3##546?>54&#"5>32���ſ8ZZ93�lO�a^�g��HZX/'����e�VY5^1YnFC�98ŸL�VV/5<4���q�L�@2	��L43�0�7�$�7CM34((+(I+*(I,=M������<��991���������2��990K�	TK�T[K�T[K�T[K�T[X�M��MM@878Y@	NN/N?N]32654&#"#"&5463253>54&'&$#"3267#"$'&5476$32��|{��zy�!<�g��ثg�;���?@h�հ{�`��smi���hZ}�٘�������~�R��k{KO�����������HMI���KL�� ߱k�P��A@f������jhmWQoag�}}I��J}���b�{����h�
�@A


	


B��			
��91/<���90KSX��������Y"� ]@:Xvp�	VXPghxv|rwx������]]	!3#!#���%�{�9҈�_�����+����� C@#�
	���
�.	!��2����9991/�����90�"]!2654&#!2654&#%!2#!�D������+������|������݇���f�>orqp����� ˘��s��'�6@
��
������
0��2�1�������0�].# !267# !2'f�����fj���z�S��b�_^�����^_�HH�gh�G���.@�	��

2	����99991/���0�`]3 !%! )��5���B����h�P�a/�w.,������~�����.@�����
	��2���1/�����0�
]!!!!!!����9��>ժ�F����#�	)@����
��2��1/����0�]!!!!#�Z�pP���ժ�H��7s����9@ �������43����1��������990%!5!# !2&&# !26��u����u�^�op�����k�����SU�mn�HF�_`�����%�;�,@���
8	��2��21/<�2��0�P
]3!3#!#�����"���d�+�9���9����1/�0K�TX���@878Y@
0@P`��]3#����+���f��M@���9���991��990K�TX���@878Y@
0
@
P
`
�
�
]3+53265����M?�n�������j�
�@(B�	��2��91/<�290KSX����Y"�]@�	((764GFCUgvw������		

(+*66650A@E@@@b`hgwp���������������������,]q]q3!	!#�������3���w�H���1�j�%@��:���1/��0@	0P��]3!!���_�ժ���@4	
	

	B
�	
>

���91/<��290KSX����Y"�p]@V	

&& &
 
45
i|{y
���
�#,'(	4<VY	ej	vy	����]]!	!###�-}-������+����3�	y@B�6
���991/<�2990KSX��Y"�]@068HGif�	FIWXeiy�����]]!3!#����j���+�s����#@����	3���1����0"32' ! '�������:x������yL�����HH��[�����[�bb����:@��	�

?	��2��91/����0@?_�]32654&#%!2+#�������8������/�ϒ��������s����R@*


B����

	3���9991�����990KSX��9Y""32#'# ! '������?
��!#���y;:x�L�����HH�����ab��[�������T��@5	
B�	�
�	
?
��2���99991/<����9990KSX��9Y"�@]@Bz%%%&'&&&	 66FFhuuw����]]#.+#! 32654&#�A{>�ٿJ�x��������������~�h�b����؍�O��������'~@<
	
B
�����%��(
"-"(�����99991�������90KSX�9�9Y"�)]�)/)O)].#"!"&'532654&/.54$32Hs�_��w�z����j�{�r����{���i���76�vce+ٶ��0/�EF�~n|-����&����J@��@@���1/��20K�
TX�@��878Y@		@	p	�		]!!#!����ժ��+���)�K@��	�
8A���1�2��99990K�TX�@��878Y���]332653! �ˮ�®������u������\���*$h��@'B���91/�290KSX����Y"�P]@b*GGZ}�	*&&))% 833<<7HEEIIGYVfiizvvyyu���)]]!3	3J���������+D��{@I	
	
	


B
�
	
��91/<�2290KSX��������Y"�]@�



($
 
>>4
0
LMB
@
Yjkg
`
{|�
��			

 !   #	$
%  <:5306	9?0FFJ@E@BBB@@	D
M@@XVYPfgab```d	d
dwv{xwtyywpx�����	�����[]]3	3	3#	#D�:9�:9���������+��=;�]@F	


	B�	
����91/<�290KSX��������Y"K�TK�
T[K�T[X���@878Y@�''486KX[fkww����������			
&()&('	) 
54<;:;4	4
8?
H	O
X_
eejjhiil	l
xyyx}	
x��������
��������
�
@]]3	3	#	#��su� �\�Y���+�3��{�������@(B�@@	���91/�290KSX����Y"�
]@<5000F@@@QQQe��
&)78@
ghxp
�

]]3	3#��������f��9�\�	�@B���B
����991/���0KSX��Y"K�	TK�
T[X�
@

��878Y@@
)&8HGH	/59?GJOUYfiowx�]]!!!5!s��P�=��g՚�o������XS@����C��21����0K�TX���@878YK�TK�T[X�@��878Y!#3!����X�����B��-@B��/�991��0KSX��Y"#�����m���o<@����C�<��1����0K�TK�T[X���@878Y!53#5o�X���ޏ�����@
���91��290##��H�H�����u-��������1��0!5��������f1@	��D��1��0K�	TK�T[X���@878Y	#o���f��v{��-{
%�@'	�� ���#��
	E&�����22991/��������9990@n0000 0!0"?'@@@@ @!@"PPPP P!P"P'p'���� �!�"�'�'�'000 0!@@@ @!PPP P!``` `!ppp p!��� �!]]"326=7#5#"&5463!54&#"5>32�߬�o����?�������`�Te�Z��3f{bsٴ)L���fa�����..�''�����8@�	����GF��22��1/�������0�`��]4&#"326>32#"&'#3姒��������:�{���{�:��/�������Rda��������ad�q���{?@���
�
����
HE��2�1��������0@���].#"3267#"!2�N�P��ƳP�NM�]���-U�5�++����++�$$>:#q��Z8@�����GE����221/�������0�`��]3#5#"3232654&#"���:�|���|��ǧ��������^��daDDa��������q��{p@$	��������KE�����91��������90@)?p���?????,//	,
ooooo	]q]!3267# 32.#"��ͷj�bc�k���)�������^Z��44�*,8
C����/�p@����
	
L�<�<��991/�2���2990K�
TX���@878YK�TX�@��878Y�@P�]#"!!##535463��cM/�ѹ�����Phc��/яN��q�VZ{(J@#	���&#�'�	��&G E)�����221/����������990�`*�*�*]4&#"326!"&'5326=#"3253�������������a�QQ�R��9�|���|�9�=�����������,*��[cb::bc��d4@	���
N
	F��2��1/<����90�`]#4&#"#3>32d�||����B�u����\���������ed��y+@���F�<�21/��0@	@	P	`	p	]3#3#�����`�����VyD@�����O
F�<�2�991�����990@@P`p]3+532653#����F1iL��`����a�(���
�@)B��	F��2��91/<��90KSX����Y"�]@_
')+Vfgsw�������		
('(++@h`����������������]q]33	##��%�k�ǹ�i��#���y"��F��1/�0@
@P`p�]3#������{"Z@&	� ��PPF#��2����91/<<��<��290@0$P$p$�$�$�$�$�$�$	]>32#4&#"#4&#"#3>32)E�����ru���rw����?�yz��|v��\��������������`�gb|�d{6@	���
N
	F��2��1/<����90�`�]#4&#"#3>32d�||����B�u����\�������`�ed�q��u{J@����	QE����1����0@#?{{	
{
{��]"32654&'2#"s���������������������������98��V�{>@������GF��22��1��������0@	`���]%#3>32#"&4&#"326s��:�{���{�8�����������
�da��������a��������q�VZ{>@�	�����GE����221��������0@	`���]32654&#"#"3253#/��������s:�|���|�:��/�������daDDad����J{0@��	�
F���21/������90�P�].#"#3>32JI,����:��.�˾��`�fco���{'�@<
S	
SB
������%��(
R"E(������99991��������90KSX�9�9Y"�']@m
.	,
,,;	;
;;  $(
(*//*(() )!$'�
���


	'/)?)_))�)�)�)�)]]q.#"#"&'532654&/.54632�N�Z��b�?ĥ��Z�lf�a��e�@����f�?�((TT@I!*����##�55YQKP%$����7��8@���
	F�<�<�2991/��<��2990��]!!;#"&5#53w{��Ks��բ�������N���`�>���X`6@	��
�
	NF����21/�2���90�`�]332653#5#"&��||����C�u�����a����{���fc�=`@'B���91/�290KSX����Y"K�
TX���@878YK�TK�T[X�@��878Y@�Hj{����		&&)) 55::0FFIIFH@VVYYPffiigh`ut{{uz�������������������>]]3	3#=�^^�\�`�T���V5`@IU	
	U
	U

U
B
�
	
��91/<�2290KSX��������Y"K�
TK�T[K�T[K�T[K�T[X�
��

@878YK�TK�
T[K�T[X�
@

��878Y@�"
5
IIF
@
[[U
P
nnf
yy����
�����	
		%%#'!%""%'	$
!#96690FHF@B@@@D	D
D@@VVVPQRRPS	T
Ucdejejjjn	agouuy}x}zzxy		{
v}������������@/������������������	�����y]]333##V�����������`��j��j����j;y`Z@F
	


	B
�
����91/<�290KSX��������Y"K�
TK�T[K�T[K�T[X���@878YK�TX�@��878Y@�


&
=1
UWX
f
vzvt
��
����
�
�����
�

	
	)&%	* 
:9746	90
IFE	J@
YVYYWVYVV	YP
o
x
�����
�
�
�
/]]	#	#	3	d�k��������r�))`�����HJ�q�=�V`�@C	







B
	���

	���91�2��9990KSX������2Y"K�
TK�T[X���@878YK�TX�@��878Y@�	



#
5
I
O
N
Z	Z
j
�
�
�


	
'$$  )(	%
$$'
** 755008
668
990A@@@@@@@@B	E
G
II@TQQUPPVUVW	W
UUYYPffh
ii`{xx��	���
���	������������e]]+5326?3	3�N�|�lLT3!�;�^^�h�z�H�TN��lX�`	�@B���
��2�991/���0KSX��Y"K�TK�T[X�
@

��878YK�TX�
��

@878Y@B&GI+ 690@@E@@CWY_``f``b��]]!!!5!qj�L��}��e`��ۓ�%��$�@4%	 !�	��	��%	
$
 C
%�<�<�299999991������99999990K�TX�%��%%@878Y�&]#"&=4&+5326=46;#"3>��l�==�k��>D�V[noZV������t�s��ݓ�X��������X������1��0#�����$�@6% ��#���%#C%�<�2�<�99999991������99999990K�
TX�%@%%��878YK�TX�%��%%@878Y�&]326=467.=4&+532;#"+F�UZooZU�F?��l�>>�l��?�V��������W����s�t��ݔ���1#@����1����990#"'&'&'&#"56632326�i�an��^X�bi�an�
�^V�1�OD;>MS�OE<>L��hN'$�uhm!�@T

!!! !!!B
	�	�
	�  !
VV!"����2��299999991/<�����9990KSX��������Y"� #]@ s�P#f
iu
{yyv v!�#]]4&#"326!.54632#!#TY?@WX??Y���!�X=>�sr�?<҈�_��Z?YWA?XX��N)sIs��rFv)������s�u'�'&�-����k'(�u���3^'1�u��s���N'2'u�����)N'8�u��{��-f'D�R��{��-f'DCR��{��-f'D�R��{��-'D�R��{��-7'D�R��{��-'D�R��q�u�{'F����q��f'H����q��f'HC���q��f'H����q��'H�����of'��������f'�C�����\f'������F'������d7'Q����q��uf'R�s��q��uf'RCs��q��uf'R�s��q��u'R�s��q��u7'R�s�����Xf'X�{�����Xf'XC{�����Xf'X�{�����X'X�{9�;��'@�
��YW	Y�<�<�1���<�203!!#!5!��o�����o�\���]��u=� @����	Z[Z���1���0"32654&'2#"&546PnnPPnoO@v+..�����ooPOmmOOp�1.-rB���������#�!Q@+��������"	"���<�<<�221��<�������9990%&&'667#&73����J�DF�HA�Mf�	�fI��X⸹���)*��*'�#�� 32��!�b�`@!�
�����
	�<��<���1/�2����<�2�990K�TX���@878Y�66].#"!!!!53#535632NL�=�t��y-������=���))��׏�/��я��\�=��>�@</0*06
'�&
�*�&�#��<�#?/0-	6W9-W 	W"9&"W3?����������99991��������99990K�
TK�T[K�T[K�T[X�?@??��878Y>54&.#"#"&'532654/.5467.54632{?>��?>��S�8al�Ӄ\]>9̭I�XW�:fq�ր][;;ȦI��.Z.L��-[.K���''PGZsw�eZ�54m@���''TLf{x�f[�1,pE��3��!�	�\��1��04632#"&3�~|��}}��|��|}����;9�
%@��]]����91�2��90!###&&54$y�������f��Nݸ������/�@0-'!
 *��*���.	
 !'	$'$-F0��������99991/�����990@@'(��







 
!"&
 : :!MM I!I"jj ��� ]]4632#"&'532654&/.5467.#"#�������:A9�`��@�IP�Atx;e\`W���q���q����s`/Q*%j�d���_[?T>7;�[�gp������/8L`@6EBC?2�H0�9JC�9����$HE301B<?96I1`K6`C<^	K^	_*M��������299991/���2���9990"32676654&'&&'2#"$'&5476$#32654&'2#'&&###��^^``^^⃄�^]]^\^ㄘmmllmm������mmllmm}{{nWXf��i`C.���;I6B�f^^^傁�^^__^]⃅�]^^gnmm������mmnnmm��mmn�b��>KL?gwyVpMI��`3��D��/IC@&=�>:�A�$1�04�G���$�7aD=0^*	D^	J�����2�1/���������02#"$'&5476$"32676654&'&&&&#"3267#"&54632�mmllmm������mmllmm���^^``^^⃄�^]]^\^�B�B����@zBC�F���I��nmm������mmnnmm��mmng^^^傁�^^__^]⃅�]^^��! ����"����'�F�>@!
	�
�	b	b
cbc�������91�<<�2�<<�903#######5J���q�7�rq�r������/�B^��^s�Rf1@	��D��1��0K�	TK�T[X���@878Y3#����f���F)�@��dd���1�<�20K�
TK�
T[X�@��878YK�TK�
T[K�T[K�T[X���@878YK�TK�T[X�@��878Y@````pppp]3#%3#^��y������'��>@"

���
�
	�<�291�<�2�<��<�990!!!!!'7!5!7!�}�/�H�{����}�������;fը��fӪ�H��@9
B�������
	


��<�2���91/<��������0KSX����Y"��]@gww������	]!!!!!!#!5��9��=���q����ժ�F�����՞��f���	+�@<
+,

)& 
*&�&
��&�,+,* #
)#3,���999999991������99999990@*WZWU!je!{vu!	FYVjddj(|svz(]]	324&'.#"&5!27!"&''��3>�_�'y=�_��''�NOy;��W�f�NP���ƀ�[�gX��@CHp��@C����p�D�f�b�MK�Y�g������[KK�X����/�@-	!$'!!0$*0����99991�����9990@�	


	
$$$   $$	$
***///***55500055	5
:::???:::EEE@@@EE	E
JJJOOOJJJV�� �!�"�&�'�(�)]]32654&#".#"326#"&54632>32#"&�1�Te�vYR��1�UfvYR��F�^����_�HD�a����^�/XZ�ie��7XX�je���ߦ��~���᧯�w��.@���	�

�<�2�<�21/��<�<�0!!#!5!!!�-�Ө��-�����}��}���������
T@.����B���	$#�<�2291/���90KSX����Y"	5!!�@�����������p�o�����
V@/����B���$	#�<<�291/���90KSX����Y"55!5����A�����������Ǫ�R���@F


B	��	
�	fe
f
e�<�2��2�99991/�2�<�2�<�290KSX����Y"K�TX���@878Y@(�����''
')((79���
���]]!#!5!5'!5!3	3!!!��c�`�T���þ{y�����T��9�{3�{J�D���{�3��V�` M@%	��
��!		NF!��2���91��2�<���990�"`"�"]3326533267#"&'#"&'�������#%	 )I#ER2�bf�*�V
�H�������<9�NPOONN��h���-)b@'!	'!�*$$*����9991������990K�TK�T[K�T[K�T[K�T[X�*@**��878Y>54&#"#"&54632#"&54324&#"32�IH7�$$0�e���՘�ݢe�WOm�VPm�mW�K��t,>b������Fأ�[�t}���t{�w;�]@

��91����990@0QVPZ
spvupz
��Z	pp{	t����]]!!	!!5	7�A��J���I���3���!���wq�@���gg����1���20!#!#���
����}������/#�@1��"��$#"#h#$����9999991/<���22�9990K�
TX�$��$$@878Y@V		

	


	
	##(]]#3267#"&5467!##"#>3!��i/7.%7vy"P��µ�)6<	���y��J\:1�fd.��x�o�@E�}/���%&@ �
���&
iji&���1������026732#"&'&&#"#"&546327j��Pd@7*8	k��OeD=!0

���l9�TA6?&#H���n�!�bSA8?Ss�;�)_@3(%���%�
���
��*
"(kl"k
*����22��9991����������99990!!#5#"&5463354&#"56632"32655���P��,�]�����uu>�DI�E����~bRh�P{��@p?D�q��[[""��CO@M�r`�d�.@���
���
klk
���991�����0!!2#"&546"32654&���PX��γ��гi~hi}|P{ݿ��ܾ��s��������N��@@"	��� mm ������9991/<�2��0%!5654#"!5!&5! ��������Dz��?��1/������aL��"�����a���*�>��w���؍{��o{3>@C'-%=
4�%���:�.�-�*��1
��%?47&%7&
=&-7"E?����<���999991��2�<��<����2����9990@�0+0,0-0.0/00@+@,@-@.@/@0P+P,P-P.P/P0�+�0�@�@�@�@�@�@�@�@�@???
??0,0-0.0/@,@-@.@/P,P-P.P/ooo
oo`,`-`.`/p,p-p.p/�,�-�.�/]q].#">32!3267#"&'#"&5463!54&#"5>32"326=�����DJԄ���̷h�dd�j��MI؏�����`�Te�Z���߬�o�������0Z^��Z��55�*,ywxx�����..�''`�f{bsٴ)H����	+�@<+,&

)& 
*&�&
��&�,+,* #
#Q)E,��2��2�9999991������99999990@p(?-YVUV jf!{	
{
z{ {!"#$%{&��%��-�-&YVUZ(ifej(ztvz(���$��$]]	32654&'.#".5327#"&''��)gA��\*g>��}66�]�C�_�56���`�?�`!��*(��Ou�))��Hn.�M�w834�O�M�x���43�N����� $�@/ ��!�#��#�%"	"	"!&	%������99991�������9990K�TK�T[K�T[X�%��%%@878Y@ttttv]33267#"&546?>7>5#53�7ZZ:3�mN�`^�g��IYX0&���D�e�WX5^1YnFC�98ŸL�VV/5<6�5�	b@��
�<�2991/��0K�TX�
@

��878YK�TK�T[K�T[X�
��

@878Y� P]#53#3������+�e����^@
����1���0!#!����^���=��}
*@
	
	��91���903##'%\�s��B��}}`��s-Pb�;�V#�@@

	B

�������!�$	
$��91�2�������299990KSX�2�9Y"K�TX�$��$$@878Y.#"!!#"&'53267#5!>32&P,`r<��:��:d/4a/am"��?$Ɨ5d�z��ɏ������!!����J�����;?@.9*-"*�19�"��<-<�<�21�������9999990#"'&'&'&#"56632326#"'&'&'&#"56632326�i�an�
�^X�bi�an��^V�gi�an�
�^X�bi�an�
�^V�o�NE;=LT�NE;=KڲOE;=LS�NE;=K��`�8@��91/��90@cmpxyvn]]	!3!��^D���C�����?��%#
�@I����
�	�		�
	

�
B	��	o
on��<��2991�<�2990KSX��������Y"55%��-�+#��-�+#�����R������R��H#
�@I�
	
	�

	
������B
��o
op�<��<�991�<�2990KSX��������Y"5%5��+-����+-��#�^R�^���^R�^���#@�
	�����1/<<�220%3#%3#%3#����������������hk'$�u��h^'$�u��s���^'2'us�;@�����	

�������299991/��2��2�0!!!!! !# !3���9���O�A��g�����@A�ժ�F���|pm|������q���{'3�@1���.�(��"%��4"1	K1	Q+E4������9991�2�<���2��2���90@%?5_5p5�5�5�5�5?????	ooooo	]q].#"!3267#"&'#"32>32%"32654&
����H��̷j�bd�j��QGь����BN����������������5Z��44�*,nmnm98olkp�݇���������y���/�1��0!!�y��y��/�1��0!!�y���m�'@�	�	
�������1�<�20#53#53�Ӥ�R�Ӥ�R�?����?����m�'@	��	
��������1�<�203#%3#Ӥ�R�Ӥ�Rլ��@����@����@�����1��0#53�Ӥ�R�?������@��q����1��03#Ӥ�R՘��?���o)@���
	r��<�<�1�����03#3#!!��������o���A��#�u"@��91��990	�����������9%���-��=�V'\�^�����N'<su������+@B����1��0KSX��Y"3#-��\���^R��#/�@I	-'!-
-���'��!0*$0*	$
$(st*(s0������9999999991�������9999999907'#"&''7&&5467'766324&#"326{�r�%$&(�r�;t=:x=�q�%%&&�s�7t@<u\�rp��qq���s�;w>?s9�q�(&%%�s�>v:@t8�s�'%$�|p��pr����s#G@%����B��on��291��90KSX����Y"5s��-�+#�����R���#I@&����B��op�<�91��90KSX����Y"5��+-��#�^R�^�/J�@(�����	�
L�<�2�<��2991/<�2����2990K�
TX���@878YK�TX�@��878Y@0P������]]#!##53546;#"3#J���������cM���`���/яN���Phc��/J�@!�	��	�


L�<��<��991/<�2���2990K�
TX���@878YK�TX�@��878Y@0P�
�����]!#!"!!##53546J���cM/�ѹ�����{Phc��/яN��9�;��>@ ��

��Y
W	Y�<<�2�<<�21���2�2�2�20%!#!5!!5!3!!!�����o��o�o��o�\�����\����H�F����1��03#���F�����@������1��0%3#Ӥ�R����@��m�'@	��	
��������1�<�20%3#%3#�Ӥ�R�fӤ�R����@����@q��
L�#'3?K�@D$%&%&'$'B@�.��(�F�4�:&�$�L%IC'1+C
=	

1
=I
7+
!L�����������991�2�<<�2�2���20KSX��Y"K�TK�	T[K�T[K�T[K�
T[K�T[X�L@LL��878Y"32654&'2#"&5462#"&546!3#"32654&2#"&546"32654&�WddWUccU��������t�������%��Z�VcbWWcd���������WccWUcc���������ܻ��ۻ���ۻ��ۼ��������������ܻ��ۻ������������hm'$�u����m'(�u��hk'$�u����N'(�u����k'(�u���k',�/u����`m',�/u��XN',�/u��;�k',�/u��s���k'2'u��s���m'2'u��s���k'2'u�����)k'8�u�����)m'8�u�����)k'8�u�y` ��F��1/�0@@P`p]3#���`����?f7@��u��91��290K�	TK�T[X���@878Y3#'#�������f�����J7c@$���VwVv���99991�<��<�99990K�	TK�T[X���@878Y'.#"#>3232673#"&�9!
&$}f[&@%9!
&$}f[&@Z7IR��!7IR���b+�/�����1��0K�	TK�T[X���@878Y!!�V�����)9H
W@��VV����1�<��0K�	TX���@878YK�TK�T[K�T[X�@��878Y332673#"&�vaWV`
v
����HKKJL����Df,@	��d��1��0K�	TX���@878Y3#������_@��	��VxV����1����0K�	TK�T[X���@878YK�
TK�T[K�T[X���@878Y4&#"3267#"&54632�X@AWWA@Xz�ss��ss��?XW@AWX@s��ss��#�u�@	

�'	�����1/��90!#"&'532654&'T76xv.W+"J/;<+->i0Y[�0.W=���fB@������991�<�20K�	TK�T[X���@878Y3#3#������߉f��x��L�u� @
��
'�����1/���90!33267#"&546�w-+76 >&Dzs5=X..�

W]0i��?f7@��u��91�<�90K�	TK�T[X���@878Y373��������x������u�
?@
��:	y�<��<�991/��90�0P]3%!!'7��9P�w�^�M����o���;jn�H^@
	�	
z
z�<�<�991/�90K�TX�@��878Y@
@
P
`
sz
p
�
�
	]37#'7Ǹ}Lɸ{J���Zj����Xj�������m'6�u��o���f'V���\m'=�u��X�f']�����@
���<�21����0##������
��
�
��g@ 	�
���
2

y�<�2����91/�2���20@( ��	�
�������	�
������]]! )#53!!3 !�����i�P�`���P���5��������~��������.,q��u('@^%{&%#${##{#({'(#&'('%$%(('"#" !  B('&%"! ##�	��#�)&'! (%#"QE)����99999991�����9990KSX��������Y"�?*]@v%+("/#/$)%-&-'*(6%F%X X!` `!f"u u!u"%#%$&&&''(6$6%F$E%Z Z!b b!z{	

{zzv v!x"�*�*']].#"32654&#"5432''%'3%F2X)������6	~r������4*���!��M!����ü�޼z�&�����7��7�kc\̑oab�����k'<su��=�Vf'\�^���=@�	
���	?
��22��91/����0@	?_]332+#32654&#�������������������'�ђ�����V�>@������GF��22��1��������0@	`���]%#3>32#"&4&#"326s��:�{���{�8��������������da��������a���������-������1��0!!���ת?���@M
�
	������
�	
B
	
	�<�291�<�290KSX��������Y"	'7��7�w�5�5v�8v��L�5�7y�5y��y�5�����
,@�	��	��|]||����1������2035733!������
c)t'�+n^���J@$}}B�����~�����91�����90KSX�2�Y"!!56754&#"56632���"?XhU4zHM�9����8rn81^BQ##{�l���0b���(H@'
�	� �
�	��� �#�)~&~	)�������9991���������90#"&'532654&##532654&#"56632\e��9}F4wCmxolV^^ad_(fQI�7��Z`mR|�yOFJLl?<:=svcE`������'�'�5	��d�����?�'�'�5���d��b���'�'�5	��d��s���m'*
u��q�VZH'J������P',�/u����u��'6����o�u�{'V���s��'k'&-u��q���f'F����s��'m'&-u��q���f'F��q���$J@$�	�"��
���
GE%���<�<�1/�������<�20�`&�&�&]!5!533##5#"3232654&#"���F����:�|���|��ǧ��������N}��}���daDDa��������d������1��0!!d�����H�F����1��03#���F�����1@: �"+�	������/��)	2+"!)#&

	, &
&*!/<��2���99999999991�2��������2�<�20K�	TK�T[K�
T[K�T[K�T[K�T[X�2��22@878Y@z1Tilnooooiko o!o"o#n$l%i'i-���	�
���
�������� �!�"�#�$�%�&�'�(�)�*�+�,�-2		  	USjg
]].#"!!!!3267#"#734&5465#7332�[�f�� A7���8�� ʝf�[Y�`��(�7��7�(6�b�b�iZȻ{.# .{��Zi�HH"{/ #/{"G�)��@
�dd���1�<�20K�TK�T[X�@��878YK�TK�
T[K�T[X���@878YK�TK�T[X�@��878YK�TX���@878Y@````pppp]3#%3#^��y������s���@B���1��0KSX��Y"K�TX���@878YK�TX�@��878Y@ %%6FVjg	//]]3#7������J�u@!���VV	����99991�<���2990K�TX���@878YK�TX�@��878Y�]'.#"#4632326=3#"&�9$(}gV$=09" (}gT";9!2-ev
3)dw����@B���1��0KSX��Y"K�TX���@878YK�TX�@��878Y@*$$5CUU����//]]#������1�w@
���91�<�90K�TX���@878YK�TX�@��878YK�TX���@878Y@//-	]3#'#��Ӌ����������1��@
���91��290K�TK�	T[K�
T[K�T[X���@878YK�TX�@��878YK�TX���@878Y@ " 	]373�Ӌ�����
����?���
�@�	��
]��<��291��<�290K�TK�T[K�T[K�T[K�T[K�
T[X�@��878YK�TK�T[X���@878Y@T/9IFYi���

"5GK
S[
e���]]	!33##5!5��5�����bf�]��m��y�9�
j@��VV����1��20K�TX���@878YK�TX�@��878YK�TK�T[X���@878Y332673#"&�v
cSRav
�����6978w{z�f�����1��03#�����	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~�������������������������������������������������������������������������������������������������>: ~�1BSax~����� & 0 : �!""""+"H"e%��� �0AR^x}�����  0 9 �!""""+"H"`%������������^�C�h��������V�j�q�_���8����� (B�����������������������������������bc�d�e�������f����g�����h���jikmln�oqprsutvw�xzy{}|��~����������������������������������������������f��55������q=�3���=�����d�������d���������������?��y}��s)����3s�\�\��?�u�����Ls��Ls������y�D{=�{\���������{�fqq�q�/q�9�9����9�����q�qJ�+o#7��=�V�;�=3X���yy�s���Ls���{�{�{�{�{�{fq�q�q�q�q9�9��9��9����q�q�q�q�q����9���\�3�
�'s����Lf��������R�#hd����+/�s�`N�{�H?�55��=��Z�������yyLs�s/q%�%���������=�V��^3�3�
/
/9����%�
�qy�y��\�\��\\;LsLsLs������9�������#�L���F�+o{\3X�3
�q��=������5�5^5b�����b3sq\��+o�sfq�sfqq�d���s���5?���+�	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~������������������������������������������������������������������������������������������������������������������������������	

	sfthyphenperiodcenteredEuroc6459c6460c6461c6462c6463c6466c6467c6468c6469""""X���O���!n����E�~�L��e��		R	s	�

�X��:i��

=
z
/�E��u�)p����P���@�"m�#{�C��w�R�������w� [ r �!5!B!�!�!�"	""#"0"="J"W"d"q"~"�"�"�"�"�"�"�"�"�##
##'#4#A#N#[#h#�#�$4$�%3%S%�&&�'K'�'�((X(�)_*%*\*�*�+z+�,D,�,�-P-�..R.�/�0A0�11!1P1�2H2z2�3F3p3p3}3�3�3�4z4�4�4�4�5595g5�5�5�5�6[6�6�7C7�7�888J999)969C9P9]9j9w9�9�9�9�9�9�9�9�::{:�:�;;^;�;�;�<"<_<�<�<�<�<�<�=c>;>H>U>�>�>�?a?�?�@:@K@\@m@z@�@�@�@�@�@�@�@�A@AVAkBEB�B�C_C�C�DUD�E*E?-��
x$��%��&')*K+-r./2934K57�D9��:��;��<�
=IQR&UY��Z\��b��dg9xy&z&{&|&}&���������9�����
�����9�9�9���
����K��$��$��$��$$9$&��$*��$2��$4��$6$7�a$8$9�}$:��$;$<�a$F��$G��$H��$I��$R��$T��$W��$X$Y��$Z��$\�u$b9$d��$g��$h$o��$p��$q��$r��$s��$y��$z��${��$|��$}��$~$$�$�$���$�$�9$�9$���$���$��$��u$��a$�/$�9$�9$��$��$��$�$�$�$�$�a$�u$���$�$���$���$���$���%%&��%*��%2��%6��%9��%:��%<��%d��%g��%���%���%���%���%���%���%��%��%��%��%��%�%���%���%���%���&&$&6&<��&b&���&���&�&�&�&�&&���&�&�&�&�&��&�''$��'9��':'<��'b��'���'���'���'���'���'���'���'�D'��'��'�))��)�a)$�D)6��)7��)D�D)H��)L�k)R��)U�k)X��)\�D)b�D)i�D)j�D)k�D)l�D)m�D)n�D)p��)q��)r��)s��)y��)z��){��)|��)}��)~��)��)���)���)�)�)��D)��D)���)�)��D)��)�D)�D)��)�D)���**$*7��*:*<��*b*���*���*�*�*���*���*���*��*�*�*�++��++�+�+���+���+��-��-$��-b��-���-���-���-���-���-���-��-��-��.�).$��.&��.2��.7�a.8��.:��.<��.D��.H��.R��.X��.\�k.b��.d��.g��.h��.i��.j��.k��.l��.m��.n��.p��.q��.r��.s��.y��.z��.{��.|��.}��.~��.��.���.���.��}.�.���.���.���.���.���.��k.���.�.��.��.��.��.��.��.��.��.�.�k.���.���/��/$//2��/7��/8��/9�/:�D/<��/D/H��/R��/X��/\�D/b//g��/h��/i/j/k/l/m/n/p��/q��/r��/s��/y��/z��/{��/|��/}��/~��/��/���/���/�/�/�//�//���/��a/���/��D/���/�/�//�//��/��/��/��/��/��/��/�D292��2��2$��29��2;�}2<��2b��2���2�2���2���2���2���2���2�D2��2��2�3��3��33$�}383:3<��3D��3H��3L��3Q��3R��3U��3V��3X��3\3b�}3h3i��3j��3k��3l��3m��3n��3p��3q��3r��3s��3x��3y��3z��3{��3|��3}��3~��3��3���3���3���3�3��}3��}3�&3�&3�3���3��3�}3�}3�3�3�3��3��3�3���494�4�4���4���4�}5��5��5��5$��5&��57�k59��5:��5<�}5D��5H��5R��5X��5\��5b��5d��5i��5j��5k��5l��5m��5n��5p��5q��5r��5s��5y��5z��5{��5|��5}��5~��5��5���5���5���5���5���5���5��k5��}5���5��}5��5��5��5�}5�5���5���6$&6&6*6264666b&6d6g6�&6�&6�6�&6�&6�6�6�6�6�6�6�6�7�D7�
7�7$�a7&��77��7D��7F��7H��7L��7R��7U��7V��7X��7Z��7\��7b�a7d��7i��7j��7k��7l��7m��7n��7o��7p��7q��7r��7s��7y��7z��7{��7|��7}��7~��7��7���7���7��D7���7��a7��a7�7���7���7��7�a7�a7�7�7���7���7���7���7���8$8-8=��8b8�8�8�8�8��9��9��9�Y9$�}92��9D�a9H�a9L��9R�a9X�u9\��9b�}9g��9i�a9j�a9k�a9l�a9m�a9n�a9p�a9q�a9r�a9s�a9y�a9z�a9{�a9|�a9}�a9~�u9�u9��u9��u9��N9���9��}9��}9���9�9�9���9��9�}9�}9��9��9��9��:��:�:��:$��:D�}:H��:L��:R��:U��:X��:\��:b��:i�}:j�}:k�}:l�}:m�}:n�}:p��:q��:r��:s��:y��:z��:{��:|��:}��:~��:��:���:���:���:���:���:���:���:�:���:��:��:��:��;��;$;&�k;2�};7��;H��;b;d�k;g�};p��;q��;r��;s��;���;�;�;�;��};��a;���;��;�;�;�};�};�};��k;��k<�
<�a<��<$�a<&��<2��<D��<H��<L��<R��<X�<b�a<d��<g��<i��<j��<k��<l��<m��<n��<p��<q��<r��<s��<y��<z��<{��<|��<}��<~�<�<��<��<��<��k<��a<��a<���<���<���<��<�a<�a<��<��<��<���<���=��=�=�=���=���=��H[��I��I�kI��IW��IZ��I\��I���I���I�AI�I���I�I��ND��NH��NR��NX��N\��Ni��Nj��Nk��Nl��Nm��Nn��Np��Nq��Nr��Ns��Ny��Nz��N{��N|��N}��N~��N��N���N���N���N�QQQQ�Q�Q��kQ���Q��R&R��RR[��R�R�R��kR���R�}U�}U�DU��UF��UG��UH��UIUJ��UK��UP��UQ��UR��UT��UU��UXUYUZU[��U\U]Uo��Up��Uq��Ur��Us��Ux��Uy��Uz��U{��U|��U}��U~UU�U�U���U�U�U�VU�U��U�U�U���U���U���Y��Y�aY��Y���Y���Y�Y���Y��ZZ�DZ��Z���Z���Z�Z�Z�)[F��[H��[R��[o��[p��[q��[r��[s��[y��[z��[{��[|��[}��[���[���\��\��\�k\���\���\�\�\��b��b��b��b$9b&��b*��b2��b4��b6b7�ab8b9�}b:��b;b<�abF��bG��bH��bI��bR��bT��bW��bXbY��bZ��b\�ubb9bd��bg��bhbo��bp��bq��br��bs��by��bz��b{��b|��b}��b~bb�b�b���b�b�9b�9b���b���b��b��ub��ab�/b�9b�9b��b��b��b�b�b�b�b�ab�ub���b�b���b���b���b���dd$d6d<��dbd���d���d�d�d�d�&d���d�d�d�d�d��d�g9g��g��g$��g9��g;�}g<��gb��g���g�g���g���g���g���g���g�Dg��g��g�h$h-h=��hbh�h�h�h�h��p[��q[��r[��s[��xxxx�x�x��kx���x��y&y��yy[��y�y�y��ky���y�}z&z��zz[��z�z�z��kz���z�}{&{��{{[��{�{�{��k{���{�}|&|��||[��|�|�|��k|���|�}}&}��}}[��}�}�}��k}���}�}�&��������������������������������$�%���&���'���)�*���+�-���.�/�2�3�4�5�7���9���:���;�<�k�=�I�Q�R�U�Y���Z���\���b�d���g�x�y�z�{�|�}������������������k����������������k������������������$���%���&���'���)�*�+�-���.�/�2���3�4�5�7�D�9�N�:���;���<��=�I�Q�R�U�Y���Z���\���b���d���g���x�y�z�{�|�}���������������������������������������������������������������������$9�&���*���2���4���6�7�a�8�9�}�:���;�<�a�F���G���H���I���R���T���W���X�Y���Z���\�u�b9�d���g���h�o���p���q���r���s���y���z���{���|���}���~�������������9��9��������������u���a��/��9��9�������������������a��u��������������������������������$9�&���*���2���4���6�7�a�8�9�}�:���;�<�a�F���G���H���I���R���T���W���X�Y���Z���\�u�b9�d���g���h�o���p���q���r���s���y���z���{���|���}���~�������������9��9��������������u���a��/��9��9�������������������a��u�����������������������9�������$���9���;�}�<���b������������������������������D���������$���%���&���'���)���*���+���-���.���/���2���3���4���5���7�9�:�;���<�=���I���Q���R�k�U���Y���Z���\���b���d���g���x���y�k�z�k�{�k�|�k�}�k�������}����������������������������������������������������������������k�����������������
��a����$�a�&���2���D���H���L���R���X��b�a�d���g���i���j���k���l���m���n���p���q���r���s���y���z���{���|���}���~���������������k���a���a�����������������a��a������������������$&�%���&���'���)���*���+���-/�.���/���2���3���4���5���7���9���:��;���<���=�I���Q���R���U���Y��Z�<�\���b&�d���g���x���y���z���{���|���}��������&��&��&��������������&��&�����������������������������������������$9�&���*���2���4���6�7�a�8�9�}�:���;�<�a�F���G���H���I���R���T���W���X�Y���Z���\�u�b9�d���g���h�o���p���q���r���s���y���z���{���|���}���~�������������9��9��������������u���a��/��9��9�������������������a��u��������������������������������$9�&���*���2���4���6�7�a�8�9�}�:���;�<�a�F���G���H���I���R���T���W���X�Y���Z���\�u�b9�d���g���h�o���p���q���r���s���y���z���{���|���}���~�������������9��9��������������u���a��/��9��9�������������������a��u�����������������������9�������$���9���;�}�<���b������������������������������D���������9�������$���9���;�}�<���b������������������������������D���������9�������$���9���;�}�<���b������������������������������D���������$�-�=���b������������$�-�=���b������������$�-�=���b������������$&�&�*�2�4�6�b&�d�g��&��&����&��&����������������������������������������������������
��a����$�a�&���2���D���H���L���R���X��b�a�d���g���i���j���k���l���m���n���p���q���r���s���y���z���{���|���}���~���������������k���a���a�����������������a��a�������������������������k������������������k���������������D��$�7���:�<���b����������������������������������$&�&�*�2�4�6�b&�d�g��&��&����&��&������������������$�6�<���b����������������&�������������������$�6�<���b����������������&�����������������MB@hm�
�����
L�G��BG�S�f�� JBits@ ���m�B��`#c�VeraSans����6���628R00@		
							
					


			












	

																															






			
						
	
			
	



		

	


								

	

			





	
	


				






	


	
		


		





	




				
											

	
	
	
		
	
	
					
									
	

																																					


	
						

			

















		

	

	

	
											





																					

	
	




	
		


		



	
		
	
		
				

	


	
















	
	
	



		
	
	
	

	



	
	
		




											











	








	
	







		








	
		
		





			



		



	





		




























			
		
	
	

	


			



		





										







								
	






		
	
	






								
																

	
	
									









		


	







		






	













	
	
	
	





















































		
































































	




















































	
		



		



		



















	


		




							

		

		
			
			

	 
			

		

	





 






	
"



	




	

















"















	







#



				
	


	
	














#









	


	







$			
					
	

		
		$	
	&		
	
					
	

				&	
	��P
�_<������g����
Lmtests/gmagick-063-levelimage.phpt000064400000000440151730210050012613 0ustar00--TEST--
levelImage test
--SKIPIF--
<?php
/* $Id: gmagick-063-levelimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->levelImage(0.2, 0.2, 0.2);
echo "ok";
?>
--EXPECTF--
ok
tests/gmagick-069-trimimage.phpt000064400000000422151730210050012465 0ustar00--TEST--
trimImage test
--SKIPIF--
<?php
/* $Id: gmagick-069-trimimage.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$gm = new Gmagick();
$gm->read("magick:rose");
$gm->trimImage(0.5);
echo "ok";
?>
--EXPECTF--
oktests/gmagickpixel-003-getcolorcount.phpt000064400000000464151730210050014432 0ustar00--TEST--
Test getColorcount method
--SKIPIF--
<?php
/* $Id: gmagickpixel-003-getcolorcount.phpt 280206 2009-05-09 18:22:48Z vito $ */
if(!extension_loaded('gmagick')) die('skip');
?>
--FILE--
<?php
$color = "rgb(255,255,255)";
$pixel = new GmagickPixel($color);
echo $pixel->getColorCount();
?>
--EXPECTF--
0tests/gmagick-104-setgetimagepage.phpt000064400000000713151730210050013633 0ustar00--TEST--
Gmagick::setImagePage test
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');

checkClassMethods(
    'Gmagick',
    array('setImagePage', 'getImagePage')
);

?>
--FILE--
<?php
$image = new Gmagick('magick:rose');
$image->setImagePage(10,10,10,10);
$result = $image->getImagePage();
if (($result['width'] === 10) && ($result['height'] === 10) 
    && ($result['x'] === 10) && ($result['y'] === 10)) {
    echo "ok";
}
?>
--EXPECTF--
ok