Chapter Contents

Previous

Next
Image: _getAttributes

Image: _getAttributes



Returns values of image attributes


Syntax
_getAttributes List Items
Details
Example

Syntax

CALL NOTIFY (image-name, '_getAttributes', list-id);

Argument Type Description
list-id
N the identifier of an SCL list containing object attributes

_getAttributes List Items
List Item Type Description
DESCRIPT C a string no longer than 200 characters 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 will be filled in with all of the image attributes. However, if the list is not empty, it is assumed that a list of valid named attributes will be filled in.


Example

This example displays an SCL list of information about an image object:

call notify (imageview, '_readFilepath', 
              filename, 'format=tiff');
list=makelist();
call notify ('imageview', '_getAttributes',
              list);
call putlist (list, 'Image attributes 
              are: ');

When the program runs, 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 notify ('imageview', '_readFilepath',
              filename, 'format=tiff');
list=makelist();
list=setnitemc (list, '', 'format');
list=setnitemn (list, 0, 'width');
list=setnitemn (list, 0, 'height');
call notify ('imageview', '_getAttributes',
              list);
call putlist (list, 'Image attributes 
              are: ');

When the program runs, the following line is written to the LOG window:

Image attributes are:(FORMAT='TIFF' WIDTH=187
                      HEIGHT=209)[317]


Chapter Contents

Previous

Next

Top of Page

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