Documentation for /home/davin/idl/socware/

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

spedas/gui/utilities/

tvread.pro


NAME: TVREAD PURPOSE: To get accurate screen dumps with the IDL command TVRD on 24-bit PC and Macintosh computers, you have to be sure to set color decomposition on. This program adds that capability automatically. In addition, the program will optionally write BMP, GIF, JPEG, PICT, PNG, and TIFF color image files of the screen dump. AUTHOR: FANNING SOFTWARE CONSULTING David Fanning, Ph.D. 1645 Sheely Drive Fort Collins, CO 80526 USA Phone: 970-221-0438 E-mail: davidf@dfanning.com Coyote's Guide to IDL Programming: http://www.dfanning.com CATEGORY: Graphics CALLING SEQUENCE: image = TVREAD(xstart, ystart, ncols, nrows) The returned image will be a 2D image on 8-bit systems and a 24-bit pixel interleaved true-color image on 24-bit systems. A -1 will be returned if a file output keyword is used (e.g., JPEG, TIFF, etc.). OPTIONAL INPUTS: XSTART -- The starting column index. By default, 0. YSTART -- The starting row index. By default, 0. NCOLS -- The number of columns to read. By default, !D.X_Size - XSTART NROWS -- The number of rows to read. By default, !D.Y_Size - YSTART. KEYWORD PARAMETERS: BMP -- Set this keyword to write the screen dump as a color BMP file. CANCEL -- An output keyword set to 1 if the user cancels out of a filename dialog. Set to 0 otherwise. COLORS -- If a 24-bit image has to be quantized, this will set the number of colors in the output image. Set to 256 by default. Applies to BMP, GIF, PICT, and PNG formats written from 24-bit displays.(See the COLOR_QUAN documentation for details.) CUBE -- If this keyword is set to a value between 2 and 6 the color quantization will use a cubic method of quantization. Applies to BMP, GIF, PICT, and PNG formats written from 24-bit displays.(See the COLOR_QUAN documentation for details.) DITHER -- If this keyword is set the quantized image will be dithered. Applies to BMP, GIF, PICT, and PNG formats written from 24-bit displays. (See the COLOR_QUAN documentation for details.) FILENAME -- The base name of the output file. (No file extensions; they will be added automatically.) This name may be changed by the user. image = TVREAD(Filename='myfile', /JPEG) No file will be written unless a file output keyword is used (e.g., JPEG, TIFF, etc.) in the call. By default the FILENAME is set to "idl". The file extension will be set automatically to match the type of file created. GIF -- Set this keyword to write the screen dump as a color GIF file. JPEG -- Set this keyword to write the screen dump as a color JPEG file. NODIALOG -- Set this keyword if you wish to avoid the DIALOG_PICKFILE dialog that asks you to name the output file. This keyword should be set, for example, if you are processing screens in batch mode. ORDER -- Set this keyword to determine the image order for reading the display. Corresponds to !Order and set to such as the default. PICT -- Set this keyword to write the screen dump as a color PICT file. PNG -- Set this keyword to write the screen dump as a color PNG file. TIFF -- Set this keyword to write the screen dump as a color TIFF file. TRUE -- Set this keyword to the type of interleaving you want. 1 = Pixel interleaved, 2 = row interleaved, 3 = band interleaved. QUALITY -- This keyword sets the amount of compression for JPEG images. It should be set to a value between 0 and 100. It is set to 75 by default. (See the WRITE_JPEG documentation for details.) WID -- The index number of the window to read from. The current graphics window (!D.Window) is selected by default. An error is issued if no windows are currently open on a device that supports windows. _EXTRA -- Any keywords that are appropriate for the WRITE_*** routines are also accepted via keyword inheritance. COMMON BLOCKS: None RESTRICTIONS: Requires IDL 5.2 and higher. MODIFICATION HISTORY: Written by David W. Fanning, 9 AUG 2000. Added changes to make the program more device independent. 16 SEP 2000. DWF. Removed GIF file support for IDL 5.4 and above. 18 JAN 2001. DWF. Added NODIALOG keyword. 28 MAR 2001. DWF. Added an output CANCEL keyword. 29 AUG 2001. DWF. Added ERROR_MESSAGE code to file. 17 DEC 2001. DWF. Added ORDER keyword. 25 March 2002. DWF. Now create 24-bit PNG files if reading from a 24-bit display. 11 May 2002. DWF. Now create 24-bit BMP files if reading from a 24-bit display. 23 May 2002. DWF. Removed obsolete STR_SEP and replaced with STRSPLIT. 27 Oct 2004. DWF.

Routines

Routines from tvread.pro

result = TVREAD_ERROR_MESSAGE(theMessage, Traceback=Traceback, NoName=NoName, _Extra=_Extra)
result = TVREAD(xstart, ystart, ncols, nrows, BMP=BMP, Cancel=Cancel, Colors=Colors, Cube=Cube, Dither=Dither, _Extra=_Extra, Filename=Filename, GIF=GIF, JPEG=JPEG, NoDialog=NoDialog, Order=Order, PICT=PICT, PNG=PNG, TIFF=TIFF, True=True, Quality=Quality, WID=WID)

Routine details

top source TVREAD_ERROR_MESSAGE

result = TVREAD_ERROR_MESSAGE(theMessage, Traceback=Traceback, NoName=NoName, _Extra=_Extra)

Parameters

theMessage

Keywords

Traceback
NoName
_Extra

top source TVREAD

result = TVREAD(xstart, ystart, ncols, nrows, BMP=BMP, Cancel=Cancel, Colors=Colors, Cube=Cube, Dither=Dither, _Extra=_Extra, Filename=Filename, GIF=GIF, JPEG=JPEG, NoDialog=NoDialog, Order=Order, PICT=PICT, PNG=PNG, TIFF=TIFF, True=True, Quality=Quality, WID=WID)

Parameters

xstart
ystart
ncols
nrows

Keywords

BMP
Cancel
Colors
Cube
Dither
_Extra
Filename
GIF
JPEG
NoDialog
Order
PICT
PNG
TIFF
True
Quality
WID

File attributes

Modification date: Thu Feb 13 16:41:46 2014
Lines: 215