home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / flash078.zip / imagecnv.zip / delegates.mgk next >
Text File  |  2001-05-04  |  6KB  |  206 lines

  1. # ImageMagick delegates for Windows NT.  The format is as follows.  Each
  2. # delegate begins with a tag and/or format separated by a operator tag
  3. # (<=, <=>, =>).  This line must be followed by one or more commands
  4. # preceded with a tab (\t) character.  If a command exceeds the length of
  5. # a line, use the backslash continuation character.  End the command with
  6. # an ampersand (&) to execute the command in the background.
  7. # Optionally you can include the image filename, type, width, height, or
  8. # other image attributes by embedding special format characters:
  9. #   %b   file size
  10. #   %d   directory
  11. #   %e   filename extention
  12. #   %f   filename
  13. #   %h   height
  14. #   %i   input filename
  15. #   %l   label
  16. #   %m   magick
  17. #   %n   number of scenes
  18. #   %o   output filename
  19. #   %p   page number
  20. #   %q   quantum depth
  21. #   %s   scene number
  22. #   %t   top of filename
  23. #   %u   unique temporary filename
  24. #   %w   width
  25. #   %x   x resolution
  26. #   %y   y resolution
  27. #   %z   data written to this file is discarded
  28. # There are three types of delegates: decode, encode, and bypass.  Decode
  29. # delegates begin with a image format (tag) specified (e.g. mpeg) followed
  30. # with a equal-greater sign (=>).  The delegate is invoked whenever ImageMagick
  31. # attempts to read an image whose format specifier or filename extension
  32. # matches the tag (e.g.  image.mpg for tag mpg=>).  The delegate must
  33. # write an image to the file designated by "%o" in an image format that
  34. # ImageMagick understands (e.g. pnm).
  35. # An encode delegate begins with an image format, a less-equal sign (<=),
  36. # and a tag.  The delegate is invoked whenever ImageMagick attempts to
  37. # write an image whose format specifier or filename extension matches the
  38. # tag (e.g. image.mpg for tag <=mpg).  ImageMagick writes to a temporary
  39. # file in the format you specify.  The delegate can then read this file
  40. # and convert it to a format it supports and presumably ImageMagick does
  41. # not.
  42. # If you use a less-equal-greater sign (<=>) the delegate bypasses
  43. # ImageMagick and directly converts the image file (this assumes you do not
  44. # apply any image transforms such as sizing or rotation).
  45. # Lines that begin with a pound sign (#) are comments and are ignored.
  46. # There are a number of delegates used by ImageMagick for special
  47. # circumstances.  For example, the print or Ghostscript delegate.  Don't
  48. # remove these or ImageMagick may behave strangely.
  49. # ImageMagick looks for the delegate configurarion file in this order:
  50. #     c:\ImageMagick\delegates.mgk
  51. #     $MAGICK_HOME\delegates.mgk
  52. #     delegates.mgk
  53. # where MAGICK_DELEGATE_PATH is an environment variable.
  54. # Like entries in the later two directory overrides the specification in
  55. # the system-wide delegates file.
  56. #
  57. #
  58.  
  59. <=bzip
  60.     |bzip2 -f > "%o"
  61.  
  62. <=compress
  63.     |compress -c > "%o"
  64.  
  65. <=show
  66.     display -immutable -window_group %g -title "%l of %f" "tmp:%o" &
  67.  
  68. <=zip
  69.     |gzip -cf > "%o"
  70.  
  71. bmp<=launch
  72.     mspaint "%i".
  73.  
  74. bmp<=win
  75.     mspaint "%i".
  76.  
  77. browse=>
  78.     cmd /C start http://www.imagemagick.org/ImageMagick/ &
  79.  
  80. bzip=>
  81.     |bzip2 -cd "%i"
  82.  
  83. cgm=>
  84.     ralcgm -d ps "%i" "%o" %u
  85.     convert -concatenate "%o"*.ps "%o"
  86.  
  87. compress=>
  88.     |uncompress -c "%i"
  89.  
  90. dvi=>
  91.     dvips -q -o "%o" "%i"
  92.  
  93. edit=>
  94.     notepad "%o"
  95.  
  96. eps<=>pdf
  97.     gswin32c -q -dBATCH -dMaxBitmap=30000000 -dNOPAUSE -dSAFER -sDEVICE=pdfwrite \
  98.       -sOutputFile=%o -- "%i" -c quit
  99.  
  100. eps<=>ps
  101.     gswin32c -q -dBATCH -dMaxBitmap=30000000 -dNOPAUSE -dSAFER -sDEVICE=pswrite \
  102.       -sOutputFile=%o -- "%i" -c quit
  103.  
  104. fig=>
  105.     fig2dev -L ps "%i" "%o"
  106.  
  107. # Gnuplot format (rendered as Postscript)
  108. # Add additional gnuplot commands to the input file to adjust output.
  109. gplt=>
  110.     echo "set size 1.25,0.62; set terminal postscript portrait color solid; set output '"%o"'; load '"%i"'" > %u
  111.     gnuplot %u
  112.  
  113. gs-color=>
  114.     gswin32c -q -dBATCH -dMaxBitmap=30000000 -dNOPAUSE -dSAFER -sDEVICE=pnmraw \
  115.       -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -g%s -r%s %s \
  116.       -sOutputFile=%s -- "%s" -c quit
  117.  
  118. gs-mono=>
  119.     gswin32c -q -dBATCH -dMaxBitmap=30000000 -dNOPAUSE -dSAFER -sDEVICE=pbmraw \
  120.       -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -g%s -r%s %s \
  121.       -sOutputFile=%s -- "%s" -c quit
  122.  
  123. hpgl=>
  124.     hp2xx -q -m eps -f "%i" "%o"
  125.  
  126. htm=>
  127.     html2ps -o "%o" "%i"
  128.  
  129. html=>
  130.     html2ps -o "%o" "%i"
  131.  
  132. mpg=>
  133.     mpeg2decode -q -b "%i" -f -r -o3 "%o%%05d"
  134.     convert -concatenate "%o*.ppm" "%o"
  135.  
  136. m2v=>
  137.     mpeg2decode -q -b "%i" -f -r -o3 "%o%%05d"
  138.     convert -concatenate "%o*.ppm" "%o"
  139.  
  140. pcl<=print
  141.     print "%i"
  142.  
  143. pdf<=>eps
  144.     gswin32c -q -dBATCH -dMaxBitmap=30000000 -dNOPAUSE -dSAFER -sDEVICE=epswrite \
  145.       -sOutputFile=%o -- "%i" -c quit
  146.  
  147. pdf<=>ps
  148.     gswin32c -q -dBATCH -dMaxBitmap=30000000 -dNOPAUSE -dSAFER -sDEVICE=pswrite \
  149.       -sOutputFile=%o -- "%i" -c quit
  150.  
  151. pgp=>
  152.     pgpv -fq "%i"
  153.  
  154. pov=>
  155.     povray +i"%i" +o"%o" +fn%q +w%w +h%h +a -q9 -kfi"%s" -kff%n
  156.     convert -concatenate "%o*.png" "%o"
  157.  
  158. ps<=>eps
  159.     gswin32c -q -dBATCH -dMaxBitmap=30000000 -dNOPAUSE -dSAFER -sDEVICE=epswrite \
  160.       -sOutputFile=%o -- "%i" -c quit
  161.  
  162. ps<=>pdf
  163.     gswin32c -q -dBATCH -dMaxBitmap=30000000 -dNOPAUSE -dSAFER -sDEVICE=pdfwrite \
  164.       -sOutputFile=%o -- "%i" -c quit
  165.  
  166. rad=>
  167.     ra_ppm -g 1.0 "%i" "%o"
  168.  
  169. rgba<=rle
  170.     mogrify -flip -size %wx%h "rgba:%i"
  171.     rawtorle -w %w -h %h -n 4 -o "%o" "%i"
  172.  
  173. scan=>
  174.     scanimage  -d "%i" > "%o"
  175.  
  176. shtml=>
  177.     html2ps -o "%o" "%i"
  178.  
  179. txt<=>ps
  180.     enscript -o "%o" "%i"
  181.  
  182. wmf=>
  183.     wmftogif "%i" "%o"
  184.  
  185. yuv<=m2v
  186.     mpeg2encode %u "%o"
  187.     convert -concatenate "%i*.yuv" %u
  188.  
  189. yuv<=mpg
  190.     mpeg2encode %u "%o"
  191.     convert -concatenate "%i*.yuv" %u
  192.  
  193. zip=>
  194.     |gzip -cdfq "%i"
  195.