Chapter Contents

Previous

Next
Image Data Model: _scale

Image Data Model: _scale



Scales the image


Syntax
Details
Examples

Syntax

CALL SEND (object-id, '_scale', width, height<, algorithm>);

Argument Type Description
width
N the new width of the image (in pixels)
height
N the new height of the image (in pixels)
algorithm
C the scaling algorithm to be used
BILINEAR
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.

LINEAR
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 but does not work very well when you are scaling down an image containing small, but important, features such as lines that are one pixel wide. LINEAR is the default.



Details

The size of the new image is specified in pixels; however, if one of the two values is -1, then the value used for that scale factor is computed to conserve the original image's aspect ratio.


Examples

This example scales the image's width to 200 pixels. The height is scaled as needed to preserve the aspect ratio.

call send(imgdat_id,'_scale',200, -1);


Chapter Contents

Previous

Next

Top of Page

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