File tree 1 file changed +12
-6
lines changed
1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -44,16 +44,22 @@ public function testVipsBandsplit()
44
44
45
45
public function testVipsComposite ()
46
46
{
47
- /* We can't run this test on travis ... we need some way to spot
48
- * composite's existence.
49
- *
50
47
$ overlay = $ this ->image ->add (20 )->bandjoin (128 );
51
48
$ overlay = $ overlay ->cast (Vips \BandFormat::UCHAR );
52
- $comp = $this->image->composite($overlay, Vips\BlendMode::OVER);
53
49
54
- $this->assertEquals($comp->getpoint(0, 0)[0], $this->pixel[0] + 10);
55
- *
50
+ /* Added in 8.6.
56
51
*/
52
+ $ have_composite = FALSE ;
53
+ try {
54
+ $ comp = $ this ->image ->composite ($ overlay , Vips \BlendMode::OVER );
55
+ $ have_composite = TRUE ;
56
+ } catch (Exception $ e ) {
57
+ }
58
+
59
+ if ($ have_composite ) {
60
+ $ comp = $ this ->image ->composite ($ overlay , Vips \BlendMode::OVER );
61
+ $ this ->assertEquals ($ comp ->getpoint (0 , 0 )[0 ], $ this ->pixel [0 ] + 10 );
62
+ }
57
63
}
58
64
59
65
public function testVipsAddConst ()
You can’t perform that action at this time.
0 commit comments