2006-07-17 19:41:32 +00:00
|
|
|
#!/usr/bin/env python
|
2006-08-08 10:42:59 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2003-08-22 10:50:02 +00:00
|
|
|
|
2006-06-26 14:17:12 +00:00
|
|
|
# file convertDefault.py
|
2003-08-22 10:50:02 +00:00
|
|
|
# This file is part of LyX, the document processor.
|
|
|
|
# Licence details can be found in the file COPYING.
|
|
|
|
|
2006-08-08 10:42:59 +00:00
|
|
|
# \author Herbert Voß
|
2006-06-26 14:17:12 +00:00
|
|
|
# \author Bo Peng
|
2003-08-22 10:50:02 +00:00
|
|
|
|
|
|
|
# Full author contact details are available in file CREDITS.
|
|
|
|
|
2003-01-13 23:35:18 +00:00
|
|
|
# The default converter if no other has been defined by the user from the
|
|
|
|
# Conversion->Converter tab of the Preferences dialog.
|
2003-08-22 10:50:02 +00:00
|
|
|
|
2003-01-13 23:35:18 +00:00
|
|
|
# The user can also redefine this default converter, placing their
|
|
|
|
# replacement in ~/.lyx/scripts
|
2003-08-22 10:50:02 +00:00
|
|
|
|
2003-01-13 23:35:18 +00:00
|
|
|
# converts an image from $1 to $2 format
|
2006-06-26 14:17:12 +00:00
|
|
|
import os, sys
|
2007-02-02 01:39:52 +00:00
|
|
|
if os.system(r'convert -depth 8 "%s" "%s"' % (sys.argv[1], sys.argv[2])) != 0:
|
2006-06-27 21:08:54 +00:00
|
|
|
print >> sys.stderr, sys.argv[0], 'ERROR'
|
|
|
|
print >> sys.stderr, 'Execution of "convert" failed.'
|
|
|
|
sys.exit(1)
|