mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-08 20:32:49 +00:00
6bba977f42
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@807 a592a061-630c-0410-9148-cb99ea01b6c8
24 lines
539 B
Python
24 lines
539 B
Python
#!/usr/bin/python
|
|
# This script converts a raster format picture into a PNG and EPS file
|
|
|
|
import sys
|
|
import os
|
|
import os.path
|
|
|
|
if len(sys.argv) > 2:
|
|
pars = sys.argv[2]
|
|
|
|
pid = os.fork()
|
|
if pid == 0:
|
|
os.execvp("convert", ["convert", pars, sys.argv[1], os.path.splitext(sys.argv[1])[0] + ".eps"])
|
|
print "convert did not work"
|
|
os.exit(1)
|
|
os.wait()
|
|
|
|
pid = os.fork()
|
|
if pid == 0:
|
|
os.execvp("convert", ["convert", pars, sys.argv[1], os.path.splitext(sys.argv[1])[0] + ".png"])
|
|
print "convert did not work second time"
|
|
os.exit(1)
|
|
os.wait()
|