Commands Used with the IMGCTRL, IMGOP and PICFILL Functions |
Syntax | |
Details | |
Example |
Syntax |
rc=IMGOP(task-id, 'SCALE', width, height<, algorithm>); |
region-id=PICFILL(graphenv-id, type, ulr, ulc, lrr, lrc, source<, 'SCALE'<, arguments>>); |
specifies which scaling algorithm to use:
computes each new pixel in the final image by averaging four pixels in the source image and using that value. The BILINEAR algorithm is more computationally expensive than LINEAR, but it preserves details in the image better.
replicates pixels when the image is scaled up and discards pixels when the image is scaled down. The LINEAR algorithm yields good results on most images. However, it does not work very well when you are scaling down an image that contains small, but important, features such as lines that are only one pixel wide. LINEAR is the default.
Details |
SCALE acts on the currently selected image. It scales the image to a new image. If you specify -1 for either width or height, then SCALE preserves the image's aspect ratio.
Example |
main: rc=imgop(task-id,'READ',path); rc=imgop(task-id,'QUERYN','WIDTH',width); rc=imgop(task-id,'SCALE',2*width,-1); rc=imgop(task-id,'PASTE'); return;
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.