Chapter Contents |
Previous |
Next |
Image Data Model: _getAttributes |
Syntax | |
_getAttributes List Items | |
Details | |
Examples |
Syntax |
CALL SEND (object-id, '_getAttributes', list-id); |
Argument | Type | Description |
---|---|---|
list-id |
N | the identifier of an SCL list containing the object attributes listed in _getAttributes List Items. |
List Item | Type | Description |
---|---|---|
DESCRIPT | C | a string less than 200 characters long containing information about the image size and color map |
FILENAME | C | image path string |
FORMAT | C | original file format, such as GIF |
WIDTH | N | image width in pixels |
HEIGHT | N | image height in pixels |
DEPTH | N | image depth |
TYPE | C | image type: 'CMAP', 'GRAY', 'RGBA' |
NCOLORS | N | specifies the number of colors, if TYPE='CMAP' |
RDEPTH | N | specifies the red depth, if TYPE='RGBA' |
GDEPTH | N | specifies the green depth, if TYPE='RGBA' |
BDEPTH | N | specifies the blue depth, if TYPE='RGBA' |
ADEPTH | N | specifies the alpha depth, if TYPE='RGBA' |
ONERROR_OPTIONS | C | a string containing the option flags currently set. These can be changed by using _onError. |
Details |
If the specified list is empty, it is filled in with a subset of image attributes. However, if the list is not empty, it is assumed to be a list of specific name attributes that should be filled in.
Examples |
This example displays an SCL list of information about an image:
call send(imgdat_id, '_readFilepath', filename,'format=gif'); list=0; call send(imgdat_id,'_getAttributes', list); call putlist(list,'Image attributes are: ');
When the program is run, the following lines are written to the LOG window:
Image attributes are: (DESCRIPT='187x209 8-bit CMAP, 8 colormap entries' FILENAME='01010Q/usr/local/images/color/misc/canoe.tif' WIDTH=187 HEIGHT=209 TYPE='CMAP' DEPTH=8 NCOLORS=8 )[4]
This example displays specific attributes of an image:
call send(imgdat_id, '_readFilepath', filename, 'format=tiff'); list=0; list=setnitemc(list,'','format'); list=setnitemn(list,0,'rdepth'); list=setnitemn(list,0,'gdepth'); list=setnitemn(list,0,'bdepth'); list=setnitemn(list,0,'adepth'); list=setnitemc(list,'','device'); call send(imgdat_id,'_getAttributes',list); call putlist(list,'Image attributes are: '); return;When the program is run, the following lines are written to the LOG window:
Image attributes are:(FORMAT='TIFF' RDEPTH=0 GDEPTH=0 BDEPTH=0 ADEPTH=0 DEVICE='' )[317]
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.