When you display a graphic, you can save it in the following formats.
| .bmp | Windows Bitmap |
| .emf | Windows Enhanced Metafile |
| .eps, .ps | Encapsulated PostScript |
| .gif | Graphics Interchange Format |
| .jpeg, .jpg | Joint Photographic Experts Group |
| .jp2, .j2k, .jpx | JPEG2000 |
| .kml | Open Geospatial Consortium (OGC) Keyhole Markup Language |
| Portable Document Format | |
| .pict | Macintosh PICT |
| .png | Portable Network Graphics |
| .tif, .tiff | Tag Image File Format |
You can also save programmatically from the IDL command line. The following example displays a bar plot:
x = FINDGEN(41)/10 - 2
gauss = EXP(-x^2)
p = BARPLOT(x, gauss, $
TITLE='Gaussian Distribution',$
YRANGE=[0,1.1], / DATA)
p.Save, "gaussian.png", BORDER=10, $
RESOLUTION=300, /TRANSPARENT
Note: The Save method saves the window contents after graphic creation. The file is saved in the current directory unless you specify a directory. The current directory is displayed in the Console toolbar. You can also issue the following command to find the current directory:
CD, current=dir
PRINT, dir