From fce6f08593893e432af53fce9aa375a39ffdcb24 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 8 Apr 2014 18:02:27 +0200 Subject: [PATCH] support jpg format in curlycapt --- src/phancap/Adapter/Cutycapt.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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']; -- 2.30.2