Chapter Contents

Previous

Next
CROP

CROP



Crops the selected image


Syntax
Details
Example

Syntax

rc=IMGOP(task-id, 'CROP', start-x, start-y, end-x, end-y);
region-id=PICFILL(graphenv-id, type, ulr, ulc,
lrr, lrc, source<, 'CROP'<, arguments>>);

start-x
is the row number of the upper corner.

Type: Numeric

start-y
is the column number of the upper corner.

Type: Numeric

end-x
is the row number of the lower corner.

Type: Numeric

end-y
is the column number of the lower corner.

Type: Numeric


Details

The start-x, start-y, end-x, and end-y points use units of pixels and are included in the new image. The top left corner of the image is (0,0).


Example

Display an image and then crop it:

name=lnamemk(1,path);
rc=imgop(task-id,'SELECT',1);
rc=imgop(task-id,'READ_PASTE',1,1,name);

if (crop eq 1) then
   do;
      rc=imgop(task-id,'CROP',ucx,ucy,lcx,lcy);
      rc=imgop(task-id,'PASTE',1,1);
   end;


Chapter Contents

Previous

Next

Top of Page

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