| Crop |
Function
This function crops an image by defining the lower-left corner and the upper-right
corner of the crop. Since the numbers can be greater or less than the boundaries
of the image, you can make the image smaller, or expand the image with a
black border.
A Crop cuts elements beyond the frame area, so if you later use another transform
(for
example, Pan, Move2D, etc.) to move the image, black is brought in. This is
how Crop differs from Viewport—Viewport does not cut off the image. See “Viewport” on page 238, for an
example. Window is also the same command, but you set the lower-left corner,
and then
the X and Y resolution. Crop is particularly helpful in that it sets a new
frame area. Shake only processes
nodes within the frame, so to speed up an operator you can limit its area with
a Crop. This is essentially what is done with the Constraint node.
|
Parameters
|
Type
|
Defaults
|
Function
|
| cropLeft, Bottom, Right, Top |
float
|
0,0, width, height |
These represent the lower left and upper right corners of the crop region. Note that the area generated is up to, but not including, the upper right since 0,0 represents the lower left corner of the lower left pixel. |
Synopsis
image Crop( image, int cropLeft, int cropBottom, int cropRight, int cropTop );
Script
image = Crop( image, cropLeft, cropBottom, cropRight, cropTop );
Command Line
shake -crop cropLeft cropBottom etc...
Example
shake lisa.iff -crop 100 200 400 500
shake lisa.iff -crop -100 -100 width+100 height+100