use -alpha option only with recent version of imagemagick. fixes #3755
This commit is contained in:
parent
f3665cd689
commit
e40cb0d4b3
1 changed files with 10 additions and 2 deletions
|
@ -854,8 +854,16 @@ class ConversationTextview:
|
||||||
exitcode = p.wait()
|
exitcode = p.wait()
|
||||||
|
|
||||||
if exitcode == 0:
|
if exitcode == 0:
|
||||||
p = Popen(['convert', '-alpha', 'off', tmpfile + '.ps',
|
convert_version = helpers.get_output_of_command(
|
||||||
tmpfile + '.png'], cwd=gettempdir())
|
'convert -version')[0].split()[2]
|
||||||
|
convert_version = [int(n) for n in convert_version.split('.')]
|
||||||
|
if convert_version > [6, 3, 4]:
|
||||||
|
# -alpha option was added in 6.3.5 release
|
||||||
|
alpha = ['-alpha', 'off']
|
||||||
|
else:
|
||||||
|
alpha = []
|
||||||
|
p = Popen(['convert'] + alpha + [tmpfile + '.ps', tmpfile + '.png'],
|
||||||
|
cwd=gettempdir())
|
||||||
exitcode = p.wait()
|
exitcode = p.wait()
|
||||||
|
|
||||||
extensions = ['.tex', '.log', '.aux', '.dvi', '.ps']
|
extensions = ['.tex', '.log', '.aux', '.dvi', '.ps']
|
||||||
|
|
Loading…
Add table
Reference in a new issue