diff --git a/src/Command.php b/src/Command.php index 8eeb0c2..b5360ea 100644 --- a/src/Command.php +++ b/src/Command.php @@ -463,7 +463,17 @@ public function quality(int $quality): self return $this; } - + /** + * @see http://imagemagick.org/script/command-line-options.php#density + */ + public function density(int $density): self + { + $densityAry = []; + $densityAry[] = '-density'; + $densityAry[] = (string) $density; + array_splice($this->command,2,0,$densityAry); //density option only works when it's on second place in command (tested for pdf to image) + return $this; + } /** * @param string|Geometry $page *