1--TEST--
2Test Imagick, frameImage
3--SKIPIF--
4<?php
5$imageMagickRequiredVersion=0x675;
6require_once(dirname(__FILE__) . '/skipif.inc');
7?>
8--FILE--
9<?php
10
11$color = 'rgb(127, 127, 127)';
12$width = 5;
13$height = 5;
14$innerBevel = 3;
15$outerBevel = 3;
16
17function frameImage($color, $width, $height, $innerBevel, $outerBevel) {
18    $imagick = new \Imagick();
19    $imagick->newPseudoImage(640, 480, "magick:logo");
20
21    $width = $width + $innerBevel + $outerBevel;
22    $height = $height + $innerBevel + $outerBevel;
23
24    $imagick->frameimage(
25        $color,
26        $width,
27        $height,
28        $innerBevel,
29        $outerBevel
30    );
31    $bytes = $imagick->getImageBlob();
32    if (strlen($bytes) <= 0) { echo "Failed to generate image.";}
33}
34
35frameImage($color, $width, $height, $innerBevel, $outerBevel) ;
36echo "Ok";
37?>
38--EXPECTF--
39Ok