Skip to content

Commit

Permalink
Add "xc" to allow creating images with "X window color"
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierstoval committed Feb 9, 2018
1 parent f73ab17 commit b88c2a8
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion CommandOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,26 @@ public function size($geometry)
return $this;
}

/**
* @param string $canvasColor
*
* @return $this
*/
public function xc(string $canvasColor = 'none')
{
$this->command .= ' xc:' . $this->escape($this->ref->color($canvasColor)).' ';

return $this;
}

/**
* @param string|Geometry $geometry
*
* @return $this
*/
public function crop($geometry)
{
$this->command .= ' -crop ' . $this->escape($this->ref->geometry($geometry)).' ';
$this->command .= ' -crop ' . $this->escape($this->ref->geometry($geometry), false).' ';

return $this;
}
Expand Down

0 comments on commit b88c2a8

Please sign in to comment.