git.cweiske.de
/
phancap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
e37dfdd
)
support jpg format in curlycapt
author
Christian Weiske
<cweiske@cweiske.de>
Tue, 8 Apr 2014 16:02:27 +0000
(18:02 +0200)
committer
Christian Weiske
<cweiske@cweiske.de>
Tue, 8 Apr 2014 16:02:27 +0000
(18:02 +0200)
src/phancap/Adapter/Cutycapt.php
patch
|
blob
|
history
diff --git
a/src/phancap/Adapter/Cutycapt.php
b/src/phancap/Adapter/Cutycapt.php
index 173a86c78eaf2f0677188b85ccd2c4e683748122..909c90f03786643418ffe9350085ef54edc7bfdf 100644
(file)
--- 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'];