Previous Page | Next Page

Commands Used with the IMGCTRL, IMGOP and PICFILL Functions

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;

Previous Page | Next Page | Top of Page