You are here

public function ImagemagickExecArguments::setSourceFormat in ImageMagick 8.3

Same name and namespace in other branches
  1. 8.2 src/ImagemagickExecArguments.php \Drupal\imagemagick\ImagemagickExecArguments::setSourceFormat()

Sets the source image format.

Parameters

string $format: The image format.

Return value

$this

File

src/ImagemagickExecArguments.php, line 279

Class

ImagemagickExecArguments
Stores arguments for execution of ImageMagick/GraphicsMagick commands.

Namespace

Drupal\imagemagick

Code

public function setSourceFormat(string $format) : ImagemagickExecArguments {
  $this->sourceFormat = $this->execManager
    ->getFormatMapper()
    ->isFormatEnabled($format) ? $format : '';
  return $this;
}