util/
vis_convert.pro
system utility
includes main-level programUse ImageMagick to convert a file between formats. To specify the location of the convert command from the ImageMagick utilities, do one of the following:
1. set the CONVERT_LOCATION keyword 2. set the !convert_location system variable 3. place convert in the OS PATH
Examples
Try the main-level program at the end of this file:
IDL> .run vis_convert
Routines
result = vis_convert_read_image(filename)
Attempt to read an image file.
vis_convert [, basename] [, density=long] [, max_dimensions=lonarr(2)] [, scale=long] [, from_extension=string] [, /from_eps] [, /from_png] [, /from_ps] [, to_extension=string] [, /to_eps] [, /to_png] [, /to_ps] [, command=string] [, output=bytarr] [, convert_location=string]
Use ImageMagick to convert a file between formats.
Routine details
top vis_convert_read_image
result = vis_convert_read_image(filename)
Attempt to read an image file.
Return value
image or -1L if format not supported
Parameters
- filename in required type=string
filename of file to read
top vis_convert
vis_convert [, basename] [, density=long] [, max_dimensions=lonarr(2)] [, scale=long] [, from_extension=string] [, /from_eps] [, /from_png] [, /from_ps] [, to_extension=string] [, /to_eps] [, /to_png] [, /to_ps] [, command=string] [, output=bytarr] [, convert_location=string]
Use ImageMagick to convert a file between formats.
Parameters
- basename in optional type=string
basename of file to convert (used for output name as well)
Keywords
- density in optional type=long default=300
density of output image in dots per inch
- max_dimensions in optional type=lonarr(2)
maximum dimensions for the output image in pixels
- scale in optional type=long default=100
scale percentage to use
- from_extension in optional type=string
extension to use for input file
- from_eps in optional type=boolean
if set, indicates the input is a Encapsulated PostScript file
- from_png in optional type=boolean
if set, indicates the input is a PNG file
- from_ps in optional type=boolean
if set, indicates the input is a PostScript file
- to_extension in optional type=string
extension to use for output file
- to_eps in optional type=boolean
if set, indicates the output should a Encapsulated Postscript file
- to_png in optional type=boolean
if set, indicates the output should a PNG image file
- to_ps in optional type=boolean
if set, indicates the output should a Postscript file
- command out optional type=string
convert command
- output out optional type=bytarr
output image if output format is an image type
- convert_location in optional type=string
location of the convert command
File attributes
Modification date: | Mon Nov 29 18:32:44 2010 |
Lines: | 204 |
Docformat: | rst rst |