Converts an image into another format.
You can use this command to convert a file into another.
phMagick is smart, so it will guess the correct format from the file extension optionaly you can optimize the image (striping exif tags) and set the final image quality

Code:
$phMagick = new \phMagick\Core\Runner(); $action = new \phMagick\Action\Convert($this->originalFile, $this->newFile); // optimize the image $action->optimize(); // sets image quality $action->quality(70); // execute the convert action $phMagick->run($action);