PHOTO_DISPLAY Procedure

Displays an image or a series of images.

Note:

If there are not enough colors to display the image, PHOTO_DISPLAY issues the following message:

PHOTO_DISPLAY: Not enough colors available for colormap.

The image continues to be displayed but may be lacking some colors, depending on how many are available.

Note:

The PHOTO routines are only available on 64-bit PV-WAVE.

Usage

PHOTO_DISPLAY, image[, x, y]
PHOTO_DISPLAY, image[, position]

Input Parameters

image — An image associative array or a list of image associative arrays.

x, y — (optional) The lower-left x- and y-coordinates of the displayed image in the window. (See the TV procedure for more information.)

position — (optional) A number specifying the position of the image. (See the TV Procedure for more information.)

Keywords

Animate — If nonzero, multiple images are displayed sequentially. The Animate keyword only applies if the image associative array contains multiple images. The animation begins with Sub_Img.

Delay — A floating-point value determining the frame-to-frame delay in seconds: applies only to animations. (Default: 0.01)

Quiet — Suppresses successive levels of error messages, depending on the set value. This keyword accepts the same integer values used with the system variable !Quiet .

Series — If set and the input is of type LIST, then the series of images is displayed. Images in the list array must be of the same width, height, and class.

Sub_Img — An integer specifying the index of the subimage if image has multiple images. (Default: 0)

Note:

Sub_Img is ignored if the image input parameter is a list of image associative arrays.

Keywords relating to the image display (TV)

Data — Specifies that the data coordinate system be used by x and y (image position).

Device — Specifies that the device coordinate system be used by x and y (image position). This is the default if no other coordinate-system keyword is specified.

Normal — Specifies that the normal coordinate system be used by x and y (image position).

Keywords relating to the display window

Wset — If set and the Window keyword is also specified, the image draws into the specified window. If set and the Window keyword is not specified, the image draws into the current active window.

Window — An integer specifying the window number in which to display the image. (Default: first free window number)

Note:

With improper selection of window size and image size and positions it is possible to make this procedure error and/or display some or all of the image outside of the window.

Note:

Color tables associated with the image are loaded when the image is displayed. This behavior may cause the colors in other windows to appear altered.

Discussion

The input associative array for the PHOTO_DISPLAY procedure, image, must be created by the PHOTO_READ Function or PHOTO_CREATE Function.

On systems where the display depth is eight or less (for example, when !D.Display_Depth £ 8), 24-bit images are converted to 8-bit pseudo-color before being displayed. This conversion is performed using the PHOTO_COLOR_QUANT Function and does not affect the original data. However, 8-bit images may be quantized to fewer colors if there are not enough colors available to display the image. To ensure that enough colors are available, use Colors=256 when creating the first window.

Example

This example shows how a series of TIF images read in with PHOTO_READ can be displayed with PHOTO_DISPLAY.

; Read a series of files, IM-0042-*.tif, in the data 
; directory and returns a list array containing the  
; image associative arrays.
CD, !Dir + '/demo/gallery3/data/', Current=curr_dir
filenames = FINDFILE('IM-0042*.tif')
filenames = SORTDIM(filenames,0)
image = PHOTO_READ(filenames, /Series) 
CD, curr_dir
; Display the series of photos in the image variable 
; with animation and a 0.3 second frame-to-frame delay.
PHOTO_DISPLAY, image, /Series, Delay=0.3

See Also

PHOTO_COLOR_QUANT, PHOTO_READ, TV, WINDOW, TVSCL 

System Variables: !Quiet,  !Order