TVRD Function

Returns the contents of the specified rectangular portion of a displayed image.

Usage

result = TVRD([x0, y0, nx, ny, channel ])

Input Parameters

x0—(optional) The starting column of data to read. Default is zero.

y0—(optional) The starting row of data to read. Default is zero.

nx—(optional) The number of columns to read. Default is that nx and ny are set such that TVRD will read to the upper-left edge/corner of the window.

ny—(optional) The number of rows to read. Default is that nx and ny are set such that TVRD will read to the upper-left edge/corner of the window.

channel—(optional) The memory channel to be read. If not specified, it is assumed to be zero. This parameter is ignored on display systems that only have one memory channel.

Returned Value

result—Byte array of dimensions nx-by-ny.

Note:

If the display is a 24-bit display, and both the channel parameter and True keyword are absent, the maximum RGB value in each pixel is returned.

Keywords

Channel—The memory channel to be read. This keyword is identical to the channel input parameter; only one needs to be specified.

Order—If specified, overrides the current setting of the !Order system variable for the current image only. If nonzero, Order causes the image to be drawn from the top-down, instead of from the bottom-up (the default).

True—If present and nonzero, indicates that a true-color (24-bit) image is to be read and specifies the index of the dimension over which color is interleaved:

1—Displays an array that is pixel-interleaved and has dimensions of (3, nx, ny).

2—Displays a line-interleaved array of dimensions (nx, 3, ny).

3—Displays an image-interleaved array of dimensions (nx, ny, 3).

Note:

For colors to work properly on 24 bit true color, set TRUE=3.

Example

For an example of TVRD, see the REBIN function.

See Also

TV, TVSCL, ZOOM

System Variables: !Order

For more information, see the PV‑WAVE User Guide.