/** * Create a new type action * * @param \Karla\Program $program * The program to use * @param string $type * The type to use * * @throws \InvalidArgumentException If the supplied colorspace is not supported by imagemagick */ public function __construct($program, $type) { if (!Support::imageTypes($program, $type)) { $message = 'The supplied colorspace (' . $type . ') is not supported by imagemagick'; throw new \InvalidArgumentException($message); } $this->type = $type; }