SavePICT
SavePICT [flags] [as fileNameStr ]
The SavePICT operation creates a picture file representing the top graph, table or layout. The picture file can be opened by many word processing, drawing, and page layout programs.
Parameters
The file to be written is specified by fileNameStr and /P=pathName where pathName is the name of an Igor symbolic path. fileNameStr can be a full path to the file, in which case /P is not needed, a partial path relative to the folder associated with pathName, or the name of a file in the folder associated with pathName. If Igor cannot determine the location of the file from fileNameStr and pathName, it displays a dialog allowing you to specify the file.
If you use a full or partial path for fileNameStr, see Path Separators for details on forming the path.
If you omit fileNameStr but include /P=pathName, SavePICT writes the file using a default file name. The default file name is the window name followed by an extension, such as ".png", ".emf" or ".svg", that depends on the graphic format being exported.
If you specify the file name as "Clipboard", and do not specify a /P=pathName, Igor copies the picture to the Clipboard, rather than to a file. EPS is a file-only format and cannot be stored in the clipboard.
If you specify the file name as "_string_" the output will be saved into a string variable named S_Value, which is used with the ListBox binary bitmap display mode.
If you use the special name _PictGallery_ with the /P flag, then the picture will be stored in Igor's picture gallery (see Pictures) with the name you provide via fileNameStr. This feature was added in support of making movies using the /PICT flag with NewMovie.
Flags
| /B=dpi | Controls image resolution in dots-per-inch (dpi ). The legal values for dpi are n*72 where n can be from 1 to 8. At the time of this writing, the actual dpi is not used. Igor calculates n from your value of dpi and then multiplies n by your computer's screen resolution. This is because bitmap images that are not an integer multiple of the screen resolution look quite bad. | ||||||
| Also see the /RES flag. | |||||||
| /C=c | Specifies color mode. | ||||||
| |||||||
| /D=d | Obsolete in Igor Pro 7 or later. | ||||||
| /E=e | Sets graphics format used when exporting a graphic. See details below. | ||||||
| /EF= e | Sets font embedding. | ||||||
| |||||||
| /I | Specifies that /W coordinates are in inches. | ||||||
| /M | Specifies that /W coordinates are in centimeters. | ||||||
| /N=winSpec | /N is antiquated but still supported. Use /WIN. | ||||||
| /O | Overwrites file if it exists. | ||||||
| /P=pathName | Saves file into folder specified by pathName, which is the name of an existing symbolic path. | ||||||
| /PGR=(firstPage, lastPage ) | |||||||
| Controls which pages in a multi-page layout are saved. | |||||||
| firstPage and lastPage are one-based page numbers. All pages from firstPage to lastPage are saved if the file format supports it. | |||||||
| The special value 0 refers to the current page and -1 refers to the last page in the layout. | |||||||
| Currently only the PDF formats support saving multiple pages. Other file formats save only firstPage and ignore the value of lastPage. | |||||||
| /PGR was added in Igor Pro 7.00. | |||||||
| /PICT=pict | Saves specified named picture rather than the target window. Native format of the picture is used and all format flags are ignored. | ||||||
| /PLL=p | Specifies Postscript language level when used in conjunction with EPS export. | ||||||
| |||||||
| /Q=q | Sets quality factor (0.0 is lowest, 1.0 is highest). Default is dependent on individual format. Used only by lossy formats such as JPEG. | ||||||
| /R=resID | Obsolete in Igor Pro 7 or later. | ||||||
| /RES=dpi | Controls the resolution of image formats in dots-per-inch. Unlike the similar /B flag, the value for /RES is the actual output resolution and is useful when your publisher demands a specific resolution. | ||||||
| /S | Suppresses the preview that is normally included with an EPS file. | ||||||
| Obsolete in Igor Pro 7 or later. | |||||||
| /SNAP=s | Saves a snapshot (screen dump) of a graph or panel window or subwindow. | ||||||
| |||||||
| Snapshot mode is available only for graphs and panels and only for bitmap export formats PNG, JPEG, and TIFF at screen resolution. | |||||||
| SNAP=2 only applies to graph windows and subwindows specified with /WIN. | |||||||
| When using /W to specify the size of a graph, the capture is sized to fit within the specified rectangle while maintaining the window aspect ratio. Coordinates used with /W are in pixels. | |||||||
| /T=t | Obsolete QuickTime export type. Not supported in Igor Pro 7 or later. | ||||||
| /TRAN[=1 or 0] | |||||||
| Makes white background areas transparent using an RGBA type PNG when used with native PNG export of graphs or page layouts. | |||||||
| /W=(left,top,right,bottom) | |||||||
| Specifies the size of the picture when exporting a graph. If /W is omitted, the size is taken from the graph window. | |||||||
| When exporting a page layout, specifies the part of the page to export. Only objects that fall completely within the specified area are exported. If /W is omitted, the area of the layout containing objects is exported. | |||||||
| When exporting a page layout in Igor Pro 7.00 or later, you can specify /W=(0,0,0,0) to use the full page size. | |||||||
| Coordinates for /W are in points unless /I or /M are specified before /W. | |||||||
| /WIN=winSpec | Saves the named window or subwindow. winSpec can be just a window name, or a window name following by a '#' character and the name of the subwindow, as in /WIN=Panel0#G0. | ||||||
| /Z | Prevents errors from being fatal. V_flag is set to zero if no error, else nonzero if error. | ||||||
Details
SavePICT sets the variable V_flag to 0 if the operation succeeds or to a nonzero error code if it fails.
If you specify a path using the /P=pathName flag, then Igor saves the file in the folder identified by the path. Note that pathName is the name of an Igor symbolic path, created via NewPath. It is not a file system path like "hd:Folder1:" or "C:\Folder1\". See Symbolic Paths for details. Otherwise, with no path specified, Igor presents a standard save dialog to let you specify where the file is to be saved.
The graphics formats, specified via /E, are as follows:
| e =-9: | SVG file. | |
| e =-8: | Igor PDF file. | |
| e =-7: | TIFF file. Lossless but larger file than PNG; best for text, graph traces, and simple images with sharp edges. The default resolution is 72 dpi. Specify the resolution with the /B or /RES flag. Use for cross-platform compatibility. | |
| e =-6: | JPEG file. Lossy compression; best used for grayscale and color images with smooth tones. The /Q flag specifies compression quality and the /B or /RES flag sets the resolution. Use for cross-platform compatibility. PNG is a better choice for scientific graphics. | |
| e =-5: | PNG (Portable Network Graphics) file. Lossless compression; best for text, graph traces, and simple images with sharp edges. The default resolution is 72 dpi. Specify the resolution with the /B or /RES flag. Use for cross-platform compatibility. | |
| e =-4: | Device-independent bitmap file (DIB). The default resolution is 4x screen resolution. Specify the resolution with the /B or /RES flag. | |
| e =-3: | Encapsulated PostScript (EPS) file. | |
| Use /S to suppress the screen preview if exporting to Latex. | ||
| e =-2: | High-resolution Enhanced Metafile (EMF). | |
| e =-1: | Obsolete (was PostScript-enhanced metafile). | |
| e =0: | Obsolete (was PostScript-enhanced metafile). | |
| e >=1: | High-resolution Enhanced Metafile (EMF). | |
See Also
The ImageSave operation for saving waves as PICTs and other image file formats.
See Exporting Graphics (Windows) for a description of the /E=e modes and when to use which mode.