Commands Used with the IMGCTRL, IMGOP and PICFILL Functions |
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); |
is the value to report. Attributes for QUERYC are listed in Attributes for the QUERYC Command. Attributes for QUERYL are listed in Attributes for the QUERYL Command. Attributes for QUERYN are listed in Attributes for the QUERYN Command.
contains the information that is returned by QUERYC and QUERYN. QUERYC returns a character value, and QUERYN returns a numeric value.
contains the identifier for the SCL list of information items that are returned by QUERYL. See attribute for details.
Attributes for the QUERYC Command |
The values for attribute for QUERYC are:
returns information about the image size and color map. The information can be up to 45 characters long.
returns the IMAGE type, which can be 'CMAP', 'GRAY', or 'RGBA'.
Attributes for the QUERYL Command |
The values for attribute for QUERYL are:
returns an SCL list that contains the identifiers for all active images (images that are being used but that are not necessarily visible).
returns a named SCL list that contains the numeric values for the currently selected image:
returns an SCL list that contains the identifiers for all currently displayed images.
Attributes for the QUERYN Command |
The values for attribute for QUERYN are:
returns the alpha depth (degree of transparency), if TYPE=3 (RGBA).
returns a value that indicates whether the current page is blank:
1 | |
0 |
1 | |
2 | |
3 |
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
Display the number of active images:
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
Display an SCL list of information about the current image:
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]
Display an SCL list of information about the Image window:
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
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.