public function load(ImageInterface $image, array $options = array())
{
$optionsCount = count($options);
if ($optionsCount < 2) {
throw new InvalidArgumentException('Invalid options for border filter. You must provide array(width, height)');
}
$color = static::DEFAULT_BORDER_COLOR;
if ($optionsCount > 2) {
list($width, $height, $color) = $options;
} else {
list($width, $height) = $options;
}
$border = new Border($image->palette()->color($color), $width, $height);
return $border->apply($image);
}