Chapter Contents |
Previous |
Next |
QUERYC, QUERYL, and QUERYN |
Syntax | |
Attributes for the QUERYC Command | |
Attributes for the QUERYL Command | |
Attributes for the QUERYN Command | |
Details | |
Examples | |
Example 1: Using QUERYC | |
Example 2: Using QUERYL | |
Example 3: Using QUERYN |
Syntax |
rc=IMGOP(task-id, 'QUERYC', attribute, information); |
rc=IMGOP(task-id, 'QUERYL', attribute, list-id); |
rc=IMGOP(task-id, 'QUERYN', attribute, information); |
Type: Character
Type: Character or Numeric
Type: List
Attributes for the QUERYC Command |
The values for attribute for QUERYC are:
Attributes for the QUERYL Command |
The values for attribute for QUERYL are:
WIDTH | the image width in pixels |
HEIGHT | the image height in pixels |
DEPTH | the image depth |
TYPE | the image type: 'CMAP', 'GRAY', 'RGBA' |
Attributes for the QUERYN Command |
The values for attribute for QUERYN are:
1 | blank |
0 | not blank (valid for monochrome images only). |
1 | GRAY (gray-scale) |
2 | CMAP (color mapped) |
3 | RGBA. |
Details |
The QUERYC, QUERYL, and QUERYN commands return information about all images as well as about the Image window. QUERYC returns the values of character attributes. QUERYL returns the values of attributes that are stored in an SCL list. QUERYN returns the values of numeric attributes. These commands act on the currently selected image.
Examples |
Display the description, filename, format, and type of an image:
rc=imgop(task-id,'READ', '/usr/local/images/color/misc/canoe.gif'); rc=imgop(task-id,'QUERYC','DESCRIPT',idescr); put idescr=; rc=imgop(task-id,'QUERYC','FILENAME',ifile); put ifile=; rc=imgop(task-id,'QUERYC','FORMAT',iformat); put iformat=; rc=imgop(task-id,'QUERYC','TYPE',itype); put itype=;
This program writes the following lines to the LOG window:
IDESCR=640x480 8-bit CMAP, 256 colormap entries IFILE=/usr/local/images/color/misc/canoe.gif IFORMAT=GIF ITYPE=CMAP
qlist=0; rc=imgop(task-id,'SELECT',1); rc=imgop(task-id,'READ',path1); rc=imgop(task-id,'SELECT',2); rc=imgop(task-id,'READ',path2); rc=imgop(task-id,'PASTE'); rc=imgop(task-id,'QUERYL','ACTIVE_LIST',qlist); images=listlen(qlist); put images=;
This program writes the following line to the LOG window:
images=2
qlist=makelist(); rc=imgop(task-id,'SELECT',1); rc=imgop(task-id,'READ',path); rc=imgop(task-id,'QUERYL','SELECT_INFO',qlist); call putlist(qlist);
This program writes the following information to the LOG window:
(IS_ACTIVE=1 IS_VISIBLE=0 XPOSN=0 YPOSN=0 WIDTH=1024 HEIGHT=768 DEPTH=8 TYPE='CMAP' NCOLORS=253 )[18]
qlist=makelist(); rc=imgop(task-id,'SELECT',1); rc=imgop(task-id,'READ',path); rc=imgop(task-id,'QUERYL','GLOBAL_INFO',qlist); call putlist(qlist);
This program writes the following lines to the LOG window:
(NUM_ACTIVE=1 SELECT=1 WSIZE_WIDTH=682 WSIZE_HEIGHT=475 )[20]
Display information about the Image window. (Assume that all variables have been initialized before they are used.)
rc=imgop(task-id,'READ',path); rc=imgop(task-id,'QUERYN','SELECT',select); rc=imgop(task-id,'QUERYN','HEIGHT',height); rc=imgop(task-id,'QUERYN','WIDTH',width); rc=imgop(task-id,'QUERYN','DEPTH',depth); rc=imgop(task-id,'QUERYN','RDEPTH',rdepth); rc=imgop(task-id,'QUERYN','GDEPTH',gdepth); rc=imgop(task-id,'QUERYN','BDEPTH',bdepth); rc=imgop(task-id,'QUERYN','ADEPTH',adepth); rc=imgop(task-id,'QUERYN','NCOLORS',ncolors); rc=imgop(task-id,'QUERYN','TYPE',type); put select= height= width= depth= rdepth= gdepth=; put bdepth= adepth= ncolors= type= ;This program writes the following values to the LOG window:
SELECT=1 HEIGHT=470 WIDTH=625 DEPTH=8 RDEPTH=0 GDEPTH=0 BDEPTH=0 ADEPTH=0 NCOLORS=229 TYPE=2
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.