case 'i': /* Filename last used for an image (read or write) */
{
WarnNoImageReturn("\"%%%c\"",letter);
- string=image->magick_filename;
+ string=image->filename;
break;
}
case 'k': /* Number of unique colors */
(ssize_t) image->dispose);
break;
}
+ case 'F': /* Magick filename (sanitized) - filename given incl. coder & read mods */
+ {
+ const char
+ *q;
+
+ register char
+ *p;
+
+ static char
+ whitelist[] =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_- "
+ ".@&;<>()/\\\'\":%=~`";
+
+ WarnNoImageReturn("\"%%%c\"",letter);
+ (void) CopyMagickString(value,image->magick_filename,MagickPathExtent);
+ p=value;
+ q=value+strlen(value);
+ for (p+=strspn(p,whitelist); p != q; p+=strspn(p,whitelist))
+ *p='_';
+ break;
+ }
case 'G': /* Image size as geometry = "%wx%h" */
{
WarnNoImageReturn("\"%%%c\"",letter);
AUTOTRACE_LIBS = @AUTOTRACE_LIBS@
AWK = @AWK@
AutotraceDecodeDelegate = @AutotraceDecodeDelegate@
-BGPDecodeDelegate = @BGPDecodeDelegate@
-BGPEncodeDelegate = @BGPEncodeDelegate@
BIN_DIR = @BIN_DIR@
+BPGDecodeDelegate = @BPGDecodeDelegate@
+BPGEncodeDelegate = @BPGEncodeDelegate@
BZIPDelegate = @BZIPDelegate@
BZLIB_LIBS = @BZLIB_LIBS@
BlenderDecodeDelegate = @BlenderDecodeDelegate@
ConfigureError FatalErrorException
);
-$VERSION = '7.00';
+$VERSION = '7.01';
sub AUTOLOAD {
# This AUTOLOAD is used to 'autoload' constants from the constant()
%w image columns (width)
%x input image x resolution
%y input image y resolution
+ %F sanitized original input filename
Set option delegate:bimodal=true to process bimodal delegates otherwise they
are ignored.
<delegate decode="browse" stealth="True" spawn="True" command=""@BrowseDelegate@" http://www.imagemagick.org/; rm "%i""/>
<delegate decode="cdr" command=""@UniconvertorDelegate@" "%i" "%o.svg"; mv "%o.svg" "%o""/>
<delegate decode="cgm" command=""@UniconvertorDelegate@" "%i" "%o.svg"; mv "%o.svg" "%o""/>
- <delegate decode="doc" command=""@DOCDecodeDelegate@" --headless --convert-to pdf "%i" 2> "%u"; mv `basename "%i" doc`pdf "%o""/>
- <delegate decode="docx" command=""@DOCDecodeDelegate@" --headless --convert-to pdf "%i" 2> "%u"; mv `basename "%i" docx`pdf "%o""/>
+ <delegate decode="doc" command=""@DOCDecodeDelegate@" --convert-to pdf -outdir `dirname "%i"` "%i" 2> "%u"; mv "%i.pdf" "%o""/>
+ <delegate decode="docx" command=""@DOCDecodeDelegate@" --convert-to pdf -outdir `dirname "%i"` "%i" 2> "%u"; mv "%i.pdf" "%o""/>
<delegate decode="dng:decode" command=""@DNGDecodeDelegate@" --silent --create-id=also --out-type=png --out-depth=16 "--output=%u.png" "%i""/>
<delegate decode="dot" command='"@GVCDecodeDelegate@" -Tsvg "%i" -o "%o"' />
<delegate decode="dvi" command=""@DVIDecodeDelegate@" -q -o "%o" "%i""/>
<delegate decode="hpgl" command=""@HPGLDecodeDelegate@" -q -m eps -f `basename "%o"` "%i"; mv -f `basename "%o"` "%o""/>
<delegate decode="htm" command=""@HTMLDecodeDelegate@" -U -o "%o" "%i""/>
<delegate decode="html" command=""@HTMLDecodeDelegate@" -U -o "%o" "%i""/>
- <delegate decode="https" command=""@WWWDecodeDelegate@" -s -k -L -o "%o" "https:%M""/>
+ <delegate decode="https" command=""@WWWDecodeDelegate@" -s -k -L -o "%o" "https:%F""/>
<delegate decode="ilbm" command=""@ILBMDecodeDelegate@" "%i" > "%o""/>
<delegate decode="jxr" command="mv "%i" "%i.jxr"; "@JXRDecodeDelegate@" -i "%i.jxr" -o "%o.pnm"; mv "%i.jxr" "%i"; mv "%o.pnm" "%o""/>
<delegate decode="man" command=""@MANDelegate@" -man -Tps "%i" > "%o""/>
- <delegate decode="miff" encode="show" spawn="True" command=""@DisplayDelegate@" -delay 0 -window-group %[group] -title "%l " "ephemeral:%i""/>
+ <delegate decode="miff" encode="show" spawn="True" command=""@DisplayDelegate@" -delay 0 -title "%l " "ephemeral:%i""/>
<delegate decode="miff" encode="win" stealth="True" spawn="True" command=""@DisplayDelegate@" -immutable -delay 0 -window-group %[group] -title "%l " "ephemeral:%i""/>
<delegate decode="mpeg:decode" command=""@MPEGDecodeDelegate@" -nostdin -v -1 -i "%i" -vframes %S -vcodec pam -an -f rawvideo -y "%u.pam" 2> "%u""/>
- <delegate decode="odt" command=""@DOCDecodeDelegate@" --headless --convert-to pdf "%i" 2> "%u"; mv `basename "%i" odt`pdf "%o""/>
+ <delegate decode="odt" command=""@DOCDecodeDelegate@" --convert-to pdf -outdir `dirname "%i"` "%i" 2> "%u"; mv "%i.pdf" "%o""/>
<delegate decode="pcl:cmyk" stealth="True" command=""@PCLDelegate@" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=@PCLCMYKDevice@" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
<delegate decode="pcl:color" stealth="True" command=""@PCLDelegate@" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=@PCLColorDevice@" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
<delegate decode="pcl:mono" stealth="True" command=""@PCLDelegate@" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=@PCLMonoDevice@" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
<delegate decode="bmp" encode="jxr" command="mv "%i" "%i.bmp"; "@JXREncodeDelegate@" -i "%i.bmp" -o "%o.jxr"; mv "%i.bmp" "%i"; mv "%o.jxr" "%o""/>
<delegate decode="bmp" encode="wdp" command="mv "%i" "%i.bmp"; "@JXREncodeDelegate@" -i "%i.bmp" -o "%o.jxr"; mv "%i.bmp" "%i"; mv "%o.jxr" "%o""/>
<delegate decode="pov" command=""@POVDelegate@" "+i%i" -D0 "+o%o" +fn%q +w%w +h%h +a -q9 "-kfi%s" "-kff%n";"@ConvertDelegate@" -concatenate "%o*.png" "%o""/>
- <delegate decode="ppt" command=""@DOCDecodeDelegate@" --headless --convert-to pdf "%i" 2> "%u"; mv `basename "%i" ppt`pdf "%o""/>
- <delegate decode="pptx" command=""@DOCDecodeDelegate@" --headless --convert-to pdf "%i" 2> "%u"; mv `basename "%i" pptx`pdf "%o""/>
+ <delegate decode="ppt" command=""@DOCDecodeDelegate@" --convert-to pdf -outdir `dirname "%i"` "%i" 2> "%u"; mv "%i.pdf" "%o""/>
+ <delegate decode="pptx" command=""@DOCDecodeDelegate@" --convert-to pdf -outdir `dirname "%i"` "%i" 2> "%u"; mv "%i.pdf" "%o""/>
<delegate decode="ps:alpha" stealth="True" command=""@PSDelegate@" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=@GSAlphaDevice@" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "-f%s" "-f%s""/>
<delegate decode="ps:cmyk" stealth="True" command=""@PSDelegate@" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=@GSCMYKDevice@" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "-f%s" "-f%s""/>
<delegate decode="ps:color" stealth="True" command=""@PSDelegate@" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=@GSColorDevice@" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "-f%s" "-f%s""/>
<delegate decode="wdp" command="mv "%i" "%i.jxr"; "@JXRDecodeDelegate@" -i "%i.jxr" -o "%o.bmp"; mv "%i.jxr" "%i"; mv "%o.bmp" "%o""/>
<delegate decode="webp" command=""@WebPDecodeDelegate@" -pam "%i" -o "%o""/>
<delegate decode="wmf" command=""@WMFDecodeDelegate@" -o "%o" "%i""/>
- <delegate decode="xls" command=""@DOCDecodeDelegate@" --headless --convert-to pdf "%i" 2> "%u"; mv `basename "%i" xls`pdf "%o""/>
- <delegate decode="xlsx" command=""@DOCDecodeDelegate@" --headless --convert-to pdf "%i" 2> "%u"; mv `basename "%i" xlsx`pdf "%o""/>
+ <delegate decode="xls" command=""@DOCDecodeDelegate@" --convert-to pdf -outdir `dirname "%i"` "%i" 2> "%u"; mv "%i.pdf" "%o""/>
+ <delegate decode="xlsx" command=""@DOCDecodeDelegate@" --convert-to pdf -outdir `dirname "%i"` "%i" 2> "%u"; mv "%i.pdf" "%o""/>
<delegate decode="xps:cmyk" stealth="True" command=""@XPSDelegate@" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=@XPSCMYKDevice@" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
<delegate decode="xps:color" stealth="True" command=""@XPSDelegate@" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=@XPSColorDevice@" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
<delegate decode="xps:mono" stealth="True" command=""@XPSDelegate@" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=@XPSMonoDevice@" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
- <delegate encode="mpeg:encode" stealth="True" command=""@MPEGEncodeDelegate@" -nostdin -v -1 -i "%M%%d.jpg" "%u.%m" 2> "%u""/>
+ <delegate encode="mpeg:encode" stealth="True" command=""@MPEGEncodeDelegate@" -nostdin -v -1 -i "%F%%d.jpg" "%u.%m" 2> "%u""/>
</delegatemap>
BrowseDelegate
BZIPDelegate
BlenderDecodeDelegate
-BGPEncodeDelegate
-BGPDecodeDelegate
+BPGEncodeDelegate
+BPGDecodeDelegate
AutotraceDecodeDelegate
SHAREARCH_PATH
SHAREARCH_RELATIVE_PATH
MAGICK_VERSION=7.0.1-0
-MAGICK_GIT_REVISION=18063:8528847:20160427
+MAGICK_GIT_REVISION=18074:524db0c:20160430
# Substitute library versioning
fi
-# Extract the first word of ""$BGPDecodeDelegateDefault"", so it can be a program name with args.
-set dummy "$BGPDecodeDelegateDefault"; ac_word=$2
+# Extract the first word of ""$BPGDecodeDelegateDefault"", so it can be a program name with args.
+set dummy "$BPGDecodeDelegateDefault"; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_BGPDecodeDelegate+:} false; then :
+if ${ac_cv_path_BPGDecodeDelegate+:} false; then :
$as_echo_n "(cached) " >&6
else
- case $BGPDecodeDelegate in
+ case $BPGDecodeDelegate in
[\\/]* | ?:[\\/]*)
- ac_cv_path_BGPDecodeDelegate="$BGPDecodeDelegate" # Let the user override the test with a path.
+ ac_cv_path_BPGDecodeDelegate="$BPGDecodeDelegate" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_BGPDecodeDelegate="$as_dir/$ac_word$ac_exec_ext"
+ ac_cv_path_BPGDecodeDelegate="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
IFS=$as_save_IFS
- test -z "$ac_cv_path_BGPDecodeDelegate" && ac_cv_path_BGPDecodeDelegate=""$BGPDecodeDelegateDefault""
+ test -z "$ac_cv_path_BPGDecodeDelegate" && ac_cv_path_BPGDecodeDelegate=""$BPGDecodeDelegateDefault""
;;
esac
fi
-BGPDecodeDelegate=$ac_cv_path_BGPDecodeDelegate
-if test -n "$BGPDecodeDelegate"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BGPDecodeDelegate" >&5
-$as_echo "$BGPDecodeDelegate" >&6; }
+BPGDecodeDelegate=$ac_cv_path_BPGDecodeDelegate
+if test -n "$BPGDecodeDelegate"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BPGDecodeDelegate" >&5
+$as_echo "$BPGDecodeDelegate" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
-# Extract the first word of ""$BGPEncodeDelegateDefault"", so it can be a program name with args.
-set dummy "$BGPEncodeDelegateDefault"; ac_word=$2
+# Extract the first word of ""$BPGEncodeDelegateDefault"", so it can be a program name with args.
+set dummy "$BPGEncodeDelegateDefault"; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_BGPEncodeDelegate+:} false; then :
+if ${ac_cv_path_BPGEncodeDelegate+:} false; then :
$as_echo_n "(cached) " >&6
else
- case $BGPEncodeDelegate in
+ case $BPGEncodeDelegate in
[\\/]* | ?:[\\/]*)
- ac_cv_path_BGPEncodeDelegate="$BGPEncodeDelegate" # Let the user override the test with a path.
+ ac_cv_path_BPGEncodeDelegate="$BPGEncodeDelegate" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_BGPEncodeDelegate="$as_dir/$ac_word$ac_exec_ext"
+ ac_cv_path_BPGEncodeDelegate="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
IFS=$as_save_IFS
- test -z "$ac_cv_path_BGPEncodeDelegate" && ac_cv_path_BGPEncodeDelegate=""$BGPEncodeDelegateDefault""
+ test -z "$ac_cv_path_BPGEncodeDelegate" && ac_cv_path_BPGEncodeDelegate=""$BPGEncodeDelegateDefault""
;;
esac
fi
-BGPEncodeDelegate=$ac_cv_path_BGPEncodeDelegate
-if test -n "$BGPEncodeDelegate"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BGPEncodeDelegate" >&5
-$as_echo "$BGPEncodeDelegate" >&6; }
+BPGEncodeDelegate=$ac_cv_path_BPGEncodeDelegate
+if test -n "$BPGEncodeDelegate"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BPGEncodeDelegate" >&5
+$as_echo "$BPGEncodeDelegate" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if test "$with_frozenpaths" != 'yes'; then
# Re-set delegate definitions to default (no paths)
AutotraceDecodeDelegate="$AutotraceDecodeDelegateDefault"
- BGPDecodeDelegate="$BGPDecodeDelegateDefault"
- BGPEncodeDelegate="$BGPEncodeDelegateDefault"
+ BPGDecodeDelegate="$BPGDecodeDelegateDefault"
+ BPGEncodeDelegate="$BPGEncodeDelegateDefault"
BlenderDecodeDelegate="$BlenderDecodeDelegateDefault"
BZIPDelegate="$BZIPDelegateDefault"
BrowseDelegate="$BrowseDelegateDefault"
# Search for delegates
AC_PATH_PROG(AutotraceDecodeDelegate, "$AutotraceDecodeDelegateDefault", "$AutotraceDecodeDelegateDefault")
-AC_PATH_PROG(BGPDecodeDelegate, "$BGPDecodeDelegateDefault", "$BGPDecodeDelegateDefault")
-AC_PATH_PROG(BGPEncodeDelegate, "$BGPEncodeDelegateDefault", "$BGPEncodeDelegateDefault")
+AC_PATH_PROG(BPGDecodeDelegate, "$BPGDecodeDelegateDefault", "$BPGDecodeDelegateDefault")
+AC_PATH_PROG(BPGEncodeDelegate, "$BPGEncodeDelegateDefault", "$BPGEncodeDelegateDefault")
AC_PATH_PROG(BlenderDecodeDelegate, "$BlenderDecodeDelegateDefault", "$BlenderDecodeDelegateDefault")
AC_PATH_PROG(BZIPDelegate, "$BZIPDelegateDefault", "$BZIPDelegateDefault")
AC_PATH_PROGS(BrowseDelegate, "$BrowseDelegateDefault" google-chrome firefox konqueror mozilla lynx, "$BrowseDelegateDefault")
if test "$with_frozenpaths" != 'yes'; then
# Re-set delegate definitions to default (no paths)
AutotraceDecodeDelegate="$AutotraceDecodeDelegateDefault"
- BGPDecodeDelegate="$BGPDecodeDelegateDefault"
- BGPEncodeDelegate="$BGPEncodeDelegateDefault"
+ BPGDecodeDelegate="$BPGDecodeDelegateDefault"
+ BPGEncodeDelegate="$BPGEncodeDelegateDefault"
BlenderDecodeDelegate="$BlenderDecodeDelegateDefault"
BZIPDelegate="$BZIPDelegateDefault"
BrowseDelegate="$BrowseDelegateDefault"
# Delegate substitutions
AC_SUBST(AutotraceDecodeDelegate)
-AC_SUBST(BGPDecodeDelegate)
-AC_SUBST(BGPEncodeDelegate)
+AC_SUBST(BPGDecodeDelegate)
+AC_SUBST(BPGEncodeDelegate)
AC_SUBST(BlenderDecodeDelegate)
AC_SUBST(BZIPDelegate)
AC_SUBST(BrowseDelegate)