From: Christian Weiske Date: Tue, 8 Apr 2014 16:02:27 +0000 (+0200) Subject: support jpg format in curlycapt X-Git-Tag: v0.1.0~27 X-Git-Url: https://git.cweiske.de/phancap.git/commitdiff_plain/fce6f08593893e432af53fce9aa375a39ffdcb24 support jpg format in curlycapt --- diff --git a/src/phancap/Adapter/Cutycapt.php b/src/phancap/Adapter/Cutycapt.php index 173a86c..909c90f 100644 --- a/src/phancap/Adapter/Cutycapt.php +++ b/src/phancap/Adapter/Cutycapt.php @@ -10,10 +10,14 @@ class Adapter_Cutycapt public function render(Image $img, Options $options) { + $format = $options->values['sformat']; + if ($format == 'jpg') { + $format = 'jpeg'; + } $tmpPath = $img->getPath() . '-tmp'; $cmd = 'cutycapt' . ' --url=' . escapeshellarg($options->values['url']) - . ' --out-format=' . escapeshellarg($options->values['sformat']) + . ' --out-format=' . escapeshellarg($format) . ' --out=' . escapeshellarg($tmpPath) . ' --max-wait=10000' . ' --min-width=' . $options->values['bwidth'];