Chapter Contents

Previous

Next
Image Data Model: _read

Image Data Model: _read



Reads an image from an external file, SAS catalog, or device and displays it in an image object


Syntax
Details
Example

Syntax

CALL SEND (imgdat-id, '_read', pathname<, 'attributes'>);
CALL SEND (imgdat-id, '_read', devicename, 'DEVICE=CAMERA|SCANNER<attributes>);

Argument Type Description
pathname
C the name of the external file containing the image or the path string returned by the LNAMEMK function.

C the name of a camera or scanner:
devicename

'KODAKDC40' Kodak DC 40 camera (available only under the Windows 95 operating system)


'HPSCAN' HP Scanjet scanners (available only under Windows 95, Windows 32S, and HP/UX operating systems)


'TWAIN' TWAIN-based cameras and scanners on Windows operating systems


If you specify a device name, you must use the DEVICE= attribute to indicate the type of device.
attributes
C file- or device-specific attributes. For information on these attributes, see Using the Image Data Model Class.


Details

You can specify the file directly (using its physical filename path), or by using the information returned on a previous LNAMEMK function call. The LNAMEMK function allows creation of a single character variable that contains location information about the image (even if it resides in a SAS catalog) as well as other image attributes.


Example

This example reads an image stored in a SAS catalog by using the path string defined with an LNAMEMK function:

fullpath=lnamemk(5,'sashelp.imagapp.gfkids',
                'format=cat');
call send(imgdat_id,'_read',fullpath);

This example reads an image from an external file:

call send(imgdat_id,'_read','
          /usr/images/color/sign.tif');

This example scans a document:

call send (imgdat_id, '_read', 'hpscan',
          'device=scanner dpi=100');

This example scans a document using the TWAIN scanner driver:

call send (imgdat_id, '_read', 'TWAIN', 'device=scanner dpi=100 type=rgb');

This example reads an image from a camera:

CALL SEND (data_id, '_read', 'KODAKDC40', 'DEVICE=CAMERA TAKEPIC THUMB');

This example reads an image from a camera using the TWAIN camera driver:

CALL SEND (data_id, '_read', 'TWAIN', 'DEVICE=CAMERA SELSRC');


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.