mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-17 16:14:33 +01:00
...
This commit is contained in:
parent
1081b16a6c
commit
8dbdcd8a8e
1 changed files with 3 additions and 1 deletions
|
|
@ -411,6 +411,8 @@ def test():
|
|||
k = args.pop(0)
|
||||
if '=' in k:
|
||||
n, v = k.partition('=')[::2]
|
||||
if v in ('True', 'False'):
|
||||
v = True if v == 'True' else False
|
||||
try:
|
||||
v = int(v)
|
||||
except Exception:
|
||||
|
|
@ -426,4 +428,4 @@ def test():
|
|||
outf = bn.rpartition('.')[0] + '.' + '-output' + bn.rpartition('.')[-1]
|
||||
img = func(img, **kw)
|
||||
with lopen(outf, 'wb') as f:
|
||||
f.write(image_to_data(img))
|
||||
f.write(image_to_data(img, fmt=outf.rpartition('.')[-1]))
|
||||
|
|
|
|||
Loading…
Reference in a new issue