Viewport

Function
The Viewport function is exactly like a Crop, but it keeps the image information outside of the frame so you can perform later transformations..

Example
The following tree has a large input image (scaled down in the illustration) which is piped into a Crop node and a Viewport node, each with the same values. Both nodes are then piped into Move2D nodes with the same xPan values. The Crop result has black on the right edge after the pan, the Viewport result does not.

Node tree: FileIn1:
Crop1: Viewport1:
Move2D1: Move2D2:

 

Parameters
Type
Defaults
Function
cropLeft, Bottom, Right, Top
int
0, 0, width, height
The cropping window, with 0, 0 being the lower left corner.

Synopsis

image Viewport( image,
  int cropLeft, 
  int cropBottom,
  int cropRight, 
  int cropTop
);

Script

image = Viewport( image, 
        cropLeft, 
        cropBottom, 
        cropRight, 
        cropTop
);

Command Line

shake -viewport cropLeft cropBottom cropRight cropTop

See Also
Crop, Window