File: 319_Imagick_getInterpolateMethod.phpt

package info (click to toggle)
php-imagick 3.8.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,292 kB
  • sloc: ansic: 17,876; php: 1,440; xml: 444; pascal: 80; sh: 19; makefile: 2
file content (31 lines) | stat: -rw-r--r-- 717 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--TEST--
Test Imagick, getInterpolateMethod/setInterpolateMethod
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('getInterpolateMethod'));
?>
--FILE--
<?php

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


    $value = $imagick->getInterpolateMethod();
    echo "Interpolate method is " . $value . "\n";
    $imagick->newPseudoImage(640, 480, "gradient:red-blue");

    $imagick->setInterpolateMethod(Imagick::INTERPOLATE_BILINEAR);

    $value = $imagick->getInterpolateMethod();
    echo "Interpolate method is now " . $value . "\n";
}

getInterpolateMethod() ;
echo "Ok";
?>
--EXPECTF--
Interpolate method is 0
Interpolate method is now 5
Ok