3 # file convertDefault.sh
4 # This file is part of LyX, the document processor.
5 # Licence details can be found in the file COPYING.
9 # Full author contact details are available in file CREDITS.
11 # The default converter if no other has been defined by the user from the
12 # Conversion->Converter tab of the Preferences dialog.
14 # The user can also redefine this default converter, placing their
15 # replacement in ~/.lyx/scripts
17 # converts an image from $1 to $2 format
18 convert -depth 8 $1 $2 || {
20 echo "Execution of \"convert\" failed."
24 # It appears that convert succeeded, but we know better than to trust it ;-)
25 # convert is passed strings in the form "FMT:FILENAME", so use the ':' to
26 # delimit the two parts.
27 # Do not use 'cut' because Win32 filenames have the form 'C:\my\file'.
28 FILE=`echo $arg2 | sed 's,^[^:]*:,,'`
32 echo "Unable to find file \"${FILE}\""
36 echo "$0 generated file \"${FILE}\" successfully."