<<prev file | next file >>    view single page | view frames    summary: fields | routine    details: routine

Picture/

saveimage.pro

Save the current graphics window to an output file (GIF by default). The output formats supported are: GIF 8-bit with color table, BMP 8-bit with color table, PNG 8-bit with color table, PICT 8-bit with color table, JPEG 24-bit true color, TIFF 24-bit true-color. Any conversions necessary to convert 8-bit or 24-bit images onscreen to 8-bit or 24-bit output files are done automatically.

topsaveimage Input/Output

saveimage, FILE, BMP=BMP, PNG=PNG, PICT=PICT, JPEG=JPEG, TIFF=TIFF, QUALITY=QUALITY, DITHER=DITHER, CUBE=CUBE, QUIET=QUIET, MULTIPLE=MULTIPLE

Parameters

FILE        in required default: format GIF

Name of the output file

Keywords

BMP       

Set this keyword to create BMP format (8-bit with color table).

PNG       

Set this keyword to create PNG format (8-bit with color table).

PICT       

Set this keyword to create PICT format (8-bit with color table).

JPEG       

Set this keyword to create JPEG format (24-bit true color).

TIFF       

Set this keyword to create TIFF format (24-bit true color).

QUALITY        default: 75

If set to a named variable, specifies the quality for JPEG output. Ranges from 0 ("terrible") to 100 ("excellent"). Smaller quality values yield higher compression ratios and smaller output files.

DITHER        default: no dithering

If set, dither the output image when creating 8-bit output which is read from a 24-bit display.

CUBE       

{default=to use statistical method) If set, use the color cube method to quantize colors when creating 8-bit output which is read from a 24-bit display. This may improve the accuracy of colors in the output image, especially white.

QUIET        default: to print an information message

Set this keyword to suppress the information message.

MULTIPLE       

Examples

IDL> openr, lun, filepath('hurric.dat', subdir='examples/data'), /get_lun IDL> image = bytarr(440, 330) IDL> readu, lun, image IDL> free_lun, lun IDL> loadct, 13 IDL> tvscl, image IDL> saveimage, 'hurric.gif'

Version history

Version

$Id: saveimage.pro 371 2008-08-07 09:32:02Z pinsard $

History

Known issues

Restrictions

The output file is overwritten if it exists. requires IDL 5.0 or higher (square bracket array syntax).

Statistics

McCabe cyclic 37
McCabe essential 1
McCabe modular design 1
Produced by IDLdoc 2.0.